-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphics.h
More file actions
46 lines (42 loc) · 772 Bytes
/
graphics.h
File metadata and controls
46 lines (42 loc) · 772 Bytes
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
typedef enum {
MODE_12 = 0x12,
MODE_13 = 0x13
} videomode;
typedef enum {
FILL_SCREEN,
DRAW_PIXEL,
DRAW_LINE,
DRAW_CIRCLE,
FILL_RECT,
DRAW_POLY,
FILL_POLY,
} drawtype;
typedef struct drawcall {
union {
struct {
int x, y;
union {
struct {
int width, height;
};
struct {
int r;
};
};
};
struct {
int x0, y0, x1, y1;
};
struct {
int* points;
int vertices;
};
};
int colour;
drawtype type;
} drawcall;
typedef struct drawcalls {
drawcall *array;
int index;
int size;
} drawcalls;