X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fconfig%2Fconfig.cpp;h=bb7ea7adda876509a8c718a1817623cbfbb9c1b4;hb=2b8199e7bd3d91d151cb54e1e7b04b1c8610ad9a;hp=09800767d7dff7359ad646e28e830cd759e8b382;hpb=1878e7c1f8cef670e740a8f63f48afcb98386cdf;p=physics.git diff --git a/src/config/config.cpp b/src/config/config.cpp index 0980076..bb7ea7a 100644 --- a/src/config/config.cpp +++ b/src/config/config.cpp @@ -27,11 +27,23 @@ /// ***** Private Method Headers ***** /// ***** Private Variables ***** +bool fPaused = false; + +bool fEndGame = false; + +bool fWellFollow= false; +bool fWellOn = false; +bool fWellOff = false; + +bool fShowFPS = true; +bool fShowUPS = true; + /// ***** Initializers/Cleaners ***** void cfg::init() { - readConfigs(NULL); + key::init(); + readConfigs(); // TODO read in config files } @@ -42,31 +54,47 @@ void cfg::clean() /// ***** Public Methods ***** -bool cfg::pause() +void cfg::handleInput() { - return input::wasPressed(key::pause); + fPaused = input::wasPressed (key::pause) ? !fPaused : fPaused; + + fEndGame = input::wasReleased(key::end); + + fWellFollow = input::isPressed (key::follow); + fWellOn = input::wasPressed (key::well); + fWellOff = input::wasReleased(key::well); } -bool cfg::unPause() + +bool cfg::paused() { - return input::wasPressed(key::pause); + return fPaused; } bool cfg::endGame() { - return input::wasReleased(key::end); + return fEndGame; } bool cfg::mouseWellFollow() { - return input::isPressed(key::follow); + return fWellFollow; } bool cfg::mouseWellOn() { - return input::wasPressed(key::well); + return fWellOn; } bool cfg::mouseWellOff() { - return input::wasReleased(key::well); + return fWellOff; +} + +bool cfg::showFPS() +{ + return fShowFPS; +} +bool cfg::showUPS() +{ + return fShowUPS; } /// ***** Private Methods *****