fixed up the key mapping system a little ... still does comparisons wrong ...
[physics.git] / src / config / keys.cpp
index 6ac87bb..e6eebf5 100644 (file)
 #include <SDL/SDL.h>
 
 /// ***** Definitions of the extern keys *****
-SDLKey key::pause = SDLK_p;
-SDLKey key::end = SDLK_ESCAPE;
-SDLKey key::follow = SDLK_f;
-SDLKey key::well = SDLK_SPACE;
+SDLKey key::pause    = SDLK_p;
+SDLKey key::end      = SDLK_ESCAPE;
+SDLKey key::follow   = SDLK_f;
+SDLKey key::well     = SDLK_SPACE;
+
+key::inputMap key::sdlMap;
+
+void key::init()
+{
+    key::sdlMap["pause"]     = &key::pause;
+    key::sdlMap["end"]       = &key::end;
+    key::sdlMap["follow"]    = &key::follow;
+    key::sdlMap["well"]      = &key::well;
+}