aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/game.hpp11
-rw-r--r--include/graphics.hpp32
2 files changed, 43 insertions, 0 deletions
diff --git a/include/game.hpp b/include/game.hpp
new file mode 100644
index 0000000..017d21b
--- /dev/null
+++ b/include/game.hpp
@@ -0,0 +1,11 @@
+#ifndef GAME_HPP
+# define GAME_HPP
+
+class Game
+{
+public:
+ Game();
+
+};
+
+#endif
diff --git a/include/graphics.hpp b/include/graphics.hpp
new file mode 100644
index 0000000..ef0c813
--- /dev/null
+++ b/include/graphics.hpp
@@ -0,0 +1,32 @@
+#ifndef GRAPHICS_HPP
+# define GRAPHICS_HPP
+
+#include <iostream>
+#include <string>
+#include <SDL2/SDL.h>
+#include "game.hpp"
+
+class Graphics
+{
+ public:
+ Graphics(Game &game, std::string title, int width, int height);
+ ~Graphics();
+
+ void update();
+ bool isRunning() const;
+
+ private:
+ bool m_running;
+ Game &m_game;
+ std::string m_title;
+ int m_width;
+ int m_height;
+ SDL_Renderer *m_renderer;
+ SDL_Window *m_window;
+
+ void drawGame();
+ void handleEvent();
+ void error() const;
+};
+
+#endif