summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-08-18 14:13:40 +0200
committerpiernov <piernov@piernov.org>2016-08-18 14:13:40 +0200
commit823a82611d37e618a4734ea480fab4c60b73f5b7 (patch)
treead26261abe2c2cf976f3ca38c00f0fefb4373fbd /display.h
downloadMaiMai-C++-master.tar.gz
MaiMai-C++-master.tar.bz2
MaiMai-C++-master.tar.xz
MaiMai-C++-master.zip
Initial ImportHEADmaster
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