X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fconfig%2Fconfig.cpp;h=3b694ba39154fc725ede0853073e838edca570eb;hb=ca2d526eb092a673f37a906020f1f32d91a608d3;hp=7d71e8a9651d19f5aa2b2c5c78be63e69c91a2dd;hpb=b552aa3b48a0b2a3e77523dfa0454265748bcf94;p=physics.git diff --git a/src/config/config.cpp b/src/config/config.cpp index 7d71e8a..3b694ba 100644 --- a/src/config/config.cpp +++ b/src/config/config.cpp @@ -16,6 +16,7 @@ */ #include "config.h" +#include "../debug.h" #include #include "keys.h" @@ -30,46 +31,43 @@ void cfg::init() { - readConfigs(NULL); + key::init(); + readConfigs(); // 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(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 *****