aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/SDLApp.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/SDLApp.hpp')
-rw-r--r--src/crepe/SDLApp.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/crepe/SDLApp.hpp b/src/crepe/SDLApp.hpp
new file mode 100644
index 0000000..f95d4bc
--- /dev/null
+++ b/src/crepe/SDLApp.hpp
@@ -0,0 +1,28 @@
+#ifndef SDLAPP_HPP
+#define SDLAPP_HPP
+
+#include <SDL2/SDL.h>
+#include "Particle.hpp"
+#include "ParticleEmitter.hpp"
+
+class SDLApp {
+public:
+ SDLApp(int windowWidth, int windowHeight);
+ ~SDLApp();
+
+ bool initialize();
+ void handleEvents(bool& running);
+ void clearScreen();
+ void presentScreen();
+ void drawSquare(int x, int y, int size);
+ void cleanUp();
+ void drawParticles(const std::vector<ParticleEmitter>& emitters);
+ void drawMultipleSquares(const std::vector<SDL_Rect>& squares);
+private:
+ int windowWidth;
+ int windowHeight;
+ SDL_Window* window;
+ SDL_Renderer* renderer;
+};
+
+#endif