diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-07 11:29:57 -0500 | 
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-07 11:29:57 -0500 | 
| commit | b53826079429939cdfbda073608cb85be8ba0738 (patch) | |
| tree | 3c40de4658f0cea01cd3938f07fe82788ef3dd01 /src/game.h | |
| parent | 0751446e1d069263d25abcff49a32a380231709a (diff) | |
| download | therapy-b53826079429939cdfbda073608cb85be8ba0738.tar.gz therapy-b53826079429939cdfbda073608cb85be8ba0738.tar.bz2 therapy-b53826079429939cdfbda073608cb85be8ba0738.zip | |
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.
Diffstat (limited to 'src/game.h')
| -rw-r--r-- | src/game.h | 43 | 
1 files changed, 43 insertions, 0 deletions
| 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 @@ | |||
| 1 | #ifndef GAME_H | ||
| 2 | #define GAME_H | ||
| 3 | |||
| 4 | #include "components.h" | ||
| 5 | |||
| 6 | const int TILE_WIDTH = 8; | ||
| 7 | const int TILE_HEIGHT = 8; | ||
| 8 | const int GAME_WIDTH = 320; | ||
| 9 | const int GAME_HEIGHT = 200; | ||
| 10 | const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; | ||
| 11 | const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT; | ||
| 12 | |||
| 13 | const int FRAMES_PER_SECOND = 60; | ||
| 14 | const double SECONDS_PER_FRAME = 1.0 / FRAMES_PER_SECOND; | ||
| 15 | |||
| 16 | class Game { | ||
| 17 | public: | ||
| 18 | static Game& getInstance() | ||
| 19 | { | ||
| 20 | static Game instance; | ||
| 21 | |||
| 22 | return instance; | ||
| 23 | } | ||
| 24 | |||
| 25 | ~Game(); | ||
| 26 | void execute(); | ||
| 27 | void loadMap(Map* map); | ||
| 28 | void input(int key, int action); | ||
| 29 | |||
| 30 | bool shouldQuit = false; | ||
| 31 | private: | ||
| 32 | Game(); | ||
| 33 | Game(Game const&); | ||
| 34 | void operator=(Game const&); | ||
| 35 | |||
| 36 | GLFWwindow* window; | ||
| 37 | World* world; | ||
| 38 | World* nextWorld; | ||
| 39 | Map* m; | ||
| 40 | Map* m2; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif | ||
