-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender.h
45 lines (32 loc) · 909 Bytes
/
render.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
//
// Created by human on 12/13/21.
//
#ifndef CLIENT_RENDER_H
#define CLIENT_RENDER_H
// Dimensions for the drawn grid (should be GRIDSIZE * texture dimensions)
#define GRID_DRAW_WIDTH 640
#define GRID_DRAW_HEIGHT 640
#define WINDOW_WIDTH GRID_DRAW_WIDTH
#define WINDOW_HEIGHT (HEADER_HEIGHT + GRID_DRAW_HEIGHT)
// Header displays current score
#define HEADER_HEIGHT 50
// Number of cells vertically/horizontally in the grid
#define GRIDSIZE 10
#include <stdbool.h>
#include "types.h"
typedef struct {
GameData gd;
int thisPlayer;
bool shouldExit;
TILETYPE (*grid)[GRIDSIZE];
PlayerStat* other_player;
} RenderData;
typedef struct {
void (*move_left)(void);
void (*move_right)(void);
void (*move_top)(void);
void (*move_bottom)(void);
void (*end_game)(void);
}MoveHooks;
void render(RenderData *render_data,MoveHooks moveHooks);
#endif //CLIENT_RENDER_H