diff options
Diffstat (limited to 'src/game.h')
| -rw-r--r-- | src/game.h | 8 |
1 files changed, 8 insertions, 0 deletions
| diff --git a/src/game.h b/src/game.h index 36398bc..2f1149d 100644 --- a/src/game.h +++ b/src/game.h | |||
| @@ -11,10 +11,15 @@ | |||
| 11 | #include "consts.h" | 11 | #include "consts.h" |
| 12 | #include "system.h" | 12 | #include "system.h" |
| 13 | #include "mixer.h" | 13 | #include "mixer.h" |
| 14 | #include "font.h" | ||
| 15 | |||
| 16 | class Renderer; | ||
| 14 | 17 | ||
| 15 | class Game { | 18 | class Game { |
| 16 | public: | 19 | public: |
| 17 | 20 | ||
| 21 | explicit Game(Renderer& renderer) : font_("../res/font.txt", renderer) {} | ||
| 22 | |||
| 18 | Mixer& getMixer() { return mixer_; } | 23 | Mixer& getMixer() { return mixer_; } |
| 19 | 24 | ||
| 20 | bool shouldQuit() const { return shouldQuit_; } | 25 | bool shouldQuit() const { return shouldQuit_; } |
| @@ -68,6 +73,8 @@ public: | |||
| 68 | 73 | ||
| 69 | const Map& getMap() const { return *map_; } | 74 | const Map& getMap() const { return *map_; } |
| 70 | 75 | ||
| 76 | const Font& getFont() const { return font_; } | ||
| 77 | |||
| 71 | private: | 78 | private: |
| 72 | 79 | ||
| 73 | Mixer mixer_; | 80 | Mixer mixer_; |
| @@ -79,6 +86,7 @@ private: | |||
| 79 | std::vector<int> spriteIds_; | 86 | std::vector<int> spriteIds_; |
| 80 | std::vector<Sprite> sprites_; | 87 | std::vector<Sprite> sprites_; |
| 81 | std::unique_ptr<Map> map_; | 88 | std::unique_ptr<Map> map_; |
| 89 | Font font_; | ||
| 82 | }; | 90 | }; |
| 83 | 91 | ||
| 84 | #endif /* end of include guard: GAME_H_E6F1396E */ | 92 | #endif /* end of include guard: GAME_H_E6F1396E */ |
