Ignore:
Timestamp:
Apr 29, 2012, 8:41:43 PM (8 years ago)
Author:
touky
Message:

Added GetButtonState() in Input class.
Added Escape button in to quit Orbital.
Added Camera control with some little damping sweetness in Camera logic in main Tick.
First Commit \o/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/input.cpp

    r1300 r1308  
    9292}
    9393
     94//BH : Added this, is a v0.1 Alpha version.
     95int Input::GetButtonState(int button)
     96{
     97#if defined USE_SDL
     98#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION >= 3
     99    Uint8 *keystate = SDL_GetKeyboardState(NULL);
     100#else
     101    Uint8 *keystate = SDL_GetKeyState(NULL);
     102#endif
     103    return keystate[button];
     104#else
     105    return 0;
     106#endif
     107}
     108
    94109void Input::TrackMouse(WorldEntity *e)
    95110{
Note: See TracChangeset for help on using the changeset viewer.