fixed up the key mapping system a little ... still does comparisons wrong ...
[physics.git] / src / config / config.cpp
index 9aa6f86..3b694ba 100644 (file)
  */
 
 #include "config.h"
+#include "../debug.h"
+
+#include <SDL/SDL.h>
+#include "keys.h"
 
 #include "reader.h"
 #include "../input/inputManager.h"
@@ -27,7 +31,9 @@
 
 void cfg::init()
 {
-    readConfigs(NULL);
+    key::init();
+    readConfigs();
+
     // TODO read in config files
 }
 void cfg::clean()
@@ -39,29 +45,29 @@ void cfg::clean()
 
 bool cfg::pause()
 {
-    return input::wasPressed(SDLK_p);
+    return input::wasPressed(key::pause);
 }
 bool cfg::unPause()
 {
-    return input::wasPressed(SDLK_p);
+    return input::wasPressed(key::pause);
 }
 
 bool cfg::endGame()
 {
-    return input::wasReleased(SDLK_ESCAPE);
+    return input::wasReleased(key::end);
 }
 
 bool cfg::mouseWellFollow()
 {
-    return input::isPressed(SDLK_f);
+    return input::isPressed(key::follow);
 }
 bool cfg::mouseWellOn()
 {
-    return input::wasPressed(SDLK_SPACE);
+    return input::wasPressed(key::well);
 }
 bool cfg::mouseWellOff()
 {
-    return input::wasReleased(SDLK_SPACE);
+    return input::wasReleased(key::well);
 }
 
 /// ***** Private Methods *****