-
Notifications
You must be signed in to change notification settings - Fork 1
/
cells.h
41 lines (32 loc) · 590 Bytes
/
cells.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
enum CellDisplayType
{
DISP_TYPE_ENCLOSED,
DISP_TYPE_SINGLE,
DISP_TYPE_L,
DISP_TYPE_STRAIGHT,
DISP_TYPE_T,
DISP_TYPE_CROSS,
N_DISP_TYPES
};
enum CellConnectedState
{
WALKABLE,
UNWALKABLE,
UNCONNECTED
};
struct CellBitmaps
{
Bitmap walkable[N_DISP_TYPES];
Bitmap unwalkable[N_DISP_TYPES];
Bitmap arrow;
Bitmap splitter;
};
struct CellDisplay
{
Bitmap *bitmap;
Bitmap *bitmap_overlay;
u32 rotate;
vec4 color;
};
void
draw_cell(CellType type, vec2 world_pos, u32 cell_radius, b32 hovered, CellBitmaps *cell_bitmaps, CellDisplay *cell_display = 0);