diff options
| author | fschildt <florian.schildt@protonmail.com> | 2025-10-06 09:25:04 +0200 |
|---|---|---|
| committer | fschildt <florian.schildt@protonmail.com> | 2025-10-06 09:25:04 +0200 |
| commit | 606d028dac5118329e7561af33b15988db84465f (patch) | |
| tree | 8a5b92b51a88714fee71d7f908283426f70b7dc1 /src/games/Game.hpp | |
| parent | 7d9500d27fc91356c580e365351ff6e1bc1c95e1 (diff) | |
make everything prettier
Diffstat (limited to 'src/games/Game.hpp')
| -rw-r--r-- | src/games/Game.hpp | 27 |
1 files changed, 21 insertions, 6 deletions
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 <vector> -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<Game> Select(GameType type); @@ -27,5 +31,16 @@ public: Game() = default; virtual ~Game() = default; virtual bool Update(std::vector<SDL_Event>& 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()}; }; |
