renamed libpg to libbear
[physics.git] / src / config / keys.cpp
index 6cd3cfd..fd7be9e 100644 (file)
  */
 
 #include "keys.h"
-#include "../debug.h"
 
-#include <SDL/SDL.h>
-
-/// ***** Private Method Headers *****
-/// ***** Private Variables *****
+#include <bear/debug.h>
+using namespace bear;
 
-/// ***** Initializers/Cleaners *****
-void key::init()
-{
-    pause = SDLK_PAUSE;
-    end = SDLK_ESCAPE;
+#include <SDL/SDL.h>
 
-    follow = SDLK_f;
+/// ***** 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;
 
-    well = SDLK_SPACE;
-}
+key::inputMap key::sdlMap;
 
-void key::clean()
+void key::init()
 {
+    key::sdlMap["pause"]     = &key::pause;
+    key::sdlMap["end"]       = &key::end;
+    key::sdlMap["follow"]    = &key::follow;
+    key::sdlMap["well"]      = &key::well;
 }