File: controls.h

package info (click to toggle)
maelstrom 3.0.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,952 kB
  • sloc: cpp: 10,947; sh: 3,406; ansic: 2,781; makefile: 175
file content (34 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

// Functions from controls.cc
#ifdef USE_JOYSTICK
extern void	CalibrateJoystick(char *joystick);
#endif
extern void	LoadControls(void);
extern void	SaveControls(void);
extern void	ConfigureControls(void);
extern int	PollEvent(SDL_Event *event, int timeout);
extern void	HandleEvents(int timeout);
extern int	DropEvents(void);
extern void	ShowDawn(void);

/* Generic key control definitions */
#define THRUST_KEY	0x01
#define RIGHT_KEY	0x02
#define LEFT_KEY	0x03
#define SHIELD_KEY	0x04
#define FIRE_KEY	0x05
#define PAUSE_KEY	0x06
#define ABORT_KEY	0x07

/* The controls structure */
typedef struct {
	SDL_Keycode gPauseControl;
	SDL_Keycode gShieldControl;
	SDL_Keycode gThrustControl;
	SDL_Keycode gTurnRControl;
	SDL_Keycode gTurnLControl;
	SDL_Keycode gFireControl;
	SDL_Keycode gQuitControl;
} Controls;

extern SDL_Keymod gToggleFullscreenMod;