147 {
149 s32 unk_18 = data->
unk_18;
150 s32 unk_1C = data->
unk_1C;
151 s32 unk_20 = data->
unk_20;
152 s32 unk_24 = data->
unk_24;
153 s32 unk_28 = data->
unk_28;
154 s32 unk_2C = data->
unk_2C;
155 s32 unk_30 = data->
unk_30;
156 s32 unk_34 = data->
unk_34;
159
160 if (unk_18 > 255) {
161 unk_18 = 255;
162 }
163 if (unk_1C > 255) {
164 unk_1C = 255;
165 }
166 if (unk_20 > 255) {
167 unk_20 = 255;
168 }
169 if (unk_24 > 255) {
170 unk_24 = 255;
171 }
172 if (unk_28 > 255) {
173 unk_28 = 255;
174 }
175 if (unk_2C > 255) {
176 unk_2C = 255;
177 }
178 if (unk_30 > 255) {
179 unk_30 = 255;
180 }
181 if (unk_34 > 255) {
182 unk_34 = 255;
183 }
184 if (unk_18 < 0) {
185 unk_18 = 0;
186 }
187 if (unk_1C < 0) {
188 unk_1C = 0;
189 }
190 if (unk_20 < 0) {
191 unk_20 = 0;
192 }
193 if (unk_24 < 0) {
194 unk_24 = 0;
195 }
196 if (unk_28 < 0) {
197 unk_28 = 0;
198 }
199 if (unk_2C < 0) {
200 unk_2C = 0;
201 }
202 if (unk_30 < 0) {
203 unk_30 = 0;
204 }
205 if (unk_34 < 0) {
206 unk_34 = 0;
207 }
208
212
213 if (unk_34 != 0) {
218
220
222 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
223 } else {
224 gDPSetRenderMode(
gMainGfxPos++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2);
225 }
226
227 gDPSetPrimColor(
gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, unk_34 >> 1);
228 gDPSetEnvColor(
gMainGfxPos++, unk_28, unk_2C, unk_30, unk_34 >> 1);
231 }
232
237
239
240 if (unk_34 != 0) {
242 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
243 } else {
244 gDPSetRenderMode(
gMainGfxPos++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2);
245 }
247 }
248
250 gDPSetRenderMode(
gMainGfxPos++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2);
251 } else {
252 gDPSetRenderMode(
gMainGfxPos++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2);
253 }
254
255 gDPSetPrimColor(
gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, unk_24);
256 gDPSetEnvColor(
gMainGfxPos++, unk_28, unk_2C, unk_30, unk_24);
259}
#define VIRTUAL_TO_PHYSICAL(addr)
DisplayContext * gDisplayContext