From aa1a197e532673f0c4d33dee5bed27298c050d38 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sat, 6 Oct 2012 22:07:19 +0200 Subject: [PATCH] added 4 debug keys you never know when you're gonna need those --- src/app/Input.h | 29 +++++++++++++++++------------ src/main.cpp | 4 ++++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/app/Input.h b/src/app/Input.h index 988caa8..415d11f 100644 --- a/src/app/Input.h +++ b/src/app/Input.h @@ -17,18 +17,23 @@ class Input { public: enum Button { - PAD_UP = 1, - PAD_RIGHT = 2, - PAD_DOWN = 4, - PAD_LEFT = 8, - ACTION_A = 16, - ACTION_B = 32, - ACTION_X = 64, - ACTION_Y = 128, - START = 256, - SELECT = 512, - SHOULDER_RIGHT = 1024, - SHOULDER_LEFT = 2048 + PAD_UP = 0x0001, + PAD_RIGHT = 0x0002, + PAD_DOWN = 0x0004, + PAD_LEFT = 0x0008, + ACTION_A = 0x0010, + ACTION_B = 0x0020, + ACTION_X = 0x0040, + ACTION_Y = 0x0080, + START = 0x0100, + SELECT = 0x0200, + SHOULDER_RIGHT = 0x0400, + SHOULDER_LEFT = 0x0800, + + DEBUG_1 = 0x1000, + DEBUG_2 = 0x2000, + DEBUG_3 = 0x4000, + DEBUG_4 = 0x8000, }; public: diff --git a/src/main.cpp b/src/main.cpp index 75bba63..4598f70 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -496,6 +496,10 @@ int main(int argc, char **argv) { app.Buttons().MapKey(SDLK_SPACE, Input::SELECT); app.Buttons().MapKey(SDLK_RSHIFT, Input::SHOULDER_RIGHT); app.Buttons().MapKey(SDLK_LSHIFT, Input::SHOULDER_LEFT); + app.Buttons().MapKey(SDLK_1, Input::DEBUG_1); + app.Buttons().MapKey(SDLK_2, Input::DEBUG_2); + app.Buttons().MapKey(SDLK_3, Input::DEBUG_3); + app.Buttons().MapKey(SDLK_4, Input::DEBUG_4); app.Run(); return 0; -- 2.39.2