X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fconfig%2Fconfig.cpp;h=7d71e8a9651d19f5aa2b2c5c78be63e69c91a2dd;hb=b552aa3b48a0b2a3e77523dfa0454265748bcf94;hp=895c1d964cc38101830e68733a59eb661ca3254a;hpb=a860c0c739f42bb52b3ad482cec6a57b5484fd71;p=physics.git diff --git a/src/config/config.cpp b/src/config/config.cpp index 895c1d9..7d71e8a 100644 --- a/src/config/config.cpp +++ b/src/config/config.cpp @@ -16,6 +16,11 @@ */ #include "config.h" + +#include +#include "keys.h" + +#include "reader.h" #include "../input/inputManager.h" /// ***** Private Method Headers ***** @@ -25,11 +30,17 @@ void cfg::init() { + readConfigs(NULL); + // TODO read in config files + + key::init(); } void cfg::clean() { // TODO save to config files? + + key::clean(); } /// ***** Public Methods ***** @@ -48,9 +59,17 @@ bool cfg::endGame() return input::wasReleased(SDLK_ESCAPE); } +bool cfg::mouseWellFollow() +{ + return input::isPressed(SDLK_f); +} bool cfg::mouseWellOn() { - return input::isPressed(SDLK_SPACE); + return input::wasPressed(SDLK_SPACE); +} +bool cfg::mouseWellOff() +{ + return input::wasReleased(SDLK_SPACE); } /// ***** Private Methods *****