Unification of button system for the three current console ports.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1630 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2010-09-29 23:06:26 +00:00
parent bd13dd93b1
commit e3e9be75b0
4 changed files with 238 additions and 259 deletions

View File

@@ -966,64 +966,64 @@ GFX2_GLOBAL SDL_Joystick* Joystick;
#define JOYSTICK_THRESHOLD (4096)
/// Button definitions for the gp2x
#define GP2X_BUTTON_UP (0)
#define GP2X_BUTTON_DOWN (4)
#define GP2X_BUTTON_LEFT (2)
#define GP2X_BUTTON_RIGHT (6)
#define GP2X_BUTTON_UPLEFT (1)
#define GP2X_BUTTON_UPRIGHT (7)
#define GP2X_BUTTON_DOWNLEFT (3)
#define GP2X_BUTTON_DOWNRIGHT (5)
#define GP2X_BUTTON_CLICK (18)
#define GP2X_BUTTON_A (12)
#define GP2X_BUTTON_B (13)
#define GP2X_BUTTON_Y (14)
#define GP2X_BUTTON_X (15)
#define GP2X_BUTTON_L (10)
#define GP2X_BUTTON_R (11)
#define GP2X_BUTTON_START (8)
#define GP2X_BUTTON_SELECT (9)
#define GP2X_BUTTON_VOLUP (16)
#define GP2X_BUTTON_VOLDOWN (17)
#define JOY_BUTTON_UP (0)
#define JOY_BUTTON_DOWN (4)
#define JOY_BUTTON_LEFT (2)
#define JOY_BUTTON_RIGHT (6)
#define JOY_BUTTON_UPLEFT (1)
#define JOY_BUTTON_UPRIGHT (7)
#define JOY_BUTTON_DOWNLEFT (3)
#define JOY_BUTTON_DOWNRIGHT (5)
#define JOY_BUTTON_CLICK (18)
#define JOY_BUTTON_A (12)
#define JOY_BUTTON_B (13)
#define JOY_BUTTON_Y (14)
#define JOY_BUTTON_X (15)
#define JOY_BUTTON_L (10)
#define JOY_BUTTON_R (11)
#define JOY_BUTTON_START (8)
#define JOY_BUTTON_SELECT (9)
#define JOY_BUTTON_VOLUP (16)
#define JOY_BUTTON_VOLDOWN (17)
#define KEY_ESC (KEY_JOYBUTTON+GP2X_BUTTON_X)
#define KEY_ESC (KEY_JOYBUTTON+JOY_BUTTON_X)
#elif defined(__WIZ__)
/// Button definitions for the Wiz
#define WIZ_BUTTON_UP (0)
#define WIZ_BUTTON_DOWN (4)
#define WIZ_BUTTON_LEFT (2)
#define WIZ_BUTTON_RIGHT (6)
#define WIZ_BUTTON_UPLEFT (1)
#define WIZ_BUTTON_UPRIGHT (7)
#define WIZ_BUTTON_DOWNLEFT (3)
#define WIZ_BUTTON_DOWNRIGHT (5)
#define WIZ_BUTTON_L (10)
#define WIZ_BUTTON_R (11)
#define WIZ_BUTTON_A (12)
#define WIZ_BUTTON_B (13)
#define WIZ_BUTTON_X (14)
#define WIZ_BUTTON_Y (15)
#define WIZ_BUTTON_MENU (8)
#define WIZ_BUTTON_SELECT (9)
#define WIZ_BUTTON_VOLUP (16)
#define WIZ_BUTTON_VOLDOWN (17)
#define JOY_BUTTON_UP (0)
#define JOY_BUTTON_DOWN (4)
#define JOY_BUTTON_LEFT (2)
#define JOY_BUTTON_RIGHT (6)
#define JOY_BUTTON_UPLEFT (1)
#define JOY_BUTTON_UPRIGHT (7)
#define JOY_BUTTON_DOWNLEFT (3)
#define JOY_BUTTON_DOWNRIGHT (5)
#define JOY_BUTTON_L (10)
#define JOY_BUTTON_R (11)
#define JOY_BUTTON_A (12)
#define JOY_BUTTON_B (13)
#define JOY_BUTTON_X (14)
#define JOY_BUTTON_Y (15)
#define JOY_BUTTON_MENU (8)
#define JOY_BUTTON_SELECT (9)
#define JOY_BUTTON_VOLUP (16)
#define JOY_BUTTON_VOLDOWN (17)
#define KEY_ESC (KEY_JOYBUTTON+WIZ_BUTTON_X)
#define KEY_ESC (KEY_JOYBUTTON+JOY_BUTTON_X)
#elif __CAANOO__
/// Button definitions for the Caanoo
#define CAANOO_BUTTON_A (0)
#define CAANOO_BUTTON_X (1)
#define CAANOO_BUTTON_B (2)
#define CAANOO_BUTTON_Y (3)
#define CAANOO_BUTTON_L (4)
#define CAANOO_BUTTON_R (5)
#define CAANOO_BUTTON_HOME (6)
#define CAANOO_BUTTON_HOLD (7)
#define CAANOO_BUTTON_I (8)
#define CAANOO_BUTTON_II (9)
#define CAANOO_BUTTON_JOY (10)
#define JOY_BUTTON_A (0)
#define JOY_BUTTON_X (1)
#define JOY_BUTTON_B (2)
#define JOY_BUTTON_Y (3)
#define JOY_BUTTON_L (4)
#define JOY_BUTTON_R (5)
#define JOY_BUTTON_HOME (6)
#define JOY_BUTTON_HOLD (7)
#define JOY_BUTTON_I (8)
#define JOY_BUTTON_II (9)
#define JOY_BUTTON_JOY (10)
#define KEY_ESC (KEY_JOYBUTTON+CAANOO_BUTTON_HOME)
#define KEY_ESC (KEY_JOYBUTTON+JOY_BUTTON_HOME)
#else
///
/// This is the key identifier for ESC. When hard-coding keyboard shortcuts