-
Notifications
You must be signed in to change notification settings - Fork 22
/
render.h
116 lines (90 loc) · 1.49 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#define bool int
#define true 1
#define false 0
typedef struct
{
bool terminal_output;
bool neopixels_output;
bool fancy_lights;
bool colours;
} Settings;
typedef union {
struct
{
float r;
float g;
float b;
};
struct
{
float h;
float s;
float v;
};
} Colour;
typedef struct
{
wchar_t character;
Colour fg, bg;
int style;
} PrintableChar;
typedef struct {
long world_x;
long world_y;
long z;
long radius;
long width;
long height;
Colour rgb;
Colour hsv;
} Light;
typedef struct
{
int current_frame;
long width;
long height;
long x;
long y;
struct PixelLighting
{
Colour background_colour;
float background_colour_lightness;
int background_colour_set_on_frame;
float lightness;
int lightness_set_on_frame;
} *screen;
} LightingBuffer;
typedef struct
{
wchar_t *buffer;
size_t size;
size_t cur_pos;
} ScreenBuffer;
typedef struct
{
wchar_t character;
wchar_t character_left;
wchar_t character_right;
struct
{
Colour fg, bg;
int style;
} colours;
bool solid;
} BlockData;
typedef struct Object
{
int from_frame;
long x;
long y;
long hierarchy;
wchar_t key;
Colour rgb;
PyObject *model;
struct Object *next;
} Object;
#define OBJECTS_MAP_SIZE 512
typedef struct
{
Object objects[OBJECTS_MAP_SIZE];
} ObjectsMap;