Ignore:
Timestamp:
Feb 18, 2011, 1:09:28 AM (10 years ago)
Author:
sam
Message:

Get rid of float3, float4, int3 etc. in favour of GLSL types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/input.cpp

    r339 r664  
    3838
    3939private:
    40     int2 mouse;
    41     int3 buttons;
     40    vec2i mouse;
     41    vec3i buttons;
    4242
    4343    static int const MAX_ENTITIES = 100;
     
    5454 */
    5555
    56 float2 Input::GetAxis(int axis)
     56vec2 Input::GetAxis(int axis)
    5757{
    5858    float invsqrt2 = sqrtf(0.5f);
    59     float2 f;
     59    vec2 f;
    6060
    6161    /* Simulate a joystick using the keyboard. This SDL call is free. */
     
    7171}
    7272
    73 int2 Input::GetMousePos()
     73vec2i Input::GetMousePos()
    7474{
    7575    return data->mouse;
    7676}
    7777
    78 int3 Input::GetMouseButtons()
     78vec3i Input::GetMouseButtons()
    7979{
    8080    return data->buttons;
     
    102102}
    103103
    104 void Input::SetMousePos(int2 coord)
     104void Input::SetMousePos(vec2i coord)
    105105{
    106106    data->mouse = coord;
     
    124124        if (data->entities[n] == best)
    125125        {
    126             data->entities[n]->mousepos = (int2)((int3)coord - best->bbox[0]);
     126            data->entities[n]->mousepos = (vec2i)((vec3i)coord - best->bbox[0]);
    127127            if (best != data->lastfocus)
    128128                data->entities[n]->pressed = data->buttons;
     
    132132        else
    133133        {
    134             data->entities[n]->mousepos = int2(-1);
     134            data->entities[n]->mousepos = vec2i(-1);
    135135            /* FIXME */
    136136            data->entities[n]->released = 0;
Note: See TracChangeset for help on using the changeset viewer.