aboutsummaryrefslogtreecommitdiff
path: root/graphics.hpp
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-11-09 11:11:23 +0100
committerCharles <sircharlesaze@gmail.com>2019-11-09 11:11:23 +0100
commitcfebccb7a5a4e19090f2259efd18a8e97b318c96 (patch)
tree395ecbaafdd385691c429022ad1b3c88562d140b /graphics.hpp
downloadflappybird-cfebccb7a5a4e19090f2259efd18a8e97b318c96.tar.gz
flappybird-cfebccb7a5a4e19090f2259efd18a8e97b318c96.tar.bz2
flappybird-cfebccb7a5a4e19090f2259efd18a8e97b318c96.zip
Boilerplate SDL class
Diffstat (limited to 'graphics.hpp')
-rw-r--r--graphics.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphics.hpp b/graphics.hpp
new file mode 100644
index 0000000..75d273c
--- /dev/null
+++ b/graphics.hpp
@@ -0,0 +1,23 @@
+#ifndef __GRAPHIC_H__
+#define __GRAPHIC_H__
+
+#include <string>
+#include <SDL2/SDL.h>
+
+class Graphics
+{
+ public:
+ Graphics();
+ void run();
+ ~Graphics();
+
+ private:
+ SDL_Renderer *renderer;
+ SDL_Window *window;
+ bool running;
+
+ void event_handler();
+ void error_quit(std::string msg);
+};
+
+#endif