diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-18 18:23:54 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-18 18:23:54 -0400 |
commit | 103587c2d5f9deb20e549a86cdf5023b429cc6a1 (patch) | |
tree | f1e2fc60b86395e0cc40646ad1e4396a835b682f /src/game.h | |
parent | 2ec163612042bfa5e4e1bf220b489506f7039677 (diff) | |
download | therapy-103587c2d5f9deb20e549a86cdf5023b429cc6a1.tar.gz therapy-103587c2d5f9deb20e549a86cdf5023b429cc6a1.tar.bz2 therapy-103587c2d5f9deb20e549a86cdf5023b429cc6a1.zip |
Wrote an XML Schema describing maps file and also changed the spec a bit
Diffstat (limited to 'src/game.h')
-rw-r--r-- | src/game.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game.h b/src/game.h index 3f0fcc8..dd4b2f7 100644 --- a/src/game.h +++ b/src/game.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <list> | 6 | #include <list> |
7 | #include <map> | 7 | #include <map> |
8 | #include "map.h" | 8 | #include "map.h" |
9 | #include "world.h" | ||
9 | 10 | ||
10 | class Entity; | 11 | class Entity; |
11 | struct GLFWwindow; | 12 | struct GLFWwindow; |
@@ -24,14 +25,11 @@ class Game { | |||
24 | void saveGame(); | 25 | void saveGame(); |
25 | void schedule(double time, std::function<void ()> callback); | 26 | void schedule(double time, std::function<void ()> callback); |
26 | void playerDie(); | 27 | void playerDie(); |
27 | const Map& getMap(int id) const; | 28 | const World& getWorld() const; |
28 | 29 | ||
29 | private: | 30 | private: |
30 | friend void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods); | 31 | friend void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods); |
31 | 32 | ||
32 | std::map<int, Map> maps; | ||
33 | int startMap; | ||
34 | std::pair<int, int> startPos; | ||
35 | std::list<std::shared_ptr<Entity>> entities; | 33 | std::list<std::shared_ptr<Entity>> entities; |
36 | std::list<std::shared_ptr<Entity>> nextEntities; | 34 | std::list<std::shared_ptr<Entity>> nextEntities; |
37 | std::pair<double, double> nextPosition; | 35 | std::pair<double, double> nextPosition; |
@@ -41,6 +39,7 @@ class Game { | |||
41 | Savefile save; | 39 | Savefile save; |
42 | std::list<std::pair<double, std::function<void ()>>> scheduled; | 40 | std::list<std::pair<double, std::function<void ()>>> scheduled; |
43 | bool shouldQuit = false; | 41 | bool shouldQuit = false; |
42 | World world; | ||
44 | }; | 43 | }; |
45 | 44 | ||
46 | #endif | 45 | #endif |