]> git.localhorst.tv Git - l2e.git/commitdiff
added key mapping for pandora
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 21 Jan 2013 13:10:42 +0000 (07:10 -0600)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 21 Jan 2013 13:10:42 +0000 (07:10 -0600)
readme
src/keys.h

diff --git a/readme b/readme
index ff710ac8ed632975ad7ed2a199e2dd498da3da9d..9dbe8e10c4261486cdac2d981fafc7472fa7ca13 100644 (file)
--- a/readme
+++ b/readme
@@ -65,6 +65,8 @@ Control Mapping
        right     : right shift | debug 3   : 3
        left      : left shift  | debug 4   : 4
 
+       This mapping is defined in `src/keys.h'.
+
 More
        There is a project page online with issue tracker and wiki at
        `http://luke.redirectme.net/redmine/projects/l2e'.
index 66836ba46f323a4e50d15b351d9dfce975d1b0b6..cf1059b325f1d56da5aa78fde72b7f20f0df0895 100644 (file)
@@ -2,8 +2,23 @@
 #define L2E_KEYS_H_
 
 #include "app/Input.h"
+#include <SDL.h>
 
 inline void MapKeys(app::Input &input) {
+#ifdef PANDORA
+       input.MapKey(SDLK_UP, app::Input::PAD_UP);
+       input.MapKey(SDLK_RIGHT, app::Input::PAD_RIGHT);
+       input.MapKey(SDLK_DOWN, app::Input::PAD_DOWN);
+       input.MapKey(SDLK_LEFT, app::Input::PAD_LEFT);
+       input.MapKey(SDLK_END, app::Input::ACTION_A);
+       input.MapKey(SDLK_PAGEDOWN, app::Input::ACTION_B);
+       input.MapKey(SDLK_PAGEUP, app::Input::ACTION_X);
+       input.MapKey(SDLK_HOME, app::Input::ACTION_Y);
+       input.MapKey(SDLK_RALT, app::Input::START);
+       input.MapKey(SDLK_RCTRL, app::Input::SELECT);
+       input.MapKey(SDLK_LCTRL, app::Input::SHOULDER_RIGHT);
+       input.MapKey(SDLK_LSHIFT, app::Input::SHOULDER_LEFT);
+#else
        input.MapKey(SDLK_w, app::Input::PAD_UP);
        input.MapKey(SDLK_d, app::Input::PAD_RIGHT);
        input.MapKey(SDLK_s, app::Input::PAD_DOWN);
@@ -16,6 +31,7 @@ inline void MapKeys(app::Input &input) {
        input.MapKey(SDLK_SPACE, app::Input::SELECT);
        input.MapKey(SDLK_RSHIFT, app::Input::SHOULDER_RIGHT);
        input.MapKey(SDLK_LSHIFT, app::Input::SHOULDER_LEFT);
+#endif
 
        input.MapKey(SDLK_1, app::Input::DEBUG_1);
        input.MapKey(SDLK_2, app::Input::DEBUG_2);