*/
#include "Paused.h"
-#include "../configs/paused_cfg.h"
+#include "../config/config.h"
/// ***** Constructors/Destructors *****
bool Paused::pushMe() const
{
- return CFG::pause();
+ return cfg::pause();
}
bool Paused::popMe() const
{
- return CFG::unPause();
+ return cfg::unPause();
}
SRCS += Effects/Gravity.cpp
SRCS += Effects/Screen.cpp
-SRCS += configs/paused_cfg.cpp
+SRCS += config/config.cpp
SRCS += input/inputManager.cpp
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "paused_cfg.h"
+#include "config.h"
#include "../input/inputManager.h"
/// ***** Private Method Headers *****
/// ***** Initializers/Cleaners *****
+void cfg::init()
+{
+ // TODO read in config files
+}
+void cfg::clean()
+{
+ // TODO save to config files?
+}
+
/// ***** Public Methods *****
-bool CFG::pause()
+bool cfg::pause()
{
return input::wasPressed(SDLK_p);
}
-bool CFG::unPause()
+bool cfg::unPause()
{
return input::wasPressed(SDLK_p);
}
+bool cfg::endGame()
+{
+ return input::wasReleased(SDLK_ESCAPE);
+}
+
/// ***** Private Methods *****
*/
-#ifndef PAUSED_CFG_H
-#define PAUSED_CFG_H
+#ifndef CONFIG_H
+#define CONFIG_H
/// ***** Header Methods *****
-namespace CFG
+namespace cfg
{
+ void init();
+ void clean();
+
bool pause();
bool unPause();
+
+ bool endGame();
}
-#endif // PAUSED_CFG_H
+#endif // CONFIG_H
#include "graphics/graphics.h"
#include "input/inputManager.h"
+#include "config/config.h"
/// ***** Private Method Headers *****
input::init();
+ cfg::init();
+
#ifdef DEBUGGING
cout << "Initialization Complete" << endl;
#endif
cout << "Cleaning up" << endl;
#endif
+ cfg::clean();
+
input::clean();
game::clean();
game::input();
- if(input::wasReleased(SDLK_ESCAPE))
+ if(cfg::endGame())
is_Running = false;
}