aboutsummaryrefslogtreecommitdiff
path: root/src/games/breakout/Breakout.hpp
diff options
context:
space:
mode:
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;
+};
+