Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/src/pc/colors.c
7857 views
1
#include "game/settings.h"
2
3
#define DEF_COLOR_LIGHT(name, r, g, b) \
4
name[0][0] = r; name[0][1] = g; name[0][2] = b;
5
#define DEF_COLOR_DARK(name, r, g, b) \
6
name[1][0] = r; name[1][1] = g; name[1][2] = b;
7
8
#define DEF_COLOR_RED(name) \
9
name[0][0] = 255; name[0][1] = 39; name[0][2] = 0; \
10
name[1][0] = 111; name[1][1] = 0; name[1][2] = 23;
11
#define DEF_COLOR_BLUE(name) \
12
name[0][0] = 0; name[0][1] = 95; name[0][2] = 255; \
13
name[1][0] = 23; name[1][1] = 0; name[1][2] = 127;
14
#define DEF_COLOR_WHITE(name) \
15
name[0][0] = 255; name[0][1] = 255; name[0][2] = 255; \
16
name[1][0] = 107; name[1][1] = 111; name[1][2] = 127;
17
#define DEF_COLOR_SHOES(name) \
18
name[0][0] = 127; name[0][1] = 63; name[0][2] = 13; \
19
name[1][0] = 63; name[1][1] = 11; name[1][2] = 3;
20
#define DEF_COLOR_SKIN(name) \
21
name[0][0] = 254; name[0][1] = 199; name[0][2] = 127; \
22
name[1][0] = 145; name[1][1] = 91; name[1][2] = 55;
23
#define DEF_COLOR_HAIR(name) \
24
name[0][0] = 115; name[0][1] = 43; name[0][2] = 0; \
25
name[1][0] = 63; name[1][1] = 11; name[1][2] = 0;
26
27
28
#define DEF_COLOR_GREEN(name) \
29
name[0][0] = 31; name[0][1] = 255; name[0][2] = 0; \
30
name[1][0] = 0; name[1][1] = 111; name[1][2] = 23;
31
#define DEF_COLOR_BLUE_ALT(name) \
32
name[0][0] = 95; name[0][1] = 0; name[0][2] = 255; \
33
name[1][0] = 39; name[1][1] = 0; name[1][2] = 127;
34
#define DEF_COLOR_YELLOW(name) \
35
name[0][0] = 255; name[0][1] = 223; name[0][2] = 0; \
36
name[1][0] = 127; name[1][1] = 95; name[1][2] = 0;
37
#define DEF_COLOR_PURPLE(name) \
38
name[0][0] = 95; name[0][1] = 0; name[0][2] = 255; \
39
name[1][0] = 63; name[1][1] = 0; name[1][2] = 127;
40
#define DEF_COLOR_ORANGE(name) \
41
name[0][0] = 255; name[0][1] = 127; name[0][2] = 0; \
42
name[1][0] = 127; name[1][1] = 55; name[1][2] = 0;
43
#define DEF_COLOR_BLACK(name) \
44
name[0][0] = 63; name[0][1] = 67; name[0][2] = 73; \
45
name[1][0] = 0; name[1][1] = 0; name[1][2] = 0;
46
47
void set_colors() {
48
49
switch (configColorPalette) {
50
case 1: // Default Mario
51
DEF_COLOR_LIGHT(configColorCap, 255, 0, 0);
52
DEF_COLOR_DARK (configColorCap, 127, 0, 0);
53
54
DEF_COLOR_LIGHT(configColorShirt, 255, 0, 0);
55
DEF_COLOR_DARK (configColorShirt, 127, 0, 0);
56
57
DEF_COLOR_LIGHT(configColorOveralls, 0, 0, 255);
58
DEF_COLOR_DARK (configColorOveralls, 0, 0, 127);
59
60
DEF_COLOR_LIGHT(configColorGloves, 255, 255, 255);
61
DEF_COLOR_DARK (configColorGloves, 127, 127, 127);
62
63
DEF_COLOR_LIGHT(configColorShoes, 114, 28, 14);
64
DEF_COLOR_DARK (configColorShoes, 57, 14, 7);
65
66
DEF_COLOR_LIGHT(configColorSkin, 254, 193, 121);
67
DEF_COLOR_DARK (configColorSkin, 127, 96, 60);
68
69
DEF_COLOR_LIGHT(configColorHair, 115, 6, 0);
70
DEF_COLOR_DARK (configColorHair, 57, 3, 0);
71
break;
72
73
case 2: // Mario Tweaked
74
DEF_COLOR_RED(configColorCap);
75
76
DEF_COLOR_RED(configColorShirt);
77
78
DEF_COLOR_BLUE(configColorOveralls);
79
80
DEF_COLOR_WHITE(configColorGloves);
81
82
DEF_COLOR_SHOES(configColorShoes);
83
84
DEF_COLOR_SKIN(configColorSkin);
85
86
DEF_COLOR_HAIR(configColorHair);
87
break;
88
89
case 3: // Fire Mario
90
DEF_COLOR_WHITE(configColorCap);
91
92
DEF_COLOR_WHITE(configColorShirt);
93
94
DEF_COLOR_RED(configColorOveralls);
95
96
DEF_COLOR_WHITE(configColorGloves);
97
98
DEF_COLOR_SHOES(configColorShoes);
99
100
DEF_COLOR_SKIN(configColorSkin);
101
102
DEF_COLOR_HAIR(configColorHair);
103
break;
104
105
case 4: // Classic Mario
106
DEF_COLOR_RED(configColorCap);
107
108
DEF_COLOR_BLUE(configColorShirt);
109
110
DEF_COLOR_RED(configColorOveralls);
111
112
DEF_COLOR_WHITE(configColorGloves);
113
114
DEF_COLOR_SHOES(configColorShoes);
115
116
DEF_COLOR_SKIN(configColorSkin);
117
118
DEF_COLOR_HAIR(configColorHair);
119
break;
120
121
case 5: // SMW Mario
122
DEF_COLOR_LIGHT(configColorCap, 215, 51, 103);
123
DEF_COLOR_DARK (configColorCap, 127, 19, 47);
124
125
DEF_COLOR_LIGHT(configColorShirt, 215, 51, 103);
126
DEF_COLOR_DARK (configColorShirt, 127, 19, 47);
127
128
DEF_COLOR_LIGHT(configColorOveralls, 95, 171, 175);
129
DEF_COLOR_DARK (configColorOveralls, 39, 67, 139);
130
131
DEF_COLOR_LIGHT(configColorGloves, 255, 255, 255);
132
DEF_COLOR_DARK (configColorGloves, 165, 129, 81);
133
134
DEF_COLOR_LIGHT(configColorShoes, 195, 151, 67);
135
DEF_COLOR_DARK (configColorShoes, 67, 43, 11);
136
137
DEF_COLOR_LIGHT(configColorSkin, 255, 159, 147);
138
DEF_COLOR_DARK (configColorSkin, 195, 99, 63);
139
140
DEF_COLOR_LIGHT(configColorHair, 0, 0, 0);
141
DEF_COLOR_DARK (configColorHair, 0, 0, 0);
142
break;
143
144
case 6: // Luigi
145
DEF_COLOR_GREEN(configColorCap);
146
147
DEF_COLOR_GREEN(configColorShirt);
148
149
DEF_COLOR_BLUE_ALT(configColorOveralls);
150
151
DEF_COLOR_WHITE(configColorGloves);
152
153
DEF_COLOR_SHOES(configColorShoes);
154
155
DEF_COLOR_SKIN(configColorSkin);
156
157
DEF_COLOR_HAIR(configColorHair);
158
break;
159
160
case 7: // Fire Luigi
161
DEF_COLOR_WHITE(configColorCap);
162
163
DEF_COLOR_WHITE(configColorShirt);
164
165
DEF_COLOR_GREEN(configColorOveralls);
166
167
DEF_COLOR_WHITE(configColorGloves);
168
169
DEF_COLOR_SHOES(configColorShoes);
170
171
DEF_COLOR_SKIN(configColorSkin);
172
173
DEF_COLOR_HAIR(configColorHair);
174
break;
175
176
case 8: // Classic Luigi
177
DEF_COLOR_GREEN(configColorCap);
178
179
DEF_COLOR_BLUE_ALT(configColorShirt);
180
181
DEF_COLOR_GREEN(configColorOveralls);
182
183
DEF_COLOR_WHITE(configColorGloves);
184
185
DEF_COLOR_SHOES(configColorShoes);
186
187
DEF_COLOR_SKIN(configColorSkin);
188
189
DEF_COLOR_HAIR(configColorHair);
190
break;
191
192
case 9: // SMW Luigi
193
DEF_COLOR_LIGHT(configColorCap, 0, 255, 120);
194
DEF_COLOR_DARK (configColorCap, 0, 135, 59);
195
196
DEF_COLOR_LIGHT(configColorShirt, 0, 255, 120);
197
DEF_COLOR_DARK (configColorShirt, 0, 135, 59);
198
199
DEF_COLOR_LIGHT(configColorOveralls, 131, 71, 255);
200
DEF_COLOR_DARK (configColorOveralls, 83, 19, 187);
201
202
DEF_COLOR_LIGHT(configColorGloves, 255, 255, 255);
203
DEF_COLOR_DARK (configColorGloves, 165, 129, 81);
204
205
DEF_COLOR_LIGHT(configColorShoes, 195, 151, 67);
206
DEF_COLOR_DARK (configColorShoes, 67, 43, 11);
207
208
DEF_COLOR_LIGHT(configColorSkin, 255, 159, 147);
209
DEF_COLOR_DARK (configColorSkin, 195, 99, 63);
210
211
DEF_COLOR_LIGHT(configColorHair, 0, 0, 0);
212
DEF_COLOR_DARK (configColorHair, 0, 0, 0);
213
break;
214
215
case 10: // Wario
216
DEF_COLOR_YELLOW(configColorCap);
217
218
DEF_COLOR_YELLOW(configColorShirt);
219
220
DEF_COLOR_PURPLE(configColorOveralls);
221
222
DEF_COLOR_WHITE(configColorGloves);
223
224
DEF_COLOR_GREEN(configColorShoes);
225
226
DEF_COLOR_SKIN(configColorSkin);
227
228
DEF_COLOR_HAIR(configColorHair);
229
break;
230
231
case 11: // Waluigi
232
DEF_COLOR_PURPLE(configColorCap);
233
234
DEF_COLOR_PURPLE(configColorShirt);
235
236
DEF_COLOR_BLACK(configColorOveralls);
237
238
DEF_COLOR_WHITE(configColorGloves);
239
240
DEF_COLOR_ORANGE(configColorShoes);
241
242
DEF_COLOR_SKIN(configColorSkin);
243
244
DEF_COLOR_HAIR(configColorHair);
245
break;
246
247
case 12: // Hernesto
248
DEF_COLOR_LIGHT(configColorCap, 89, 103, 255);
249
DEF_COLOR_DARK (configColorCap, 43, 35, 153);
250
251
DEF_COLOR_LIGHT(configColorShirt, 89, 103, 255);
252
DEF_COLOR_DARK (configColorShirt, 43, 35, 153);
253
254
DEF_COLOR_RED(configColorOveralls);
255
256
DEF_COLOR_WHITE(configColorGloves);
257
258
DEF_COLOR_SHOES(configColorShoes);
259
260
DEF_COLOR_SKIN(configColorSkin);
261
262
DEF_COLOR_HAIR(configColorHair);
263
break;
264
}
265
}
266