diff options
Diffstat (limited to 'src/game.h')
-rw-r--r-- | src/game.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/game.h b/src/game.h index f8e4b0d..36398bc 100644 --- a/src/game.h +++ b/src/game.h | |||
@@ -10,17 +10,17 @@ | |||
10 | #include "map.h" | 10 | #include "map.h" |
11 | #include "consts.h" | 11 | #include "consts.h" |
12 | #include "system.h" | 12 | #include "system.h" |
13 | 13 | #include "mixer.h" | |
14 | struct Input { | ||
15 | bool left = false; | ||
16 | bool right = false; | ||
17 | bool up = false; | ||
18 | bool down = false; | ||
19 | }; | ||
20 | 14 | ||
21 | class Game { | 15 | class Game { |
22 | public: | 16 | public: |
23 | 17 | ||
18 | Mixer& getMixer() { return mixer_; } | ||
19 | |||
20 | bool shouldQuit() const { return shouldQuit_; } | ||
21 | |||
22 | void quit() { shouldQuit_ = true; } | ||
23 | |||
24 | template <typename T> | 24 | template <typename T> |
25 | void emplaceSystem() { | 25 | void emplaceSystem() { |
26 | systems_.push_back(std::make_unique<T>(*this)); | 26 | systems_.push_back(std::make_unique<T>(*this)); |
@@ -70,6 +70,9 @@ public: | |||
70 | 70 | ||
71 | private: | 71 | private: |
72 | 72 | ||
73 | Mixer mixer_; | ||
74 | bool shouldQuit_ = false; | ||
75 | |||
73 | std::list<std::unique_ptr<System>> systems_; | 76 | std::list<std::unique_ptr<System>> systems_; |
74 | std::map<SystemKey, System*> systemByKey_; | 77 | std::map<SystemKey, System*> systemByKey_; |
75 | 78 | ||