From b53826079429939cdfbda073608cb85be8ba0738 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 7 Mar 2015 11:29:57 -0500 Subject: Created entity-component system Also tweaked the bloom flicker, tweaked the scanline texture, created a second test map, and created some currently unused sound effects. --- src/game.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/game.h (limited to 'src/game.h') diff --git a/src/game.h b/src/game.h new file mode 100644 index 0000000..69224dc --- /dev/null +++ b/src/game.h @@ -0,0 +1,43 @@ +#ifndef GAME_H +#define GAME_H + +#include "components.h" + +const int TILE_WIDTH = 8; +const int TILE_HEIGHT = 8; +const int GAME_WIDTH = 320; +const int GAME_HEIGHT = 200; +const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; +const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT; + +const int FRAMES_PER_SECOND = 60; +const double SECONDS_PER_FRAME = 1.0 / FRAMES_PER_SECOND; + +class Game { + public: + static Game& getInstance() + { + static Game instance; + + return instance; + } + + ~Game(); + void execute(); + void loadMap(Map* map); + void input(int key, int action); + + bool shouldQuit = false; + private: + Game(); + Game(Game const&); + void operator=(Game const&); + + GLFWwindow* window; + World* world; + World* nextWorld; + Map* m; + Map* m2; +}; + +#endif -- cgit 1.4.1