]> git.localhorst.tv Git - l2e.git/commitdiff
added 4 debug keys
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 6 Oct 2012 20:07:19 +0000 (22:07 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 6 Oct 2012 20:07:19 +0000 (22:07 +0200)
you never know when you're gonna need those

src/app/Input.h
src/main.cpp

index 988caa807c2eacc2f0424765c17bd9b8c05d11b2..415d11f0890ade422591d14753570f230b4bba05 100644 (file)
@@ -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:
index 75bba636eebc5ddae6380c838963b71cf7052ba1..4598f7012b6f2c7a0faa843339adbf3102c1b048 100644 (file)
@@ -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;