From 871943d6a90bdb92b3cc495d4d927199611f8c6b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 4 Feb 2021 20:45:18 -0500 Subject: 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. --- src/game.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/game.h') 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 @@ #include "consts.h" #include "system.h" #include "mixer.h" +#include "font.h" + +class Renderer; class Game { public: + explicit Game(Renderer& renderer) : font_("../res/font.txt", renderer) {} + Mixer& getMixer() { return mixer_; } bool shouldQuit() const { return shouldQuit_; } @@ -68,6 +73,8 @@ public: const Map& getMap() const { return *map_; } + const Font& getFont() const { return font_; } + private: Mixer mixer_; @@ -79,6 +86,7 @@ private: std::vector spriteIds_; std::vector sprites_; std::unique_ptr map_; + Font font_; }; #endif /* end of include guard: GAME_H_E6F1396E */ -- cgit 1.4.1