projects
/
physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed src so the libpg headers are now used
[physics.git]
/
src
/
config
/
config.cpp
diff --git
a/src/config/config.cpp
b/src/config/config.cpp
index
3b694ba
..
88768f3
100644
(file)
--- a/
src/config/config.cpp
+++ b/
src/config/config.cpp
@@
-16,17
+16,29
@@
*/
#include "config.h"
*/
#include "config.h"
-#include "../debug.h"
+
+#include <pg/debug.h>
#include <SDL/SDL.h>
#include "keys.h"
#include "reader.h"
#include <SDL/SDL.h>
#include "keys.h"
#include "reader.h"
-#include "
../
input/inputManager.h"
+#include "input/inputManager.h"
/// ***** Private Method Headers *****
/// ***** Private Variables *****
/// ***** 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()
/// ***** Initializers/Cleaners *****
void cfg::init()
@@
-43,31
+55,47
@@
void cfg::clean()
/// ***** Public Methods *****
/// ***** 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()
{
}
bool cfg::endGame()
{
- return
input::wasReleased(key::end)
;
+ return
fEndGame
;
}
bool cfg::mouseWellFollow()
{
}
bool cfg::mouseWellFollow()
{
- return
input::isPressed(key::follow)
;
+ return
fWellFollow
;
}
bool cfg::mouseWellOn()
{
}
bool cfg::mouseWellOn()
{
- return
input::wasPressed(key::well)
;
+ return
fWellOn
;
}
bool cfg::mouseWellOff()
{
}
bool cfg::mouseWellOff()
{
- return input::wasReleased(key::well);
+ return fWellOff;
+}
+
+bool cfg::showFPS()
+{
+ return fShowFPS;
+}
+bool cfg::showUPS()
+{
+ return fShowUPS;
}
/// ***** Private Methods *****
}
/// ***** Private Methods *****