summary refs log tree commit diff stats
path: root/src/game.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-07 11:29:57 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-07 11:29:57 -0500
commitb53826079429939cdfbda073608cb85be8ba0738 (patch)
tree3c40de4658f0cea01cd3938f07fe82788ef3dd01 /src/game.h
parent0751446e1d069263d25abcff49a32a380231709a (diff)
downloadtherapy-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.h43
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
6const int TILE_WIDTH = 8;
7const int TILE_HEIGHT = 8;
8const int GAME_WIDTH = 320;
9const int GAME_HEIGHT = 200;
10const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH;
11const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT;
12
13const int FRAMES_PER_SECOND = 60;
14const double SECONDS_PER_FRAME = 1.0 / FRAMES_PER_SECOND;
15
16class 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