key control changed to new system
[physics.git] / src / config / config.cpp
index ae569fa..2df8b74 100644 (file)
  */
 
 #include "config.h"
+
+#include <SDL/SDL.h>
+#include "keys.h"
+
+#include "reader.h"
 #include "../input/inputManager.h"
 
 /// ***** Private Method Headers *****
 
 void cfg::init()
 {
+    readConfigs(NULL);
+
     // TODO read in config files
+
+    key::init();
 }
 void cfg::clean()
 {
     // TODO save to config files?
+
+    key::clean();
 }
 
 /// ***** Public Methods *****
 
 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(key::follow);
+}
+bool cfg::mouseWellOn()
+{
+    return input::wasPressed(key::well);
+}
+bool cfg::mouseWellOff()
+{
+    return input::wasReleased(key::well);
 }
 
 /// ***** Private Methods *****