diff options
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d/gp2x.h')
-rw-r--r-- | apps/plugins/sdl/progs/wolf3d/gp2x.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/wolf3d/gp2x.h b/apps/plugins/sdl/progs/wolf3d/gp2x.h new file mode 100644 index 0000000000..f8b3557a41 --- /dev/null +++ b/apps/plugins/sdl/progs/wolf3d/gp2x.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef GP2X_H | ||
2 | #define GP2X_H | ||
3 | |||
4 | #include <SDL/SDL.h> | ||
5 | #include <sys/ioctl.h> | ||
6 | #include <sys/soundcard.h> | ||
7 | #include <fcntl.h> | ||
8 | #include <unistd.h> | ||
9 | |||
10 | #include "wl_def.h" | ||
11 | |||
12 | #define GP2X_BUTTON_UP (0) | ||
13 | #define GP2X_BUTTON_DOWN (4) | ||
14 | #define GP2X_BUTTON_LEFT (2) | ||
15 | #define GP2X_BUTTON_RIGHT (6) | ||
16 | #define GP2X_BUTTON_UPLEFT (1) | ||
17 | #define GP2X_BUTTON_UPRIGHT (7) | ||
18 | #define GP2X_BUTTON_DOWNLEFT (3) | ||
19 | #define GP2X_BUTTON_DOWNRIGHT (5) | ||
20 | #define GP2X_BUTTON_CLICK (18) | ||
21 | #define GP2X_BUTTON_A (12) | ||
22 | #define GP2X_BUTTON_B (13) | ||
23 | #define GP2X_BUTTON_X (15) | ||
24 | #define GP2X_BUTTON_Y (14) | ||
25 | #define GP2X_BUTTON_L (11) | ||
26 | #define GP2X_BUTTON_R (10) | ||
27 | #define GP2X_BUTTON_START (8) | ||
28 | #define GP2X_BUTTON_SELECT (9) | ||
29 | #define GP2X_BUTTON_VOLUP (16) | ||
30 | #define GP2X_BUTTON_VOLDOWN (17) | ||
31 | |||
32 | #define VOLUME_MIN 0 | ||
33 | #define VOLUME_MAX 100 | ||
34 | #define VOLUME_CHANGE_RATE 2 | ||
35 | #define VOLUME_NOCHG 0 | ||
36 | #define VOLUME_DOWN 1 | ||
37 | #define VOLUME_UP 2 | ||
38 | #define KEY_DOWN 1 | ||
39 | #define KEY_UP 0 | ||
40 | |||
41 | void GP2X_Init(); | ||
42 | void GP2X_Shutdown(); | ||
43 | void GP2X_StartMMUHack(); | ||
44 | |||
45 | void GP2X_AdjustVolume( int direction ); | ||
46 | void GP2X_ButtonDown( int button ); | ||
47 | void GP2X_ButtonUp( int button ); | ||
48 | void Screenshot( void ); | ||
49 | void SetKeyboard( unsigned int key, int press ); | ||
50 | |||
51 | #endif // GP2X_H | ||