summary refs log tree commit diff stats
path: root/src/game.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-04 20:45:18 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-04 20:45:18 -0500
commit871943d6a90bdb92b3cc495d4d927199611f8c6b (patch)
tree9be125438747f7370cfa56e3f3e42f8c68982852 /src/game.h
parent138e0a8f83e82c6109bfc387ac7417d4f41711b4 (diff)
downloadtanetane-871943d6a90bdb92b3cc495d4d927199611f8c6b.tar.gz
tanetane-871943d6a90bdb92b3cc495d4d927199611f8c6b.tar.bz2
tanetane-871943d6a90bdb92b3cc495d4d927199611f8c6b.zip
Added text boxes
Text now reveals itself and scrolls! Yay! It even plays speaker beeps.

TODO: the arror indicating an A press is needed. Bullets on lines that need bullets. The header that says who the speaker is, if relevant.
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h8
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
16class Renderer;
14 17
15class Game { 18class Game {
16public: 19public:
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
71private: 78private:
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 */