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.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/crepe/SDLApp.hpp b/src/crepe/SDLApp.hpp
new file mode 100644
index 0000000..92a4e27
--- /dev/null
+++ b/src/crepe/SDLApp.hpp
@@ -0,0 +1,25 @@
+#ifndef SDLAPP_HPP
+#define SDLAPP_HPP
+
+#include <SDL2/SDL.h>
+
+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();
+
+private:
+ int windowWidth;
+ int windowHeight;
+ SDL_Window* window;
+ SDL_Renderer* renderer;
+};
+
+#endif