aboutsummaryrefslogtreecommitdiff
path: root/graphics.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics.hpp')
-rw-r--r--graphics.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics.hpp b/graphics.hpp
index 75d273c..f9dc4f7 100644
--- a/graphics.hpp
+++ b/graphics.hpp
@@ -2,8 +2,11 @@
#define __GRAPHIC_H__
#include <string>
+#include <deque>
#include <SDL2/SDL.h>
+typedef std::pair<SDL_Rect, SDL_Rect> PipePair;
+
class Graphics
{
public:
@@ -15,7 +18,15 @@ class Graphics
SDL_Renderer *renderer;
SDL_Window *window;
bool running;
+ SDL_Rect bird;
+ std::deque<SDL_Rect> pipes;
+ void update();
+ void draw_bird();
+ void draw_pipes();
+ bool is_gameover();
+ void handle_pipes();
+ PipePair generate_pipe_pair();
void event_handler();
void error_quit(std::string msg);
};