aboutsummaryrefslogtreecommitdiff
path: root/src/games/Game.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/games/Game.hpp')
-rw-r--r--src/games/Game.hpp27
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()};
};