aboutsummaryrefslogtreecommitdiff
path: root/src/games/breakout/Breakout.hpp
diff options
context:
space:
mode:
authorfschildt <florian.schildt@protonmail.com>2025-10-01 14:08:24 +0200
committerfschildt <florian.schildt@protonmail.com>2025-10-01 14:09:13 +0200
commitc775ca6133d93ed97359a6a50bd94a5563c740de (patch)
tree9d3efb1c7e7538ff9d5cae408d2c29f9dd3daeab /src/games/breakout/Breakout.hpp
parent41c2e2ecfcccf62b3c646980dd283848e33a8134 (diff)
general refactoring, prepare breakout game
Diffstat (limited to 'src/games/breakout/Breakout.hpp')
-rw-r--r--src/games/breakout/Breakout.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/games/breakout/Breakout.hpp b/src/games/breakout/Breakout.hpp
new file mode 100644
index 0000000..9f2a0ef
--- /dev/null
+++ b/src/games/breakout/Breakout.hpp
@@ -0,0 +1,38 @@
+#pragma once
+
+#include <common/math.hpp>
+#include <common/shapes.hpp>
+#include <games/Game.hpp>
+
+
+struct Ball {
+ V3F32 pos;
+ float radius;
+};
+
+
+class Breakout : public Game {
+ enum GameStatus {
+ resume,
+ pause,
+ exit
+ };
+
+public:
+ Breakout() = default;
+ bool Update(std::vector<SDL_Event> &events) override;
+
+private:
+ void ProcessEventDuringPause(SDL_Event& event);
+ void ProcessEventDuringResume(SDL_Event& event);
+
+ void Draw();
+ void DrawPauseMenu();
+
+
+private:
+ GameStatus m_status;
+
+ Circle m_circle;
+};
+