From 606d028dac5118329e7561af33b15988db84465f Mon Sep 17 00:00:00 2001 From: fschildt Date: Mon, 6 Oct 2025 09:25:04 +0200 Subject: make everything prettier --- src/games/Game.hpp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'src/games/Game.hpp') diff --git a/src/games/Game.hpp b/src/games/Game.hpp index 1307e79..94d50cb 100644 --- a/src/games/Game.hpp +++ b/src/games/Game.hpp @@ -8,17 +8,21 @@ #include -struct SDL_Window; - - class Game { public: enum GameType { no_game, - tetris, - snake, minesweeper, - breakout + snake, + tetris + }; + + enum GameStatus { + game_starting, + game_resuming, + game_over, + game_paused, + game_exit }; static std::unique_ptr Select(GameType type); @@ -27,5 +31,16 @@ public: Game() = default; virtual ~Game() = default; virtual bool Update(std::vector& events) = 0; + + +protected: + void DrawGameOverMenu(); + void DrawGamePausedMenu(); + + float ProcessDt(); + + GameStatus m_game_status {game_starting}; + float m_dt_remaining_seconds {0.0f}; + uint64_t m_tlast_milliseconds {SDL_GetTicks()}; }; -- cgit v1.2.3