1 2 // Functions from controls.cc 3 #ifdef USE_JOYSTICK 4 extern void CalibrateJoystick(char *joystick); 5 #endif 6 extern void LoadControls(void); 7 extern void SaveControls(void); 8 extern void ConfigureControls(void); 9 extern int PollEvent(SDL_Event *event, int timeout); 10 extern void HandleEvents(int timeout); 11 extern int DropEvents(void); 12 extern void ShowDawn(void); 13 14 /* Generic key control definitions */ 15 #define THRUST_KEY 0x01 16 #define RIGHT_KEY 0x02 17 #define LEFT_KEY 0x03 18 #define SHIELD_KEY 0x04 19 #define FIRE_KEY 0x05 20 #define PAUSE_KEY 0x06 21 #define ABORT_KEY 0x07 22 23 /* The controls structure */ 24 typedef struct { 25 SDLKey gPauseControl; 26 SDLKey gShieldControl; 27 SDLKey gThrustControl; 28 SDLKey gTurnRControl; 29 SDLKey gTurnLControl; 30 SDLKey gFireControl; 31 SDLKey gQuitControl; 32 } Controls; 33 34