reworked ups/fps/paused logic
[physics.git] / src / config / config.cpp
index 1e15c69..69406bc 100644 (file)
 /// ***** Private Method Headers *****
 /// ***** Private Variables *****
 
+bool fPaused = false;
+
 /// ***** Initializers/Cleaners *****
 
 void cfg::init()
 {
-    readConfigs(NULL);
-
-    // TODO read in config files
-
     key::init();
+    readConfigs();
 
-    cout << &key::end << endl;
+    // TODO read in config files
 }
 void cfg::clean()
 {
     // TODO save to config files?
-
-    key::clean();
 }
 
 /// ***** Public Methods *****
 
-bool cfg::pause()
+bool cfg::paused()
 {
-    return input::wasPressed(key::pause);
-}
-bool cfg::unPause()
-{
-    return input::wasPressed(key::pause);
+    fPaused = input::wasPressed(key::pause) ? !fPaused : fPaused;
+    return fPaused;
 }
 
 bool cfg::endGame()
@@ -75,4 +69,13 @@ bool cfg::mouseWellOff()
     return input::wasReleased(key::well);
 }
 
+bool cfg::showFPS()
+{
+    return true;
+}
+bool cfg::showUPS()
+{
+    return true;
+}
+
 /// ***** Private Methods *****