summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
Diffstat (limited to 'display.h')
-rwxr-xr-xdisplay.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/display.h b/display.h
new file mode 100755
index 0000000..9609140
--- /dev/null
+++ b/display.h
@@ -0,0 +1,34 @@
+#ifndef DISPLAY_H_INCLUDED
+#define DISPLAY_H_INCLUDED
+
+#include <string>
+#include <SDL.h>
+#include <SDL_image.h>
+#include <SDL_ttf.h>
+
+#define STATE_INIT 0
+#define STATE_MENU 1
+#define STATE_PLAYING 2
+
+
+SDL_Texture* loadTexture(const std::string &file, SDL_Renderer *ren);
+void renderTexture(SDL_Texture *tex, SDL_Renderer *ren, float x, float y);
+
+struct display
+{
+ int height;
+ int width;
+ const char * name;
+ SDL_Renderer *renderer;
+ SDL_Window *window;
+ TTF_Font *font;
+
+ int state;
+
+ display(): width(600), height(600), name("MaiMai"), state(STATE_INIT) {}
+
+};
+
+extern display screen;
+
+#endif // DISPLAY_H_INCLUDED