From cfebccb7a5a4e19090f2259efd18a8e97b318c96 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 9 Nov 2019 11:11:23 +0100 Subject: Boilerplate SDL class --- graphics.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 graphics.hpp (limited to 'graphics.hpp') 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 +#include + +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 -- cgit