forked from Raysh454/SnakeGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.h
54 lines (48 loc) · 806 Bytes
/
structs.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
typedef struct {
SDL_Renderer *renderer;
SDL_Window *window;
} App;
typedef struct {
int x;
int y;
} mousePos;
typedef struct Snake{
int x;
int y;
int w;
int h;
double angle;
int dx;
int dy;
int turn;
SDL_Texture *texture;
struct Snake *next;
struct Snake *prev;
} Snake;
typedef struct {
int x;
int y;
int w;
int h;
SDL_Texture *texture;
} Apple;
typedef struct {
SDL_Texture *head;
SDL_Texture *body;
SDL_Texture *tail;
SDL_Texture *turn;
SDL_Texture *apple;
} Textures;
typedef struct {
SDL_Rect title;
SDL_Rect play;
SDL_Rect score;
SDL_Rect quit;
} Buttons;
mousePos mouse;
App app;
Textures textures;
Apple *apple = NULL;
Snake *snake = NULL;
Snake *turns = NULL;
Buttons buttons;