blob: 96091406f88f8af231c98aa30b546e86f4d4c660 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|