diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-11-09 11:11:23 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-11-09 11:11:23 +0100 |
| commit | cfebccb7a5a4e19090f2259efd18a8e97b318c96 (patch) | |
| tree | 395ecbaafdd385691c429022ad1b3c88562d140b /graphics.hpp | |
| download | flappybird-cfebccb7a5a4e19090f2259efd18a8e97b318c96.tar.gz flappybird-cfebccb7a5a4e19090f2259efd18a8e97b318c96.tar.bz2 flappybird-cfebccb7a5a4e19090f2259efd18a8e97b318c96.zip | |
Boilerplate SDL class
Diffstat (limited to 'graphics.hpp')
| -rw-r--r-- | graphics.hpp | 23 |
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 |
