Changeset 1348


Ignore:
Timestamp:
May 7, 2012, 1:39:15 AM (9 years ago)
Author:
sam
Message:

orbital: move ship with arrows.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/player.h

    r1347 r1348  
    3030        m_drone_mesh.SendCommand("sc0.2,0.7,0,1,afcb3,6,10,0.4,tx-8,afcb3,6,10,0.4,tx4,ty13,fl,sc1,1,1,1,afcb3,6,10,0.4,rx-30,ty13,fl");
    3131
    32         m_position = vec3(0.f, 5.f, 0.f);
     32        m_position = vec3(0.f, 3.5f, 0.f);
    3333    }
    3434
     
    4646        WorldEntity::TickGame(seconds);
    4747
    48         float rightleft = 0.f, updown = 0.f;
     48        float updown = Input::GetButtonState(273 /*SDLK_UP*/)
     49                     - Input::GetButtonState(274 /*SDLK_DOWN*/);
     50        float rightleft = Input::GetButtonState(275 /*SDLK_RIGHT*/)
     51                        - Input::GetButtonState(276 /*SDLK_LEFT*/);
    4952
    5053        if (!m_stick)
  • trunk/src/camera.cpp

    r1343 r1348  
    5959
    6060    /* Hackish keyboard support */
    61     float updown = Input::GetButtonState(273 /*SDLK_UP*/)
    62                  - Input::GetButtonState(274 /*SDLK_DOWN*/);
    63     float rightleft = Input::GetButtonState(275 /*SDLK_RIGHT*/)
    64                     - Input::GetButtonState(276 /*SDLK_LEFT*/);
    65     float pgupdown = Input::GetButtonState(280 /*SDLK_PAGEUP*/)
    66                    - Input::GetButtonState(281 /*SDLK_PAGEDOWN*/);
     61    float updown = 2.f * (Input::GetButtonState('w')
     62                           + Input::GetButtonState('z')
     63                           - Input::GetButtonState('s'));
     64    float rightleft = 2.f * (Input::GetButtonState('d')
     65                              - Input::GetButtonState('q')
     66                              - Input::GetButtonState('a'));
     67    float pgupdown = 2.f * (Input::GetButtonState('r')
     68                             - Input::GetButtonState('f'));
    6769
    6870    /* Hackish stick support */
Note: See TracChangeset for help on using the changeset viewer.