mirror of https://github.com/n64decomp/mk64.git
2621 lines
89 KiB
C
2621 lines
89 KiB
C
#include <ultra64.h>
|
|
#include <macros.h>
|
|
#include <common_structs.h>
|
|
#include <defines.h>
|
|
#include <types.h>
|
|
|
|
extern Gfx *gDisplayListHead;
|
|
s32 func_80290C20(Camera *camera);
|
|
void load_surface_map(s32, struct UnkStruct_800DC5EC *arg1);
|
|
extern void func_802B5D64(u32, s16, s32, s32);
|
|
extern s16 gCurrentCourseId;
|
|
extern s32 gPrevLoadedAddress;
|
|
|
|
extern u16 sRenderedFramebuffer;
|
|
extern uintptr_t *gPhysicalFramebuffers[];
|
|
extern uintptr_t gSegmentTable[];
|
|
|
|
extern void func_802AAAAC(Player *);
|
|
extern Player gPlayers[];
|
|
|
|
extern s32 D_8015F59C;
|
|
extern s32 D_8015F5A0;
|
|
|
|
s32 func_80290C20(Camera *camera) {
|
|
if (camera->unk14 == 0) {
|
|
return 1;
|
|
}
|
|
if ((camera->unk13 == 1) && (camera->collisionY < 3.0f)) {
|
|
return 1;
|
|
}
|
|
if ((camera->unk13_and_a_half == 1) && (camera->collisionZ < 3.0f)) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
//#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
|
void func_802AF5D8(u32, s8, s32); // extern
|
|
extern s32 D_8015F5A4;
|
|
|
|
struct Unk0CAC {
|
|
s32 unk0;
|
|
u8 unk4;
|
|
u8 unk5;
|
|
u16 unk6;
|
|
};
|
|
|
|
void func_80290CAC(uintptr_t arg0) {
|
|
s32 segment = SEGMENT_NUMBER2(arg0);
|
|
s32 offset = SEGMENT_OFFSET(arg0);
|
|
struct Unk0CAC *data = VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
|
|
|
|
while(data->unk0 != 0) {
|
|
if ((data->unk6 & 0x8000) != 0) {
|
|
D_8015F59C = 1;
|
|
} else {
|
|
D_8015F59C = 0;
|
|
}
|
|
if ((data->unk6 & 0x2000) != 0) {
|
|
D_8015F5A0 = 1;
|
|
} else {
|
|
D_8015F5A0 = 0;
|
|
}
|
|
if ((data->unk6 & 0x4000) != 0) {
|
|
D_8015F5A4 = 1;
|
|
} else {
|
|
D_8015F5A4 = 0;
|
|
}
|
|
func_802AF5D8(data->unk0, data->unk4, data->unk5);
|
|
data++;
|
|
}
|
|
}
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
|
s16 func_802ABD40(u16, void *, s16); // extern
|
|
extern ? D_80152300;
|
|
extern void *gDisplayListHead;
|
|
extern ? gSegmentTable;
|
|
|
|
void load_surface_map(u32 arg0, void *arg1) {
|
|
void *sp34;
|
|
void *sp30;
|
|
s32 sp24;
|
|
s16 sp22;
|
|
s16 sp1E;
|
|
s16 temp_v0_3;
|
|
s16 temp_v0_4;
|
|
s16 temp_v1;
|
|
s16 temp_v1_2;
|
|
u16 temp_v0;
|
|
u16 temp_v0_2;
|
|
void *temp_a2;
|
|
void *temp_t1;
|
|
void *temp_v1_3;
|
|
s16 phi_a3;
|
|
s16 phi_a0;
|
|
void *phi_t0;
|
|
s16 phi_a3_2;
|
|
|
|
temp_t1 = arg1->unk8;
|
|
temp_a2 = arg1->unk4;
|
|
sp24 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
|
|
if (gIsMirrorMode != 0) {
|
|
temp_v0 = temp_a2->unk26;
|
|
if (temp_v0 < 0x2000) {
|
|
phi_a3 = 2;
|
|
} else if (temp_v0 < 0x6000) {
|
|
phi_a3 = 3;
|
|
} else if (temp_v0 < 0xA000) {
|
|
phi_a3 = 0;
|
|
} else if (temp_v0 < 0xE000) {
|
|
phi_a3 = 1;
|
|
} else {
|
|
phi_a3 = 2;
|
|
}
|
|
} else {
|
|
temp_v0_2 = temp_a2->unk26;
|
|
if (temp_v0_2 < 0x2000) {
|
|
phi_a3 = 2;
|
|
} else if (temp_v0_2 < 0x6000) {
|
|
phi_a3 = 1;
|
|
} else if (temp_v0_2 < 0xA000) {
|
|
phi_a3 = 0;
|
|
} else {
|
|
phi_a3 = 2;
|
|
if (temp_v0_2 < 0xE000) {
|
|
phi_a3 = 3;
|
|
}
|
|
}
|
|
}
|
|
arg1->unk36 = phi_a3;
|
|
if (*(&D_80152300 + (((temp_a2 - camera1) / 0xB8) * 2)) == 1) {
|
|
sp34 = temp_t1;
|
|
sp22 = phi_a3;
|
|
sp30 = temp_a2;
|
|
sp1E = func_802ABD40(temp_a2->unk5E, temp_a2, phi_a3);
|
|
temp_v0_3 = func_802ABD40(temp_t1->unk11A);
|
|
temp_v1 = sp1E - temp_v0_3;
|
|
phi_t0 = arg1;
|
|
phi_a3_2 = phi_a3;
|
|
if ((temp_v1 < 2) && (temp_v1 >= -1)) {
|
|
if (sp1E == 0xFF) {
|
|
if (temp_v0_3 == 0xFF) {
|
|
goto block_60;
|
|
}
|
|
if (temp_t1->unk124 > 30.0f) {
|
|
goto block_60;
|
|
}
|
|
phi_a0 = temp_v0_3;
|
|
} else {
|
|
if (temp_a2->unk68 > 30.0f) {
|
|
goto block_60;
|
|
}
|
|
phi_a0 = sp1E;
|
|
}
|
|
} else {
|
|
temp_v1_2 = gCurrentCourseId;
|
|
if (temp_v1_2 != 1) {
|
|
if (temp_v1_2 == 2) {
|
|
if ((temp_v0_3 >= 0x11) && (temp_v0_3 < 0x18)) {
|
|
phi_a0 = temp_v0_3;
|
|
} else if ((temp_v0_3 == 0xFF) && (sp1E != 0xFF)) {
|
|
phi_a0 = sp1E;
|
|
} else if ((temp_v0_3 != 0xFF) && (sp1E == 0xFF)) {
|
|
phi_a0 = temp_v0_3;
|
|
} else {
|
|
goto block_60;
|
|
}
|
|
} else {
|
|
if (temp_v0_3 == 0xFF) {
|
|
goto block_60;
|
|
}
|
|
if (temp_t1->unk124 > 30.0f) {
|
|
goto block_60;
|
|
}
|
|
phi_a0 = temp_v0_3;
|
|
}
|
|
} else if ((temp_v0_3 >= 0xE) && (temp_v0_3 < 0x16)) {
|
|
phi_a0 = temp_v0_3;
|
|
} else if ((temp_v0_3 == 0xFF) && (sp1E != 0xFF)) {
|
|
phi_a0 = sp1E;
|
|
} else if ((temp_v0_3 != 0xFF) && (sp1E == 0xFF)) {
|
|
phi_a0 = temp_v0_3;
|
|
} else {
|
|
goto block_60;
|
|
}
|
|
}
|
|
} else {
|
|
sp22 = phi_a3;
|
|
sp30 = temp_a2;
|
|
temp_v0_4 = func_802ABD40(temp_a2->unk5E, temp_a2, phi_a3);
|
|
phi_a0 = temp_v0_4;
|
|
phi_t0 = arg1;
|
|
phi_a3_2 = phi_a3;
|
|
if (temp_a2->unk68 > 30.0f) {
|
|
goto block_60;
|
|
}
|
|
if (temp_v0_4 == 0xFF) {
|
|
block_60:
|
|
phi_a0 = arg1->unk38;
|
|
phi_t0 = arg1;
|
|
phi_a3_2 = phi_a3;
|
|
}
|
|
}
|
|
phi_t0->unk38 = phi_a0;
|
|
temp_v1_3 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_3 + 8;
|
|
temp_v1_3->unk0 = 0x6000000;
|
|
temp_v1_3->unk4 = *(sp24 + ((((phi_a0 * 4) + phi_a3_2) - 4) * 4));
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/load_surface_map.s")
|
|
#endif
|
|
|
|
void func_80291198(void) {
|
|
gSPDisplayList(gDisplayListHead++, 0x07001140);
|
|
}
|
|
|
|
extern s32 gScreenModeSelection;
|
|
|
|
void func_802911C4(void) {
|
|
if (gScreenModeSelection == SCREEN_MODE_1P) {
|
|
gSPDisplayList(gDisplayListHead++, 0x070008E8);
|
|
} else {
|
|
gSPDisplayList(gDisplayListHead++, 0x07002D68);
|
|
}
|
|
}
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
|
? func_802A3E3C(); /* extern */
|
|
? func_802B4FF8(? *, ?); /* extern */
|
|
? mtxf_identity(? *, s32 *, Gfx **); /* extern */
|
|
? mtxf_translate(? *, f32 *, Gfx **); /* extern */
|
|
? load_surface_map(? *, void *, Gfx **); /* extern */
|
|
extern ? D_06009228;
|
|
extern ? D_060164B8;
|
|
extern ? D_06019578;
|
|
extern ? D_090001D0;
|
|
s16 gCurrentCourseId; /* unable to generate initializer */
|
|
|
|
void func_8029122C(void *arg0, s32 *arg1) {
|
|
void *sp268;
|
|
? sp228;
|
|
f32 sp224;
|
|
f32 sp220;
|
|
f32 sp21C;
|
|
s16 sp21A;
|
|
s16 sp218;
|
|
s16 sp216;
|
|
Gfx *temp_t0;
|
|
Gfx *temp_t1;
|
|
Gfx *temp_v1;
|
|
Gfx *temp_v1_100;
|
|
Gfx *temp_v1_101;
|
|
Gfx *temp_v1_102;
|
|
Gfx *temp_v1_103;
|
|
Gfx *temp_v1_104;
|
|
Gfx *temp_v1_105;
|
|
Gfx *temp_v1_106;
|
|
Gfx *temp_v1_107;
|
|
Gfx *temp_v1_108;
|
|
Gfx *temp_v1_109;
|
|
Gfx *temp_v1_10;
|
|
Gfx *temp_v1_110;
|
|
Gfx *temp_v1_111;
|
|
Gfx *temp_v1_112;
|
|
Gfx *temp_v1_113;
|
|
Gfx *temp_v1_114;
|
|
Gfx *temp_v1_115;
|
|
Gfx *temp_v1_116;
|
|
Gfx *temp_v1_117;
|
|
Gfx *temp_v1_118;
|
|
Gfx *temp_v1_119;
|
|
Gfx *temp_v1_11;
|
|
Gfx *temp_v1_120;
|
|
Gfx *temp_v1_121;
|
|
Gfx *temp_v1_122;
|
|
Gfx *temp_v1_12;
|
|
Gfx *temp_v1_13;
|
|
Gfx *temp_v1_14;
|
|
Gfx *temp_v1_15;
|
|
Gfx *temp_v1_16;
|
|
Gfx *temp_v1_17;
|
|
Gfx *temp_v1_18;
|
|
Gfx *temp_v1_19;
|
|
Gfx *temp_v1_20;
|
|
Gfx *temp_v1_21;
|
|
Gfx *temp_v1_22;
|
|
Gfx *temp_v1_23;
|
|
Gfx *temp_v1_24;
|
|
Gfx *temp_v1_25;
|
|
Gfx *temp_v1_26;
|
|
Gfx *temp_v1_27;
|
|
Gfx *temp_v1_28;
|
|
Gfx *temp_v1_29;
|
|
Gfx *temp_v1_2;
|
|
Gfx *temp_v1_30;
|
|
Gfx *temp_v1_31;
|
|
Gfx *temp_v1_32;
|
|
Gfx *temp_v1_33;
|
|
Gfx *temp_v1_34;
|
|
Gfx *temp_v1_35;
|
|
Gfx *temp_v1_36;
|
|
Gfx *temp_v1_37;
|
|
Gfx *temp_v1_38;
|
|
Gfx *temp_v1_39;
|
|
Gfx *temp_v1_3;
|
|
Gfx *temp_v1_40;
|
|
Gfx *temp_v1_41;
|
|
Gfx *temp_v1_42;
|
|
Gfx *temp_v1_43;
|
|
Gfx *temp_v1_44;
|
|
Gfx *temp_v1_45;
|
|
Gfx *temp_v1_46;
|
|
Gfx *temp_v1_47;
|
|
Gfx *temp_v1_48;
|
|
Gfx *temp_v1_49;
|
|
Gfx *temp_v1_4;
|
|
Gfx *temp_v1_50;
|
|
Gfx *temp_v1_51;
|
|
Gfx *temp_v1_52;
|
|
Gfx *temp_v1_53;
|
|
Gfx *temp_v1_54;
|
|
Gfx *temp_v1_55;
|
|
Gfx *temp_v1_56;
|
|
Gfx *temp_v1_57;
|
|
Gfx *temp_v1_58;
|
|
Gfx *temp_v1_59;
|
|
Gfx *temp_v1_5;
|
|
Gfx *temp_v1_60;
|
|
Gfx *temp_v1_61;
|
|
Gfx *temp_v1_62;
|
|
Gfx *temp_v1_63;
|
|
Gfx *temp_v1_64;
|
|
Gfx *temp_v1_65;
|
|
Gfx *temp_v1_66;
|
|
Gfx *temp_v1_67;
|
|
Gfx *temp_v1_68;
|
|
Gfx *temp_v1_69;
|
|
Gfx *temp_v1_6;
|
|
Gfx *temp_v1_70;
|
|
Gfx *temp_v1_71;
|
|
Gfx *temp_v1_72;
|
|
Gfx *temp_v1_73;
|
|
Gfx *temp_v1_74;
|
|
Gfx *temp_v1_75;
|
|
Gfx *temp_v1_76;
|
|
Gfx *temp_v1_77;
|
|
Gfx *temp_v1_78;
|
|
Gfx *temp_v1_79;
|
|
Gfx *temp_v1_7;
|
|
Gfx *temp_v1_80;
|
|
Gfx *temp_v1_81;
|
|
Gfx *temp_v1_82;
|
|
Gfx *temp_v1_83;
|
|
Gfx *temp_v1_84;
|
|
Gfx *temp_v1_85;
|
|
Gfx *temp_v1_86;
|
|
Gfx *temp_v1_87;
|
|
Gfx *temp_v1_88;
|
|
Gfx *temp_v1_89;
|
|
Gfx *temp_v1_8;
|
|
Gfx *temp_v1_90;
|
|
Gfx *temp_v1_91;
|
|
Gfx *temp_v1_92;
|
|
Gfx *temp_v1_93;
|
|
Gfx *temp_v1_94;
|
|
Gfx *temp_v1_95;
|
|
Gfx *temp_v1_96;
|
|
Gfx *temp_v1_97;
|
|
Gfx *temp_v1_98;
|
|
Gfx *temp_v1_99;
|
|
Gfx *temp_v1_9;
|
|
f32 *temp_a1;
|
|
s16 temp_t3;
|
|
s16 temp_t7;
|
|
s32 phi_t6;
|
|
Gfx *phi_v1;
|
|
s32 *phi_a1;
|
|
Gfx **phi_a2;
|
|
Gfx *phi_v1_2;
|
|
Gfx *phi_v1_3;
|
|
|
|
sp268 = arg0->unk8;
|
|
func_802A3E3C();
|
|
sp21A = arg0->unk38;
|
|
sp218 = arg0->unk4->unk26;
|
|
temp_t3 = arg0->unk36;
|
|
phi_a1 = arg1;
|
|
phi_a2 = &gDisplayListHead;
|
|
if (arg1 != 0) {
|
|
if (arg1 != 1) {
|
|
if (arg1 != 2) {
|
|
phi_a2 = &gDisplayListHead;
|
|
if (arg1 != 3) {
|
|
|
|
} else {
|
|
temp_v1 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1 + 8;
|
|
temp_v1->words.w0 = 0x1030040;
|
|
temp_v1->words.w1 = (gGfxPool + 0x100) & 0x1FFFFFFF;
|
|
temp_v1_2 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_2 + 8;
|
|
temp_v1_2->words.w0 = 0x1010040;
|
|
phi_t6 = (gGfxPool + 0x280) & 0x1FFFFFFF;
|
|
phi_v1 = temp_v1_2;
|
|
goto block_9;
|
|
}
|
|
} else {
|
|
temp_v1_3 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_3 + 8;
|
|
temp_v1_3->words.w0 = 0x1030040;
|
|
temp_v1_3->words.w1 = (gGfxPool + 0xC0) & 0x1FFFFFFF;
|
|
temp_v1_4 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_4 + 8;
|
|
temp_v1_4->words.w0 = 0x1010040;
|
|
temp_v1_4->words.w1 = (gGfxPool + 0x240) & 0x1FFFFFFF;
|
|
phi_a1 = &gGfxPool;
|
|
phi_a2 = &gDisplayListHead;
|
|
}
|
|
} else {
|
|
temp_v1_5 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_5 + 8;
|
|
temp_v1_5->words.w0 = 0x1030040;
|
|
temp_v1_5->words.w1 = (gGfxPool + 0x80) & 0x1FFFFFFF;
|
|
temp_v1_6 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_6 + 8;
|
|
temp_v1_6->words.w0 = 0x1010040;
|
|
phi_t6 = (gGfxPool + 0x200) & 0x1FFFFFFF;
|
|
phi_v1 = temp_v1_6;
|
|
block_9:
|
|
phi_v1->words.w1 = phi_t6;
|
|
phi_a1 = &gGfxPool;
|
|
phi_a2 = &gDisplayListHead;
|
|
}
|
|
} else {
|
|
temp_v1_7 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_7 + 8;
|
|
temp_v1_7->words.w0 = 0x1030040;
|
|
temp_v1_7->words.w1 = (gGfxPool + 0x40) & 0x1FFFFFFF;
|
|
temp_v1_8 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_8 + 8;
|
|
temp_v1_8->words.w0 = 0x1010040;
|
|
temp_v1_8->words.w1 = (gGfxPool + 0x1C0) & 0x1FFFFFFF;
|
|
phi_a1 = &gGfxPool;
|
|
}
|
|
sp216 = temp_t3;
|
|
mtxf_identity(&sp228, phi_a1, phi_a2);
|
|
func_802B4FF8(&sp228, 0);
|
|
temp_t7 = gCurrentCourseId;
|
|
switch (temp_t7) { /* switch 1 */
|
|
case 2: /* switch 1 */
|
|
if ((gActiveScreenMode == 0) && (sp21A >= 6) && (sp21A < 0xA) && ((sp21A != 9) || ((sp218 >= 0xA000) && (sp218 < 0xE001)))) {
|
|
temp_v1_9 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_9 + 8;
|
|
temp_v1_9->words.w1 = &D_06009228;
|
|
temp_v1_9->words.w0 = 0x6000000;
|
|
return;
|
|
}
|
|
default: /* switch 1 */
|
|
return;
|
|
case 3: /* switch 1 */
|
|
temp_v1_10 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_10 + 8;
|
|
temp_v1_10->words.w1 = 0;
|
|
temp_v1_10->words.w0 = 0xE7000000;
|
|
temp_v1_11 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_11 + 8;
|
|
temp_v1_11->words.w1 = -1;
|
|
temp_v1_11->words.w0 = 0xBB000001;
|
|
temp_v1_12 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_12 + 8;
|
|
temp_v1_12->words.w1 = 0x20000;
|
|
temp_v1_12->words.w0 = 0xB6000000;
|
|
temp_v1_13 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_13 + 8;
|
|
temp_v1_13->words.w1 = 0x4045D8;
|
|
temp_v1_13->words.w0 = 0xB900031D;
|
|
temp_v1_14 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_14 + 8;
|
|
temp_v1_14->words.w1 = 0;
|
|
temp_v1_14->words.w0 = 0xC0000000;
|
|
temp_v1_15 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_15 + 8;
|
|
temp_v1_15->words.w1 = 0xFF33FFFF;
|
|
temp_v1_15->words.w0 = 0xFC121824;
|
|
temp_v1_16 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_16 + 8;
|
|
temp_v1_16->words.w1 = 0x7000878;
|
|
temp_v1_16->words.w0 = 0x6000000;
|
|
temp_v1_17 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_17 + 8;
|
|
temp_v1_17->words.w1 = 0;
|
|
temp_v1_17->words.w0 = 0xB9000002;
|
|
temp_v1_18 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_18 + 8;
|
|
temp_v1_18->words.w1 = 0;
|
|
temp_v1_18->words.w0 = 0xE7000000;
|
|
return;
|
|
case 6: /* switch 1 */
|
|
temp_v1_19 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_19 + 8;
|
|
temp_v1_19->words.w1 = 0;
|
|
temp_v1_19->words.w0 = 0xE7000000;
|
|
temp_v1_20 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_20 + 8;
|
|
temp_v1_20->words.w1 = -1;
|
|
temp_v1_20->words.w0 = 0xBB000001;
|
|
temp_v1_21 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_21 + 8;
|
|
temp_v1_21->words.w1 = 0x20000;
|
|
temp_v1_21->words.w0 = 0xB6000000;
|
|
temp_v1_22 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_22 + 8;
|
|
temp_v1_22->words.w1 = 0x4045D8;
|
|
temp_v1_22->words.w0 = 0xB900031D;
|
|
temp_t0 = gDisplayListHead;
|
|
gDisplayListHead = temp_t0 + 8;
|
|
temp_t0->words.w1 = 0;
|
|
temp_t0->words.w0 = 0xC0000000;
|
|
temp_t1 = gDisplayListHead;
|
|
gDisplayListHead = temp_t1 + 8;
|
|
temp_t1->words.w1 = 0xFF33FFFF;
|
|
temp_t1->words.w0 = 0xFC121824;
|
|
switch (sp21A) { /* switch 2 */
|
|
case 22: /* switch 2 */
|
|
case 23: /* switch 2 */
|
|
case 29: /* switch 2 */
|
|
case 30: /* switch 2 */
|
|
case 31: /* switch 2 */
|
|
case 37: /* switch 2 */
|
|
temp_v1_23 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_23 + 8;
|
|
temp_v1_23->words.w1 = 0x2000;
|
|
temp_v1_23->words.w0 = 0xB6000000;
|
|
temp_v1_24 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_24 + 8;
|
|
temp_v1_24->words.w1 = 0x7009E70;
|
|
temp_v1_24->words.w0 = 0x6000000;
|
|
temp_v1_25 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_25 + 8;
|
|
temp_v1_25->words.w1 = 0x2000;
|
|
temp_v1_25->words.w0 = 0xB7000000;
|
|
break;
|
|
}
|
|
temp_a1 = &sp21C;
|
|
sp21C = 0.0f;
|
|
sp224 = 0.0f;
|
|
sp220 = D_8015F8E4;
|
|
mtxf_translate(&sp228, temp_a1, &gDisplayListHead);
|
|
func_802B4FF8(&sp228, 0);
|
|
temp_v1_26 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_26 + 8;
|
|
temp_v1_26->words.w0 = 0xB900031D;
|
|
temp_v1_26->words.w1 = 0x4045D8;
|
|
temp_v1_27 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_27 + 8;
|
|
temp_v1_27->words.w1 = 0;
|
|
temp_v1_27->words.w0 = 0xC0000000;
|
|
temp_v1_28 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_28 + 8;
|
|
temp_v1_28->words.w1 = 0xFF33FFFF;
|
|
temp_v1_28->words.w0 = 0xFC121824;
|
|
temp_v1_29 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_29 + 8;
|
|
temp_v1_29->words.w1 = 0x2000;
|
|
temp_v1_29->words.w0 = 0xB6000000;
|
|
load_surface_map(&D_06019578, arg0, &gDisplayListHead);
|
|
temp_v1_30 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_30 + 8;
|
|
temp_v1_30->words.w1 = -1;
|
|
temp_v1_30->words.w0 = 0xBB000900;
|
|
temp_v1_31 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_31 + 8;
|
|
temp_v1_31->words.w1 = 0x2000;
|
|
temp_v1_31->words.w0 = 0xB7000000;
|
|
temp_v1_32 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_32 + 8;
|
|
temp_v1_32->words.w1 = 0;
|
|
temp_v1_32->words.w0 = 0xB9000002;
|
|
temp_v1_33 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_33 + 8;
|
|
temp_v1_33->words.w1 = 0;
|
|
temp_v1_33->words.w0 = 0xE7000000;
|
|
return;
|
|
case 12: /* switch 1 */
|
|
temp_v1_34 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_34 + 8;
|
|
temp_v1_34->words.w1 = 0;
|
|
temp_v1_34->words.w0 = 0xE7000000;
|
|
temp_v1_35 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_35 + 8;
|
|
temp_v1_35->words.w1 = 0x20000;
|
|
temp_v1_35->words.w0 = 0xB6000000;
|
|
temp_v1_36 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_36 + 8;
|
|
temp_v1_36->words.w1 = -1;
|
|
temp_v1_36->words.w0 = 0xBB000001;
|
|
temp_v1_37 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_37 + 8;
|
|
temp_v1_37->words.w1 = 0;
|
|
temp_v1_37->words.w0 = 0xC0000000;
|
|
temp_v1_38 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_38 + 8;
|
|
temp_v1_38->words.w1 = 0xFF33FFFF;
|
|
temp_v1_38->words.w0 = 0xFC121824;
|
|
temp_v1_39 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_39 + 8;
|
|
temp_v1_39->words.w1 = 0x2000;
|
|
temp_v1_39->words.w0 = 0xBA000C02;
|
|
temp_v1_40 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_40 + 8;
|
|
temp_v1_40->words.w1 = 0x80000;
|
|
temp_v1_40->words.w0 = 0xBA001301;
|
|
mtxf_identity(&sp228);
|
|
func_802B4FF8(&sp228, 0);
|
|
load_surface_map(&D_090001D0, arg0);
|
|
temp_v1_41 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_41 + 8;
|
|
temp_v1_41->words.w1 = 0;
|
|
temp_v1_41->words.w0 = 0xB9000002;
|
|
if ((func_80290C20(arg0->unk4) == 1) && (func_802AAB4C(sp268) < sp268->unk18)) {
|
|
temp_v1_42 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_42 + 8;
|
|
temp_v1_42->words.w1 = 1;
|
|
temp_v1_42->words.w0 = 0xB7000000;
|
|
temp_v1_43 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_43 + 8;
|
|
temp_v1_43->words.w1 = 0xFFFE793C;
|
|
temp_v1_43->words.w0 = 0xFCFFFFFF;
|
|
temp_v1_44 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_44 + 8;
|
|
temp_v1_44->words.w1 = 0x552078;
|
|
temp_v1_44->words.w0 = 0xB900031D;
|
|
temp_v1_45 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_45 + 8;
|
|
temp_v1_45->words.w1 = 0x7002B48;
|
|
temp_v1_45->words.w0 = 0x6000000;
|
|
}
|
|
temp_v1_46 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_46 + 8;
|
|
temp_v1_46->words.w1 = 0;
|
|
temp_v1_46->words.w0 = 0xE7000000;
|
|
return;
|
|
case 13: /* switch 1 */
|
|
temp_v1_47 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_47 + 8;
|
|
temp_v1_47->words.w1 = 0;
|
|
temp_v1_47->words.w0 = 0xE7000000;
|
|
mtxf_identity(&sp228);
|
|
func_802B4FF8(&sp228, 0);
|
|
temp_v1_48 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_48 + 8;
|
|
temp_v1_48->words.w1 = 0x2000;
|
|
temp_v1_48->words.w0 = 0xB6000000;
|
|
load_surface_map(&D_060164B8, arg0, &gDisplayListHead);
|
|
temp_v1_49 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_49 + 8;
|
|
temp_v1_49->words.w1 = 0x2000;
|
|
temp_v1_49->words.w0 = 0xB7000000;
|
|
temp_v1_50 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_50 + 8;
|
|
temp_v1_50->words.w1 = 0;
|
|
temp_v1_50->words.w0 = 0xB9000002;
|
|
temp_v1_51 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_51 + 8;
|
|
temp_v1_51->words.w1 = 0;
|
|
temp_v1_51->words.w0 = 0xE7000000;
|
|
return;
|
|
case 14: /* switch 1 */
|
|
temp_v1_52 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_52 + 8;
|
|
temp_v1_52->words.w1 = 0;
|
|
temp_v1_52->words.w0 = 0xE7000000;
|
|
temp_v1_53 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_53 + 8;
|
|
temp_v1_53->words.w1 = -1;
|
|
temp_v1_53->words.w0 = 0xBB000001;
|
|
temp_v1_54 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_54 + 8;
|
|
temp_v1_54->words.w1 = 0x20000;
|
|
temp_v1_54->words.w0 = 0xB6000000;
|
|
temp_v1_55 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_55 + 8;
|
|
temp_v1_55->words.w1 = 0x4045D8;
|
|
temp_v1_55->words.w0 = 0xB900031D;
|
|
temp_v1_56 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_56 + 8;
|
|
temp_v1_56->words.w1 = 0;
|
|
temp_v1_56->words.w0 = 0xC0000000;
|
|
temp_v1_57 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_57 + 8;
|
|
temp_v1_57->words.w1 = 0xFF33FFFF;
|
|
temp_v1_57->words.w0 = 0xFC121824;
|
|
temp_v1_58 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_58 + 8;
|
|
temp_v1_58->words.w1 = 0x2000;
|
|
temp_v1_58->words.w0 = 0xBA000C02;
|
|
temp_v1_59 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_59 + 8;
|
|
temp_v1_59->words.w1 = 0x80000;
|
|
temp_v1_59->words.w0 = 0xBA001301;
|
|
mtxf_identity(&sp228);
|
|
func_802B4FF8(&sp228, 0);
|
|
temp_v1_60 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_60 + 8;
|
|
temp_v1_60->words.w1 = 0x2000;
|
|
temp_v1_60->words.w0 = 0xB6000000;
|
|
temp_v1_61 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_61 + 8;
|
|
temp_v1_61->words.w1 = -0xC07;
|
|
temp_v1_61->words.w0 = 0xFC127E24;
|
|
temp_v1_62 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_62 + 8;
|
|
temp_v1_62->words.w1 = 0x5049D8;
|
|
temp_v1_62->words.w0 = 0xB900031D;
|
|
temp_v1_63 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_63 + 8;
|
|
temp_v1_63->words.w0 = 0xFA000000;
|
|
temp_v1_63->words.w1 = 0xFFFF00FF;
|
|
temp_v1_64 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_64 + 8;
|
|
temp_v1_64->words.w1 = 0x7000EC0;
|
|
temp_v1_64->words.w0 = 0x6000000;
|
|
temp_v1_65 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_65 + 8;
|
|
temp_v1_65->words.w1 = -1;
|
|
temp_v1_65->words.w0 = 0xBB000900;
|
|
temp_v1_66 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_66 + 8;
|
|
temp_v1_66->words.w1 = 0x2000;
|
|
temp_v1_66->words.w0 = 0xB7000000;
|
|
temp_v1_67 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_67 + 8;
|
|
temp_v1_67->words.w1 = 0;
|
|
temp_v1_67->words.w0 = 0xB9000002;
|
|
temp_v1_68 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_68 + 8;
|
|
temp_v1_68->words.w1 = 0;
|
|
temp_v1_68->words.w0 = 0xE7000000;
|
|
return;
|
|
case 18: /* switch 1 */
|
|
temp_v1_69 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_69 + 8;
|
|
temp_v1_69->words.w1 = 0;
|
|
temp_v1_69->words.w0 = 0xE7000000;
|
|
temp_v1_70 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_70 + 8;
|
|
temp_v1_70->words.w1 = 0x20000;
|
|
temp_v1_70->words.w0 = 0xB6000000;
|
|
temp_v1_71 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_71 + 8;
|
|
temp_v1_71->words.w1 = -1;
|
|
temp_v1_71->words.w0 = 0xBB000001;
|
|
temp_v1_72 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_72 + 8;
|
|
temp_v1_72->words.w1 = 0;
|
|
temp_v1_72->words.w0 = 0xC0000000;
|
|
temp_v1_73 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_73 + 8;
|
|
temp_v1_73->words.w1 = 0x2000;
|
|
temp_v1_73->words.w0 = 0xBA000C02;
|
|
temp_v1_74 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_74 + 8;
|
|
temp_v1_74->words.w1 = 0x80000;
|
|
temp_v1_74->words.w0 = 0xBA001301;
|
|
sp216 = temp_t3;
|
|
mtxf_identity(&sp228);
|
|
func_802B4FF8(&sp228, 0);
|
|
temp_v1_75 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_75 + 8;
|
|
temp_v1_75->words.w1 = 0xFF33FFFF;
|
|
temp_v1_75->words.w0 = 0xFC121824;
|
|
temp_v1_76 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_76 + 8;
|
|
temp_v1_76->words.w1 = 0x4045D8;
|
|
temp_v1_76->words.w0 = 0xB900031D;
|
|
if (sp21A < 0x11) {
|
|
temp_v1_77 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_77 + 8;
|
|
temp_v1_77->words.w1 = 0xFF33FFFF;
|
|
temp_v1_77->words.w0 = 0xFC121824;
|
|
temp_v1_78 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_78 + 8;
|
|
temp_v1_78->words.w1 = 0x7003E40;
|
|
temp_v1_78->words.w0 = 0x6000000;
|
|
temp_v1_79 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_79 + 8;
|
|
temp_v1_79->words.w1 = 0x7003EB0;
|
|
temp_v1_79->words.w0 = 0x6000000;
|
|
if ((sp21A >= 6) && (sp21A < 0xD)) {
|
|
temp_v1_80 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_80 + 8;
|
|
temp_v1_80->words.w1 = 0xFF33FFFF;
|
|
temp_v1_80->words.w0 = 0xFC121824;
|
|
temp_v1_81 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_81 + 8;
|
|
temp_v1_81->words.w1 = 0x7003DD0;
|
|
temp_v1_81->words.w0 = 0x6000000;
|
|
}
|
|
} else {
|
|
if ((sp21A == 0x15) || (sp21A == 0x16)) {
|
|
if (temp_t3 == 3) {
|
|
temp_v1_88 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_88 + 8;
|
|
temp_v1_88->words.w1 = -0xC07;
|
|
temp_v1_88->words.w0 = 0xFC127E24;
|
|
temp_v1_89 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_89 + 8;
|
|
temp_v1_89->words.w1 = 0x70036A8;
|
|
temp_v1_89->words.w0 = 0x6000000;
|
|
}
|
|
if ((temp_t3 == 1) || (temp_t3 == 0)) {
|
|
temp_v1_93 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_93 + 8;
|
|
temp_v1_93->words.w1 = -0xC07;
|
|
temp_v1_93->words.w0 = 0xFC127E24;
|
|
temp_v1_94 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_94 + 8;
|
|
temp_v1_94->words.w1 = 0x70036A8;
|
|
phi_v1_2 = temp_v1_94;
|
|
} else {
|
|
temp_v1_90 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_90 + 8;
|
|
temp_v1_90->words.w1 = 0xFF33FFFF;
|
|
temp_v1_90->words.w0 = 0xFC121824;
|
|
temp_v1_91 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_91 + 8;
|
|
temp_v1_91->words.w1 = 0x7003F30;
|
|
temp_v1_91->words.w0 = 0x6000000;
|
|
temp_v1_92 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_92 + 8;
|
|
temp_v1_92->words.w1 = 0x70036A8;
|
|
phi_v1_2 = temp_v1_92;
|
|
}
|
|
goto block_53;
|
|
}
|
|
if (sp21A == 0x18) {
|
|
if ((temp_t3 == 0) || (temp_t3 == 3)) {
|
|
temp_v1_82 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_82 + 8;
|
|
temp_v1_82->words.w1 = -0xC07;
|
|
temp_v1_82->words.w0 = 0xFC127E24;
|
|
temp_v1_83 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_83 + 8;
|
|
temp_v1_83->words.w0 = 0x6000000;
|
|
temp_v1_83->words.w1 = 0x70036A8;
|
|
}
|
|
} else if (sp21A == 0x17) {
|
|
if (temp_t3 == 3) {
|
|
temp_v1_84 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_84 + 8;
|
|
temp_v1_84->words.w1 = -0xC07;
|
|
temp_v1_84->words.w0 = 0xFC127E24;
|
|
temp_v1_85 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_85 + 8;
|
|
temp_v1_85->words.w1 = 0x70036A8;
|
|
phi_v1_2 = temp_v1_85;
|
|
goto block_53;
|
|
}
|
|
if (temp_t3 == 0) {
|
|
temp_v1_86 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_86 + 8;
|
|
temp_v1_86->words.w1 = -0xC07;
|
|
temp_v1_86->words.w0 = 0xFC127E24;
|
|
temp_v1_87 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_87 + 8;
|
|
temp_v1_87->words.w1 = 0x70036A8;
|
|
phi_v1_2 = temp_v1_87;
|
|
block_53:
|
|
phi_v1_2->words.w0 = 0x6000000;
|
|
}
|
|
}
|
|
}
|
|
temp_v1_95 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_95 + 8;
|
|
temp_v1_95->words.w1 = 0xFF33FFFF;
|
|
temp_v1_95->words.w0 = 0xFC121824;
|
|
switch (sp21A) { /* switch 3 */
|
|
case 5: /* switch 3 */
|
|
if (temp_t3 != 3) {
|
|
temp_v1_96 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_96 + 8;
|
|
temp_v1_96->words.w1 = 0x7003DD0;
|
|
phi_v1_3 = temp_v1_96;
|
|
block_82:
|
|
phi_v1_3->words.w0 = 0x6000000;
|
|
}
|
|
break;
|
|
case 17: /* switch 3 */
|
|
if (temp_t3 != 0) {
|
|
if (temp_t3 != 1) {
|
|
if (temp_t3 != 2) {
|
|
if (temp_t3 != 3) {
|
|
|
|
} else {
|
|
temp_v1_97 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_97 + 8;
|
|
temp_v1_97->words.w1 = 0x7003EB0;
|
|
temp_v1_97->words.w0 = 0x6000000;
|
|
temp_v1_98 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_98 + 8;
|
|
temp_v1_98->words.w1 = 0x7003F30;
|
|
phi_v1_3 = temp_v1_98;
|
|
goto block_82;
|
|
}
|
|
} else {
|
|
temp_v1_99 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_99 + 8;
|
|
temp_v1_99->words.w1 = 0x7003E40;
|
|
temp_v1_99->words.w0 = 0x6000000;
|
|
temp_v1_100 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_100 + 8;
|
|
temp_v1_100->words.w1 = 0x7003EB0;
|
|
temp_v1_100->words.w0 = 0x6000000;
|
|
temp_v1_101 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_101 + 8;
|
|
temp_v1_101->words.w1 = 0x7003F30;
|
|
phi_v1_3 = temp_v1_101;
|
|
goto block_82;
|
|
}
|
|
} else {
|
|
temp_v1_102 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_102 + 8;
|
|
temp_v1_102->words.w1 = 0x7003DD0;
|
|
temp_v1_102->words.w0 = 0x6000000;
|
|
temp_v1_103 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_103 + 8;
|
|
temp_v1_103->words.w1 = 0x7003E40;
|
|
temp_v1_103->words.w0 = 0x6000000;
|
|
temp_v1_104 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_104 + 8;
|
|
temp_v1_104->words.w1 = 0x7003EB0;
|
|
phi_v1_3 = temp_v1_104;
|
|
goto block_82;
|
|
}
|
|
} else {
|
|
temp_v1_105 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_105 + 8;
|
|
temp_v1_105->words.w1 = 0x7003E40;
|
|
temp_v1_105->words.w0 = 0x6000000;
|
|
temp_v1_106 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_106 + 8;
|
|
temp_v1_106->words.w1 = 0x7003EB0;
|
|
phi_v1_3 = temp_v1_106;
|
|
goto block_82;
|
|
}
|
|
break;
|
|
case 18: /* switch 3 */
|
|
if (temp_t3 != 0) {
|
|
if (temp_t3 != 1) {
|
|
if (temp_t3 != 2) {
|
|
|
|
} else {
|
|
temp_v1_107 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_107 + 8;
|
|
temp_v1_107->words.w1 = 0x7003E40;
|
|
temp_v1_107->words.w0 = 0x6000000;
|
|
temp_v1_108 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_108 + 8;
|
|
temp_v1_108->words.w1 = 0x7003EB0;
|
|
phi_v1_3 = temp_v1_108;
|
|
goto block_82;
|
|
}
|
|
} else {
|
|
temp_v1_109 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_109 + 8;
|
|
temp_v1_109->words.w1 = 0x7003DD0;
|
|
temp_v1_109->words.w0 = 0x6000000;
|
|
temp_v1_110 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_110 + 8;
|
|
temp_v1_110->words.w1 = 0x7003E40;
|
|
temp_v1_110->words.w0 = 0x6000000;
|
|
temp_v1_111 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_111 + 8;
|
|
temp_v1_111->words.w1 = 0x7003EB0;
|
|
phi_v1_3 = temp_v1_111;
|
|
goto block_82;
|
|
}
|
|
} else {
|
|
temp_v1_112 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_112 + 8;
|
|
temp_v1_112->words.w1 = 0x7003E40;
|
|
temp_v1_112->words.w0 = 0x6000000;
|
|
temp_v1_113 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_113 + 8;
|
|
temp_v1_113->words.w1 = 0x7003EB0;
|
|
phi_v1_3 = temp_v1_113;
|
|
goto block_82;
|
|
}
|
|
break;
|
|
case 21: /* switch 3 */
|
|
if ((temp_t3 == 0) || (temp_t3 == 1)) {
|
|
temp_v1_115 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_115 + 8;
|
|
temp_v1_115->words.w1 = 0x7003E40;
|
|
temp_v1_115->words.w0 = 0x6000000;
|
|
temp_v1_116 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_116 + 8;
|
|
temp_v1_116->words.w1 = 0x7003EB0;
|
|
temp_v1_116->words.w0 = 0x6000000;
|
|
temp_v1_117 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_117 + 8;
|
|
temp_v1_117->words.w1 = 0x7003F30;
|
|
phi_v1_3 = temp_v1_117;
|
|
} else {
|
|
temp_v1_114 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_114 + 8;
|
|
temp_v1_114->words.w1 = 0x7003EB0;
|
|
phi_v1_3 = temp_v1_114;
|
|
}
|
|
goto block_82;
|
|
case 22: /* switch 3 */
|
|
if (temp_t3 == 0) {
|
|
temp_v1_118 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_118 + 8;
|
|
temp_v1_118->words.w1 = 0x7003F30;
|
|
phi_v1_3 = temp_v1_118;
|
|
goto block_82;
|
|
}
|
|
break;
|
|
case 23: /* switch 3 */
|
|
if (temp_t3 != 1) {
|
|
temp_v1_119 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_119 + 8;
|
|
temp_v1_119->words.w1 = 0x7003F30;
|
|
phi_v1_3 = temp_v1_119;
|
|
goto block_82;
|
|
}
|
|
break;
|
|
}
|
|
temp_v1_120 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_120 + 8;
|
|
temp_v1_120->words.w1 = -1;
|
|
temp_v1_120->words.w0 = 0xBB000900;
|
|
temp_v1_121 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_121 + 8;
|
|
temp_v1_121->words.w1 = 0;
|
|
temp_v1_121->words.w0 = 0xB9000002;
|
|
temp_v1_122 = gDisplayListHead;
|
|
gDisplayListHead = temp_v1_122 + 8;
|
|
temp_v1_122->words.w1 = 0;
|
|
temp_v1_122->words.w0 = 0xE7000000;
|
|
/* Duplicate return node #84. Try simplifying control flow for better match */
|
|
return;
|
|
}
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/func_8029122C.s")
|
|
#endif
|
|
|
|
#ifdef NON_MATCHING
|
|
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
|
void func_80291198();
|
|
void func_802911C4();
|
|
extern Gfx mario_raceway_dls[];
|
|
// Some weird stuff going on here.
|
|
// aka. Too lazy to debug.
|
|
void render_mario_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|
s16 sp22;
|
|
u16 sp20;
|
|
u16 temp_t0;
|
|
void *temp_a1;
|
|
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07003050);
|
|
}
|
|
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gDPPipeSync(gDisplayListHead++);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
|
|
|
|
|
|
switch (sp22) {
|
|
case 1:
|
|
case 2:
|
|
case 17:
|
|
if ((temp_t0 == 2) || (temp_t0 == 1)) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 3:
|
|
if (temp_t0 != 0) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 4:
|
|
if (temp_t0 == 0) {
|
|
func_80291198();
|
|
} else {
|
|
if (temp_t0 == 1) {
|
|
func_80291198();
|
|
}
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 5:
|
|
case 6:
|
|
if ((temp_t0 == 2) || (temp_t0 == 3)) {
|
|
func_802911C4();
|
|
} else {
|
|
func_80291198();
|
|
}
|
|
break;
|
|
case 7:
|
|
sp20 = temp_t0;
|
|
func_80291198();
|
|
if ((temp_t0 == 2) || (temp_t0 == 3)) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 8:
|
|
case 9:
|
|
if (temp_t0 != 1) {
|
|
sp20 = temp_t0;
|
|
func_802911C4();
|
|
}
|
|
/* fallthrough */
|
|
case 10:
|
|
if (temp_t0 != 2) {
|
|
func_80291198();
|
|
}
|
|
break;
|
|
case 11:
|
|
if (temp_t0 == 0) {
|
|
func_802911C4();
|
|
func_80291198();
|
|
} else if (temp_t0 == 3) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 12:
|
|
if ((temp_t0 == 0) || (temp_t0 == 3)) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 13:
|
|
case 14:
|
|
if (temp_t0 != 1) {
|
|
case 15:
|
|
case 16:
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
}
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07003508);
|
|
gSPDisplayList(gDisplayListHead++, 0x07003240);
|
|
gSPDisplayList(gDisplayListHead++, 0x070014A0);
|
|
|
|
load_surface_map(&mario_raceway_dls, arg0);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000450);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000240);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gSPDisplayList(gDisplayListHead++, 0x070000E0);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000160);
|
|
/*
|
|
temp_v0 = gDisplayListHead;
|
|
sp22 = arg0->unk38;
|
|
temp_t0 = arg0->unk36;
|
|
gDisplayListHead = temp_v0 + 8;
|
|
temp_a1 = arg0;
|
|
temp_v0->words.w1 = 0x20000;
|
|
temp_v0->words.w0 = 0xB6000000;
|
|
temp_a0 = arg0->unk4;
|
|
arg0 = temp_a1;
|
|
sp20 = temp_t0;
|
|
if (func_80290C20(temp_a0, temp_a1) == 1) {
|
|
temp_v0_2 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_2 + 8;
|
|
temp_v0_2->words.w0 = 0xFCFFFFFF;
|
|
temp_v0_2->words.w1 = 0xFFFE793C;
|
|
temp_v0_3 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_3 + 8;
|
|
temp_v0_3->words.w0 = 0xB900031D;
|
|
temp_v0_3->words.w1 = 0x552078;
|
|
temp_v0_4 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_4 + 8;
|
|
temp_v0_4->words.w0 = 0x6000000;
|
|
temp_v0_4->words.w1 = 0x7003050;
|
|
}
|
|
temp_v0_5 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_5 + 8;
|
|
temp_v0_5->words.w1 = 0x20000;
|
|
temp_v0_5->words.w0 = 0xB6000000;
|
|
temp_v0_6 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_6 + 8;
|
|
temp_v0_6->words.w0 = 0xFC121824;
|
|
temp_v0_6->words.w1 = 0xFF33FFFF;
|
|
temp_v0_7 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_7 + 8;
|
|
temp_v0_7->words.w0 = 0xB900031D;
|
|
temp_v0_7->words.w1 = 0x552078;
|
|
temp_v0_8 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_8 + 8;
|
|
temp_v0_8->words.w1 = 0;
|
|
temp_v0_8->words.w0 = 0xE7000000;
|
|
temp_v0_9 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_9 + 8;
|
|
temp_v0_9->words.w1 = -1;
|
|
temp_v0_9->words.w0 = 0xBB000001;
|
|
switch (sp22) {
|
|
case 1:
|
|
case 2:
|
|
case 17:
|
|
if ((temp_t0 == 2) || (temp_t0 == 1)) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 3:
|
|
if (temp_t0 != 0) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 4:
|
|
if (temp_t0 == 0) {
|
|
func_80291198();
|
|
} else {
|
|
if (temp_t0 == 1) {
|
|
func_80291198();
|
|
}
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 5:
|
|
case 6:
|
|
if ((temp_t0 == 2) || (temp_t0 == 3)) {
|
|
func_802911C4();
|
|
} else {
|
|
func_80291198();
|
|
}
|
|
break;
|
|
case 7:
|
|
sp20 = temp_t0;
|
|
func_80291198();
|
|
if ((temp_t0 == 2) || (temp_t0 == 3)) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 8:
|
|
case 9:
|
|
if (temp_t0 != 1) {
|
|
sp20 = temp_t0;
|
|
func_802911C4();
|
|
}
|
|
|
|
case 10:
|
|
if (temp_t0 != 2) {
|
|
func_80291198();
|
|
}
|
|
break;
|
|
case 11:
|
|
if (temp_t0 == 0) {
|
|
func_802911C4();
|
|
func_80291198();
|
|
} else if (temp_t0 == 3) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 12:
|
|
if ((temp_t0 == 0) || (temp_t0 == 3)) {
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
case 13:
|
|
case 14:
|
|
if (temp_t0 != 1) {
|
|
case 15:
|
|
case 16:
|
|
func_802911C4();
|
|
}
|
|
break;
|
|
}
|
|
temp_v0_10 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_10 + 8;
|
|
temp_v0_10->words.w0 = 0xFC121824;
|
|
temp_v0_10->words.w1 = 0xFF33FFFF;
|
|
temp_v0_11 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_11 + 8;
|
|
temp_v0_11->words.w0 = 0xB900031D;
|
|
temp_v0_11->words.w1 = 0x552078;
|
|
temp_v0_12 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_12 + 8;
|
|
temp_v0_12->words.w0 = 0x6000000;
|
|
temp_v0_12->words.w1 = 0x7003508;
|
|
temp_v0_13 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_13 + 8;
|
|
temp_v0_13->words.w0 = 0x6000000;
|
|
temp_v0_13->words.w1 = 0x7003240;
|
|
temp_v0_14 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_14 + 8;
|
|
temp_v0_14->words.w1 = 0x70014A0;
|
|
temp_v0_14->words.w0 = 0x6000000;
|
|
load_surface_map(&mario_raceway_dls, arg0);
|
|
temp_v0_15 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_15 + 8;
|
|
temp_v0_15->words.w1 = -0xC07;
|
|
temp_v0_15->words.w0 = 0xFC127E24;
|
|
temp_v0_16 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_16 + 8;
|
|
temp_v0_16->words.w0 = 0xB900031D;
|
|
temp_v0_16->words.w1 = 0x553078;
|
|
temp_v0_17 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_17 + 8;
|
|
temp_v0_17->words.w1 = 0x2000;
|
|
temp_v0_17->words.w0 = 0xB6000000;
|
|
temp_v0_18 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_18 + 8;
|
|
temp_v0_18->words.w0 = 0x6000000;
|
|
temp_v0_18->words.w1 = 0x7000450;
|
|
temp_v0_19 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_19 + 8;
|
|
temp_v0_19->words.w0 = 0x6000000;
|
|
temp_v0_19->words.w1 = 0x7000240;
|
|
temp_v0_20 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_20 + 8;
|
|
temp_v0_20->words.w1 = 0x2000;
|
|
temp_v0_20->words.w0 = 0xB7000000;
|
|
temp_v0_21 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_21 + 8;
|
|
temp_v0_21->words.w1 = 0x70000E0;
|
|
temp_v0_21->words.w0 = 0x6000000;
|
|
temp_v0_22 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_22 + 8;
|
|
temp_v0_22->words.w0 = 0x6000000;
|
|
temp_v0_22->words.w1 = 0x7000160;
|
|
*/
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/render_mario_raceway.s")
|
|
#endif
|
|
|
|
extern s32 D_801625EC;
|
|
extern s32 D_801625F0;
|
|
extern s32 D_801625F4;
|
|
extern s16 D_802B87B0;
|
|
extern s16 D_802B87B4;
|
|
extern Gfx choco_mountain_dls[];
|
|
|
|
void render_choco_mountain(struct UnkStruct_800DC5EC *arg0) {
|
|
s32 pad[13];
|
|
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07004608);
|
|
}
|
|
gDPSetCycleType(gDisplayListHead++, G_CYC_2CYCLE);
|
|
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
|
|
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
|
|
|
gDPPipeSync(gDisplayListHead++);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_FOG);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATERGB, G_CC_PASS2);
|
|
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPDisplayList(gDisplayListHead++, 0x07005A70);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000828);
|
|
gSPDisplayList(gDisplayListHead++, 0x070008E0);
|
|
gSPDisplayList(gDisplayListHead++, 0x07005868);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
|
|
load_surface_map(&choco_mountain_dls, arg0);
|
|
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_PASS2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000448);
|
|
gSPDisplayList(gDisplayListHead++, 0x070005D8);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000718);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_FOG);
|
|
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
|
gDPPipeSync(gDisplayListHead++);
|
|
|
|
}
|
|
|
|
extern s32 D_802B87BC;
|
|
extern Gfx bowsers_castle_dls[];
|
|
|
|
void render_bowsers_castle(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07006A80);
|
|
}
|
|
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
|
|
D_802B87BC++;
|
|
if (D_802B87BC > 255) {
|
|
D_802B87BC = 0;
|
|
}
|
|
load_surface_map(&bowsers_castle_dls, arg0);
|
|
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000248);
|
|
}
|
|
|
|
extern Gfx banshee_boardwalk_dls[];
|
|
extern Gfx D_0600B278[];
|
|
|
|
extern void mtxf_translate(Mat4 dest, Vec3f b);
|
|
extern void func_802B4FF8(Mat4 arg0, s32 arg1);
|
|
void render_banshee_boardwalk(struct UnkStruct_800DC5EC *arg0) {
|
|
Camera *camera = arg0->camera;
|
|
Mat4 spCC;
|
|
s32 pad[6];
|
|
Vec3f spA8;
|
|
s32 pad2[6];
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
|
gSPDisplayList(gDisplayListHead++, 0x07007228);
|
|
|
|
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
|
|
|
gDPPipeSync(gDisplayListHead++);
|
|
|
|
gSPClearGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BOTH | G_FOG |
|
|
G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPDisplayList(gDisplayListHead++, 0x07005CD0);
|
|
gSPDisplayList(gDisplayListHead++, 0x07004E60);
|
|
gSPDisplayList(gDisplayListHead++, 0x070069B0);
|
|
|
|
load_surface_map(&banshee_boardwalk_dls, arg0);
|
|
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000580);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000060);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000540);
|
|
|
|
if (camera->pos[1] < -20.0f) {
|
|
gSPDisplayList(gDisplayListHead++, 0x07006310);
|
|
}
|
|
spA8[0] = camera->pos[0];
|
|
spA8[1] = -82.0f;
|
|
spA8[2] = camera->pos[2];
|
|
mtxf_translate(spCC, spA8);
|
|
func_802B4FF8(spCC, 0);
|
|
|
|
gSPDisplayList(gDisplayListHead++, D_0600B278);
|
|
gDPPipeSync(gDisplayListHead++);
|
|
}
|
|
|
|
extern Gfx yoshi_valley_dls;
|
|
|
|
void render_yoshi_valley(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gDPPipeSync(gDisplayListHead++);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
load_surface_map(&yoshi_valley_dls, arg0);
|
|
gDPPipeSync(gDisplayListHead++);
|
|
}
|
|
|
|
extern u8 frappe_snowland_dls[];
|
|
|
|
void render_frappe_snowland(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x070065E0);
|
|
}
|
|
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
load_surface_map(&frappe_snowland_dls, arg0);
|
|
}
|
|
|
|
extern Gfx koopa_troopa_beach_dls[];
|
|
|
|
void render_koopa_troopa_beach(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gDPPipeSync(gDisplayListHead++);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07009CC0);
|
|
}
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07009688);
|
|
load_surface_map(&koopa_troopa_beach_dls, arg0);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPDisplayList(gDisplayListHead++, 0x070002C0);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gDPPipeSync(gDisplayListHead++);
|
|
}
|
|
|
|
extern Gfx royal_raceway_dls[];
|
|
|
|
void render_royal_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x0700B030);
|
|
}
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x0700A648);
|
|
|
|
load_surface_map(&royal_raceway_dls, arg0);
|
|
|
|
gSPDisplayList(gDisplayListHead++, 0x070011A8);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gSPDisplayList(gDisplayListHead++, 0x070008A0);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
}
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
|
extern void func_802A7658(s32, s32, s32, s32, s32, s32);
|
|
extern Gfx luigi_raceway_dls[];
|
|
|
|
extern s32 D_800DC5DC;
|
|
extern s32 D_800DC5E0;
|
|
extern s32 gActiveScreenMode;
|
|
extern s16 D_802B87D8;
|
|
|
|
void render_luigi_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
u16 sp22 = arg0->cameraHeight;
|
|
s16 phi_v0;
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07009EC0);
|
|
}
|
|
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
|
|
load_surface_map(&luigi_raceway_dls, arg0);
|
|
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPDisplayList(gDisplayListHead++, 0x070000E0);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000068);
|
|
|
|
D_800DC5DC = 88;
|
|
D_800DC5E0 = 72;
|
|
if ((gActiveScreenMode == 0) && (sp22 >= 10) && (sp22 < 17)) {
|
|
|
|
phi_v0 = sRenderedFramebuffer - 1;
|
|
|
|
if (phi_v0 < 0) {
|
|
phi_v0 = 2;
|
|
} else if (phi_v0 >= 3) {
|
|
phi_v0 = 0;
|
|
}
|
|
D_802B87D8++;
|
|
if (D_802B87D8 >= 6) {
|
|
D_802B87D8 = 0;
|
|
}
|
|
switch (D_802B87D8) {
|
|
case 0:
|
|
func_802A7658(D_800DC5DC, D_800DC5E0, 64, 32, VIRTUAL_TO_PHYSICAL(gPhysicalFramebuffers[phi_v0]), VIRTUAL_TO_PHYSICAL(gSegmentTable[20] + 0xF800));
|
|
break;
|
|
case 1:
|
|
func_802A7658(D_800DC5DC + 64, D_800DC5E0, 64, 32, VIRTUAL_TO_PHYSICAL(gPhysicalFramebuffers[phi_v0]), VIRTUAL_TO_PHYSICAL(gSegmentTable[20] + 0x10800));
|
|
break;
|
|
case 2:
|
|
func_802A7658(D_800DC5DC, D_800DC5E0 + 32, 64, 32, VIRTUAL_TO_PHYSICAL(gPhysicalFramebuffers[phi_v0]), VIRTUAL_TO_PHYSICAL(gSegmentTable[20] + 0x11800));
|
|
break;
|
|
case 3:
|
|
func_802A7658(D_800DC5DC + 64, D_800DC5E0 + 32, 64, 32, VIRTUAL_TO_PHYSICAL(gPhysicalFramebuffers[phi_v0]), VIRTUAL_TO_PHYSICAL(gSegmentTable[20] + 0x12800));
|
|
break;
|
|
case 4:
|
|
func_802A7658(D_800DC5DC, D_800DC5E0 + 64, 64, 32, VIRTUAL_TO_PHYSICAL(gPhysicalFramebuffers[phi_v0]), VIRTUAL_TO_PHYSICAL(gSegmentTable[20] + 0x13800));
|
|
break;
|
|
case 5:
|
|
func_802A7658(D_800DC5DC + 64, D_800DC5E0 + 64, 64, 32, VIRTUAL_TO_PHYSICAL(gPhysicalFramebuffers[phi_v0]), VIRTUAL_TO_PHYSICAL(gSegmentTable[20] + 0x14800));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/render_luigi_raceway.s")
|
|
#endif
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
|
extern void func_802B5D64(u32, u16, s32, s32); // extern
|
|
extern Gfx D_06013FF8;
|
|
extern Gfx D_06014060;
|
|
extern s32 D_800DC610;
|
|
extern s16 D_802B87B0;
|
|
extern s16 D_802B87B4;
|
|
extern s16 D_802B87D4;
|
|
extern s32 *gDisplayListHead;
|
|
extern Gfx moo_moo_farm_dls[];
|
|
extern Gfx D_06013FF8;
|
|
extern Gfx D_06014060;
|
|
|
|
void render_moo_moo_farm(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07004DF8);
|
|
gSPDisplayList(gDisplayListHead++, 0x07005640);
|
|
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
|
|
|
load_surface_map(&moo_moo_farm_dls, arg0);
|
|
|
|
if ((temp_s0 < 14) && (temp_s0 > 10)) {
|
|
if ((temp_s1 == 2) || (temp_s1 == 3) || (temp_s1 == 1)) {
|
|
gSPDisplayList(gDisplayListHead++, D_06013FF8);
|
|
}
|
|
} else {
|
|
if (temp_s0 < 16) {
|
|
gSPDisplayList(gDisplayListHead++, D_06013FF8);
|
|
}
|
|
if (temp_s0 < 19) {
|
|
if (temp_s1 != 2) {
|
|
gSPDisplayList(gDisplayListHead++, D_06013FF8);
|
|
}
|
|
} else if ((temp_s0 < 20) && (temp_s1 == 0)) {
|
|
gSPDisplayList(gDisplayListHead++, D_06013FF8);
|
|
}
|
|
}
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
|
|
if ((temp_s0 >= 16) && (temp_s0 < 24)) {
|
|
if ((temp_s1 == 2) || (temp_s1 == 3)) {
|
|
gSPDisplayList(gDisplayListHead++, 0x07005410);
|
|
}
|
|
} else if ((temp_s0 < 9) && (temp_s1 == 2)) {
|
|
gSPDisplayList(gDisplayListHead++, 0x07005410);
|
|
}
|
|
if (temp_s0 < 4) {
|
|
if (temp_s1 != 0) {
|
|
gSPDisplayList(gDisplayListHead++, D_06014060);
|
|
}
|
|
} else if (temp_s0 < 8) {
|
|
if (temp_s1 == 2) {
|
|
gSPDisplayList(gDisplayListHead++, D_06014060);
|
|
}
|
|
} else {
|
|
if (temp_s0 >= 22) {
|
|
gSPDisplayList(gDisplayListHead++, D_06014060);
|
|
}
|
|
if ((temp_s0 >= 18) && ((temp_s1 == 0) || (temp_s1 == 3))) {
|
|
gSPDisplayList(gDisplayListHead++, D_06014060);
|
|
}
|
|
}
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEIDECALA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPDisplayList(gDisplayListHead++, 0x070010C0);
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/render_moo_moo_farm.s")
|
|
#endif
|
|
|
|
extern s32 D_801625EC;
|
|
extern s32 D_801625F0;
|
|
extern s32 D_801625F4;
|
|
extern s16 D_802B87B0;
|
|
extern s16 D_802B87B4;
|
|
extern s16 D_802B87D4;
|
|
|
|
extern Gfx toads_turnpike_dls[];
|
|
|
|
extern Lights1 D_800DC610[]; // Light data?
|
|
|
|
void render_toads_turnpike(struct UnkStruct_800DC5EC *arg0) {
|
|
s32 pad[13];
|
|
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
|
|
gDPSetCycleType(gDisplayListHead++, G_CYC_2CYCLE);
|
|
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_FOG);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_PASS2);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2);
|
|
|
|
load_surface_map(&toads_turnpike_dls, arg0);
|
|
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_PASS2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000000);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000068);
|
|
gSPDisplayList(gDisplayListHead++, 0x070000D8);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_FOG);
|
|
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
|
}
|
|
|
|
extern u8 kalimari_desert_dls[];
|
|
|
|
void render_kalimari_desert(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x070071C8);
|
|
}
|
|
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
load_surface_map(&kalimari_desert_dls, arg0);
|
|
gSPDisplayList(gDisplayListHead++, 0x07001ED8);
|
|
gSPDisplayList(gDisplayListHead++, 0x07001B18);
|
|
gSPDisplayList(gDisplayListHead++, 0x07008330);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000998);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000270);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
}
|
|
|
|
extern u8 sherbet_land_dls[];
|
|
|
|
void render_sherbet_land(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
load_surface_map(&sherbet_land_dls, arg0);
|
|
}
|
|
|
|
void render_rainbow_road(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
}
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
|
? func_802A7658(s32, s32, ?, ?, s32, s32); /* extern */
|
|
? load_surface_map(? *, void *); /* extern */
|
|
extern Gfx wario_stadium_dls[];
|
|
|
|
void render_wario_stadium(void *arg0) {
|
|
Gfx *temp_v0;
|
|
Gfx *temp_v0_10;
|
|
Gfx *temp_v0_11;
|
|
Gfx *temp_v0_12;
|
|
Gfx *temp_v0_13;
|
|
Gfx *temp_v0_14;
|
|
Gfx *temp_v0_2;
|
|
Gfx *temp_v0_3;
|
|
Gfx *temp_v0_4;
|
|
Gfx *temp_v0_5;
|
|
Gfx *temp_v0_6;
|
|
Gfx *temp_v0_7;
|
|
Gfx *temp_v0_8;
|
|
Gfx *temp_v0_9;
|
|
s16 temp_v0_15;
|
|
s16 phi_v0;
|
|
|
|
temp_v0 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0 + 8;
|
|
temp_v0->words.w1 = -1;
|
|
temp_v0->words.w0 = 0xBB000001;
|
|
temp_v0_2 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_2 + 8;
|
|
temp_v0_2->words.w1 = 0x200;
|
|
temp_v0_2->words.w0 = 0xB7000000;
|
|
temp_v0_3 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_3 + 8;
|
|
temp_v0_3->words.w1 = 0x20000;
|
|
temp_v0_3->words.w0 = 0xB6000000;
|
|
if (func_80290C20(arg0->unk4) == 1) {
|
|
temp_v0_4 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_4 + 8;
|
|
temp_v0_4->words.w0 = 0xFCFFFFFF;
|
|
temp_v0_4->words.w1 = 0xFFFE793C;
|
|
temp_v0_5 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_5 + 8;
|
|
temp_v0_5->words.w1 = 0x552078;
|
|
temp_v0_5->words.w0 = 0xB900031D;
|
|
temp_v0_6 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_6 + 8;
|
|
temp_v0_6->words.w0 = 0x6000000;
|
|
temp_v0_6->words.w1 = 0x700A0C8;
|
|
}
|
|
temp_v0_7 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_7 + 8;
|
|
temp_v0_7->words.w0 = 0xFC121824;
|
|
temp_v0_7->words.w1 = 0xFF33FFFF;
|
|
temp_v0_8 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_8 + 8;
|
|
temp_v0_8->words.w1 = 0x552078;
|
|
temp_v0_8->words.w0 = 0xB900031D;
|
|
load_surface_map(&wario_stadium_dls, arg0);
|
|
temp_v0_9 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_9 + 8;
|
|
temp_v0_9->words.w1 = 0x700A228;
|
|
temp_v0_9->words.w0 = 0x6000000;
|
|
temp_v0_10 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_10 + 8;
|
|
temp_v0_10->words.w1 = -0xC07;
|
|
temp_v0_10->words.w0 = 0xFC127E24;
|
|
temp_v0_11 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_11 + 8;
|
|
temp_v0_11->words.w1 = 0x553078;
|
|
temp_v0_11->words.w0 = 0xB900031D;
|
|
temp_v0_12 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_12 + 8;
|
|
temp_v0_12->words.w1 = 0x2000;
|
|
temp_v0_12->words.w0 = 0xB6000000;
|
|
temp_v0_13 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_13 + 8;
|
|
temp_v0_13->words.w1 = 0x7000A88;
|
|
temp_v0_13->words.w0 = 0x6000000;
|
|
temp_v0_14 = gDisplayListHead;
|
|
gDisplayListHead = temp_v0_14 + 8;
|
|
temp_v0_14->words.w1 = 0x2000;
|
|
temp_v0_14->words.w0 = 0xB7000000;
|
|
D_800DC5DC = 0x58;
|
|
D_800DC5E0 = 0x48;
|
|
if (gActiveScreenMode == 0) {
|
|
temp_v0_15 = sRenderedFramebuffer - 1;
|
|
phi_v0 = temp_v0_15;
|
|
if (temp_v0_15 < 0) {
|
|
phi_v0 = 2;
|
|
} else if (temp_v0_15 >= 3) {
|
|
phi_v0 = 0;
|
|
}
|
|
D_802B87D8 += 1;
|
|
if (D_802B87D8 >= 6) {
|
|
D_802B87D8 = 0;
|
|
}
|
|
switch (D_802B87D8) {
|
|
case 0:
|
|
func_802A7658(D_800DC5DC, D_800DC5E0, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x8800) | 0x80000000);
|
|
return;
|
|
case 1:
|
|
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x9800) | 0x80000000);
|
|
return;
|
|
case 2:
|
|
func_802A7658(D_800DC5DC, D_800DC5E0 + 0x20, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xA800) | 0x80000000);
|
|
return;
|
|
case 3:
|
|
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x20, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xB800) | 0x80000000);
|
|
return;
|
|
case 4:
|
|
func_802A7658(D_800DC5DC, D_800DC5E0 + 0x40, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xC800) | 0x80000000);
|
|
return;
|
|
case 5:
|
|
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x40, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xD800) | 0x80000000);
|
|
/* Duplicate return node #17. Try simplifying control flow for better match */
|
|
return;
|
|
}
|
|
} else {
|
|
default:
|
|
}
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/render_wario_stadium.s")
|
|
#endif
|
|
|
|
void render_block_fort(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPDisplayList(gDisplayListHead++, 0x070015C0);
|
|
|
|
}
|
|
|
|
void render_skyscraper(struct UnkStruct_800DC5EC *arg0) {
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000FE8);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000C60);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000B70);
|
|
gSPDisplayList(gDisplayListHead++, 0x070006B8);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000570);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gSPDisplayList(gDisplayListHead++, 0x070010C8);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000258);
|
|
|
|
}
|
|
|
|
void render_double_deck(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000738);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
}
|
|
|
|
extern s16 D_802B87D0;
|
|
|
|
extern Gfx dks_jungle_parkway_dls[];
|
|
|
|
void render_dks_jungle_parkway(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
func_802B5D64(&D_800DC610[1], D_802B87D4, D_802B87D0, 1);
|
|
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK | G_LIGHTING);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x070092D8);
|
|
}
|
|
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
|
load_surface_map(&dks_jungle_parkway_dls, arg0);
|
|
|
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
|
|
|
}
|
|
|
|
void render_big_donut(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
|
|
if (func_80290C20(arg0->camera) == 1) {
|
|
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000DE8);
|
|
|
|
}
|
|
gSPDisplayList(gDisplayListHead++, 0x07000450);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000AC0);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000D20);
|
|
gSPDisplayList(gDisplayListHead++, 0x07000230);
|
|
}
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
|
extern Gfx D_060071B0[];
|
|
extern Gfx D_060076A0[];
|
|
extern Gfx D_06009148[];
|
|
extern Gfx D_06009348[];
|
|
extern Gfx D_06009AE8[];
|
|
extern Gfx D_0600B308[];
|
|
extern Gfx D_0600CA78[];
|
|
extern Gfx D_0600D8E8[];
|
|
extern Gfx D_0600FD40[];
|
|
extern Gfx D_06013C30[];
|
|
extern Gfx D_06014088[];
|
|
extern Gfx D_06016220[];
|
|
extern Gfx D_06018020[];
|
|
extern Gfx D_06018D68[];
|
|
extern Gfx D_06022E00[];
|
|
extern Gfx D_06023930[];
|
|
|
|
void func_8029569C(void) {
|
|
|
|
|
|
switch (gCurrentCourseId) {
|
|
case 0:
|
|
gSPDisplayList(gDisplayListHead++, D_06009348);
|
|
break;
|
|
case 1:
|
|
gSPDisplayList(gDisplayListHead++, D_060071B0);
|
|
break;
|
|
case 2:
|
|
gSPDisplayList(gDisplayListHead++, D_06009148);
|
|
break;
|
|
case 3:
|
|
gSPDisplayList(gDisplayListHead++, D_0600B308);
|
|
break;
|
|
case 4:
|
|
gSPDisplayList(gDisplayListHead++, D_06018020);
|
|
break;
|
|
case 5:
|
|
gSPDisplayList(gDisplayListHead++, D_060076A0);
|
|
break;
|
|
case 6:
|
|
gSPDisplayList(gDisplayListHead++, D_06018D68);
|
|
break;
|
|
case 7:
|
|
gSPDisplayList(gDisplayListHead++, D_0600D8E8);
|
|
break;
|
|
case 8:
|
|
gSPDisplayList(gDisplayListHead++, D_0600FD40);
|
|
break;
|
|
case 9:
|
|
gSPDisplayList(gDisplayListHead++, D_06014088);
|
|
break;
|
|
case 10:
|
|
gSPDisplayList(gDisplayListHead++, D_06023930);
|
|
break;
|
|
case 11:
|
|
gSPDisplayList(gDisplayListHead++, D_06022E00);
|
|
break;
|
|
case 12:
|
|
gSPDisplayList(gDisplayListHead++, D_06009AE8);
|
|
break;
|
|
case 13:
|
|
gSPDisplayList(gDisplayListHead++, D_06016220);
|
|
break;
|
|
case 14:
|
|
gSPDisplayList(gDisplayListHead++, D_0600CA78);
|
|
break;
|
|
case 15:
|
|
gSPDisplayList(gDisplayListHead++, 0x06000000);
|
|
break;
|
|
case 16:
|
|
gSPDisplayList(gDisplayListHead++, 0x06000000);
|
|
break;
|
|
case 17:
|
|
gSPDisplayList(gDisplayListHead++, 0x06000000);
|
|
break;
|
|
case 18:
|
|
gSPDisplayList(gDisplayListHead++, D_06013C30);
|
|
break;
|
|
case 19:
|
|
gSPDisplayList(gDisplayListHead++, 0x06000000);
|
|
break;
|
|
}
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/func_8029569C.s")
|
|
#endif
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
|
|
|
|
|
|
|
extern u16 D_800DC518;
|
|
|
|
void func_80295A38(struct UnkStruct_800DC5EC *arg0) {
|
|
|
|
func_802B5D64(&D_800DC610, D_802B87D4, 0, 1);
|
|
if (D_800DC518 != 0) {
|
|
func_8029569C();
|
|
return;
|
|
}
|
|
|
|
switch (gCurrentCourseId) {
|
|
case 0:
|
|
render_mario_raceway(arg0);
|
|
return;
|
|
case 1:
|
|
render_choco_mountain(arg0);
|
|
return;
|
|
case 2:
|
|
render_bowsers_castle(arg0);
|
|
return;
|
|
case 3:
|
|
render_banshee_boardwalk(arg0);
|
|
return;
|
|
case 4:
|
|
render_yoshi_valley(arg0);
|
|
return;
|
|
case 5:
|
|
render_frappe_snowland(arg0);
|
|
return;
|
|
case 6:
|
|
render_koopa_troopa_beach(arg0);
|
|
return;
|
|
case 7:
|
|
render_royal_raceway(arg0);
|
|
return;
|
|
case 8:
|
|
render_luigi_raceway(arg0);
|
|
return;
|
|
case 9:
|
|
render_moo_moo_farm(arg0);
|
|
return;
|
|
case 10:
|
|
render_toads_turnpike(arg0);
|
|
return;
|
|
case 11:
|
|
render_kalimari_desert(arg0);
|
|
return;
|
|
case 12:
|
|
render_sherbet_land(arg0);
|
|
return;
|
|
case 13:
|
|
render_rainbow_road(arg0);
|
|
return;
|
|
case 14:
|
|
render_wario_stadium(arg0);
|
|
return;
|
|
case 15:
|
|
render_block_fort(arg0);
|
|
return;
|
|
case 16:
|
|
render_skyscraper(arg0);
|
|
return;
|
|
case 17:
|
|
render_double_deck(arg0);
|
|
return;
|
|
case 18:
|
|
render_dks_jungle_parkway(arg0);
|
|
return;
|
|
case 19:
|
|
render_big_donut(arg0);
|
|
}
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/func_80295A38.s")
|
|
#endif
|
|
|
|
void func_80295BF8(s32 playerIndex) {
|
|
Player* player = &gPlayers[playerIndex];
|
|
func_802AAAAC(&player->unk_110);
|
|
player->boundingBoxCorners[FRONT_RIGHT_TYRE].surfaceFlags = 0;
|
|
player->boundingBoxCorners[FRONT_LEFT_TYRE].surfaceFlags = 0;
|
|
player->boundingBoxCorners[BACK_RIGHT_TYRE].surfaceFlags = 0;
|
|
player->boundingBoxCorners[BACK_LEFT_TYRE].surfaceFlags = 0;
|
|
|
|
player->boundingBoxCorners[FRONT_RIGHT_TYRE].surfaceMapIndex = 0x1388;
|
|
player->boundingBoxCorners[FRONT_LEFT_TYRE].surfaceMapIndex = 0x1388;
|
|
player->boundingBoxCorners[BACK_RIGHT_TYRE].surfaceMapIndex = 0x1388;
|
|
player->boundingBoxCorners[BACK_LEFT_TYRE].surfaceMapIndex = 0x1388;
|
|
}
|
|
|
|
|
|
extern void func_802AF314(u16 *, s16 *, s16 *, s16 *);
|
|
extern u16 D_8015F58A;
|
|
|
|
extern s16 D_8015F700;
|
|
extern s16 D_8015F702;
|
|
extern f32 D_8015F8E8;
|
|
extern f32 D_8015F8E4;
|
|
|
|
extern s16 D_8015F6E8;
|
|
extern s16 D_8015F6F0;
|
|
extern s16 D_8015F6EA;
|
|
extern s16 D_8015F6F2;
|
|
extern s16 D_8015F6EE;
|
|
extern u16 D_8015F588;
|
|
|
|
#define ALIGNF(x) (((x) + 0xF) & ~0xF)
|
|
|
|
void func_80295C6C(void) {
|
|
gPrevLoadedAddress += ALIGNF(D_8015F588 * 0x2C);
|
|
D_8015F6E8 += 20;
|
|
D_8015F6F0 += 20;
|
|
D_8015F6EA += -20;
|
|
D_8015F6F2 += -20;
|
|
D_8015F6EE += -20;
|
|
func_802AF314(&D_8015F6F0, &D_8015F6EA, &D_8015F6F2, &D_8015F6EE);
|
|
gPrevLoadedAddress += ALIGNF(D_8015F58A * 2);
|
|
}
|
|
|
|
|
|
extern s16 D_8015F6F4;
|
|
extern s16 D_8015F6F6;
|
|
|
|
UNUSED void func_80295D50(s16 arg0, s16 arg1) {
|
|
D_8015F6F4 = arg1;
|
|
D_8015F6F6 = arg0;
|
|
}
|
|
|
|
extern s16 D_8015F6F4;
|
|
extern s16 D_8015F6F6;
|
|
|
|
void func_80295D6C(void) {
|
|
D_8015F6F4 = 3000;
|
|
D_8015F6F6 = -3000;
|
|
}
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
|
? func_80290CAC(? *); /* extern */
|
|
? func_80295C6C(); /* extern */
|
|
? func_80295D6C(); /* extern */
|
|
? func_802AAA70(?); /* extern */
|
|
? func_802AF588(?); /* extern */
|
|
? func_802AF5AC(?, ?); /* extern */
|
|
? func_802AF8BC(?, ?, ?, ?, s32); /* extern */
|
|
? func_802B5CAC(?, ?, ? *); /* extern */
|
|
? func_802B5D64(? *, ?, ?, ?); /* extern */
|
|
extern ? D_060072D0;
|
|
extern ? D_060079A0;
|
|
extern ? D_060093D8;
|
|
extern ? D_06009650;
|
|
extern ? D_06009C20;
|
|
extern ? D_0600B458;
|
|
extern ? D_0600CC38;
|
|
extern ? D_0600DC28;
|
|
extern ? D_0600FF28;
|
|
extern ? D_06014338;
|
|
extern ? D_060144B8;
|
|
extern ? D_06016440;
|
|
extern ? D_06016558;
|
|
extern ? D_06018240;
|
|
extern ? D_06018FD8;
|
|
extern ? D_06023070;
|
|
extern ? D_06023B68;
|
|
extern ? D_8015F590;
|
|
s16 D_800DC5BC; /* unable to generate initializer */
|
|
s16 D_800DC5C8; /* unable to generate initializer */
|
|
s16 D_802B87B0; /* unable to generate initializer */
|
|
s16 D_802B87D0; /* unable to generate initializer */
|
|
s16 D_802B87D4; /* unable to generate initializer */
|
|
u16 gCurrentCourseId; /* unable to generate initializer */
|
|
|
|
void func_80295D88(void) {
|
|
u16 temp_t7;
|
|
f32 phi_f10;
|
|
|
|
gNumActors = 0;
|
|
D_8015F6EA = 0;
|
|
D_8015F6EE = 0;
|
|
D_8015F6F2 = 0;
|
|
D_8015F6E8 = 0;
|
|
D_8015F6EC = 0;
|
|
D_8015F6F0 = 0;
|
|
D_8015F59C = 0;
|
|
D_8015F5A0 = 0;
|
|
func_80295D6C();
|
|
D_8015F58C = 0;
|
|
D_8015F588 = 0;
|
|
D_8015F580 = gPrevLoadedAddress;
|
|
D_800DC5BC = 0;
|
|
D_800DC5C8 = 0;
|
|
temp_t7 = gCurrentCourseId;
|
|
switch (temp_t7) {
|
|
case 0:
|
|
func_802AF588(0x7001140);
|
|
if (gScreenModeSelection == SCREEN_MODE_1P) {
|
|
func_802AF588(0x70008E8);
|
|
} else {
|
|
func_802AF588(0x7002D68);
|
|
}
|
|
func_80290CAC(&D_06009650);
|
|
func_80295C6C();
|
|
phi_f10 = D_8015F6EE - 10.0f;
|
|
block_29:
|
|
D_8015F8E4 = phi_f10;
|
|
default:
|
|
return;
|
|
case 1:
|
|
D_800DC5BC = 1;
|
|
D_801625EC = 0xFF;
|
|
D_801625F4 = 0xFF;
|
|
D_801625F0 = 0xFF;
|
|
D_802B87B0 = 0x3E3;
|
|
D_802B87B4 = 0x3E8;
|
|
D_802B87D4 = 0x71C;
|
|
D_802B87D0 = 0xE38;
|
|
if ((gCCSelection != CC_50) && (gModeSelection != TIME_TRIALS)) {
|
|
func_802AAA70(0x7000000);
|
|
func_802AAA70(0x7000098);
|
|
func_802AAA70(0x7000178);
|
|
func_802AAA70(0x7000280);
|
|
func_802AAA70(0x7000340);
|
|
func_802AAA70(0x70003C8);
|
|
}
|
|
func_80290CAC(&D_060072D0);
|
|
func_802B5CAC(0x238E, 0x31C7, &D_8015F590);
|
|
func_80295C6C();
|
|
D_8015F8E4 = -80.0f;
|
|
return;
|
|
case 2:
|
|
func_80290CAC(&D_060093D8);
|
|
func_80295C6C();
|
|
func_802AF8BC(0x7001350, 0x32, 0, 0, 0);
|
|
D_8015F8E4 = -50.0f;
|
|
return;
|
|
case 3:
|
|
D_800DC5BC = 1;
|
|
D_801625EC = 0;
|
|
D_801625F4 = 0;
|
|
D_801625F0 = 0;
|
|
func_80290CAC(&D_0600B458);
|
|
func_80295C6C();
|
|
func_802AF8BC(0x7000878, -0x80, 0, 0, 0);
|
|
D_8015F8E4 = -80.0f;
|
|
return;
|
|
case 4:
|
|
func_802B5D64(&D_06016558, -0x38F0, 0x1C70, 1);
|
|
func_80290CAC(&D_06018240);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
return;
|
|
case 5:
|
|
func_80290CAC(&D_060079A0);
|
|
func_80295C6C();
|
|
D_8015F8E4 = -50.0f;
|
|
return;
|
|
case 6:
|
|
func_80290CAC(&D_06018FD8);
|
|
func_80295C6C();
|
|
func_802AF8BC(0x700ADE0, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x700A540, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7009E70, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000358, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
return;
|
|
case 7:
|
|
func_80290CAC(&D_0600DC28);
|
|
func_80295C6C();
|
|
D_8015F8E4 = -60.0f;
|
|
return;
|
|
case 8:
|
|
func_80290CAC(&D_0600FF28);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
return;
|
|
case 9:
|
|
func_80290CAC(&D_060144B8);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
return;
|
|
case 10:
|
|
D_801625EC = 0x2B;
|
|
D_801625F4 = 0xD;
|
|
D_801625F0 = 4;
|
|
D_802B87B0 = 0x3E1;
|
|
D_802B87B4 = 0x3E8;
|
|
func_80290CAC(&D_06023B68);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
return;
|
|
case 11:
|
|
func_80290CAC(&D_06023070);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
return;
|
|
case 12:
|
|
func_80290CAC(&D_06009C20);
|
|
func_80295C6C();
|
|
D_8015F8E4 = -18.0f;
|
|
func_802AF8BC(0x7001EB8, -0x4C, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7002308, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
return;
|
|
case 13:
|
|
D_800DC5C8 = 1;
|
|
func_80290CAC(&D_06016440);
|
|
func_80295C6C();
|
|
D_8015F8E4 = 0.0f;
|
|
func_802AF8BC(0x7002068, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7001E18, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7001318, -1, 0xFF, 0xFF, 0);
|
|
if (D_800DC50C != CREDITS_SEQUENCE) {
|
|
func_802AF8BC(0x7001FB8, -0x6A, 0xFF, 0xFF, 0xFF);
|
|
return;
|
|
}
|
|
/* Duplicate return node #30. Try simplifying control flow for better match */
|
|
return;
|
|
case 14:
|
|
func_80290CAC(&D_0600CC38);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
func_802AF8BC(0x7000C50, 0x64, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000BD8, 0x64, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000B60, 0x64, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000AE8, 0x64, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000CC8, 0x64, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000D50, 0x64, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000DD0, 0x64, 0xFF, 0xFF, 0xFF);
|
|
func_802AF8BC(0x7000E48, 0x64, 0xFF, 0xFF, 0xFF);
|
|
return;
|
|
case 15:
|
|
func_802AF5AC(0x70015C0, 1);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
return;
|
|
case 16:
|
|
func_802AF5AC(0x7001110, 1);
|
|
func_802AF5AC(0x7000258, 1);
|
|
func_80295C6C();
|
|
phi_f10 = -480.0f;
|
|
goto block_29;
|
|
case 17:
|
|
func_802AF5AC(0x7000738, 1);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_8015F6EE - 10.0f;
|
|
return;
|
|
case 18:
|
|
func_80290CAC(&D_06014338);
|
|
func_80295C6C();
|
|
D_8015F8E4 = D_802B94F4;
|
|
func_802AF8BC(0x7003FA8, 0x78, 0xFF, 0xFF, 0xFF);
|
|
return;
|
|
case 19:
|
|
func_802AF5AC(0x7001018, 6);
|
|
func_802AF5AC(0x7000450, 6);
|
|
func_802AF5AC(0x7000AC0, 6);
|
|
func_802AF5AC(0x7000B58, 6);
|
|
func_802AF5AC(0x7000230, 6);
|
|
func_80295C6C();
|
|
phi_f10 = 100.0f;
|
|
goto block_29;
|
|
}
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/func_80295D88.s")
|
|
#endif
|
|
|
|
#ifdef MIPS_TO_C
|
|
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
|
? func_80298C94(); // extern
|
|
? func_802AF7B4(f32, s32, s32, s32); // extern
|
|
extern ? D_0600B278;
|
|
extern f32 D_8015F8E8;
|
|
extern s32 D_802B87BC;
|
|
extern s32 D_802B87C4;
|
|
extern s32 D_802B87C8;
|
|
extern s32 D_802B87CC;
|
|
|
|
void func_802966A0(void) {
|
|
f32 temp_f0;
|
|
f32 temp_f2;
|
|
f32 temp_f2_2;
|
|
s16 temp_v0;
|
|
s32 temp_a2;
|
|
s32 temp_a2_2;
|
|
s32 temp_a2_3;
|
|
s32 temp_a2_4;
|
|
s32 temp_a2_5;
|
|
s32 temp_t9;
|
|
s32 phi_a2;
|
|
s32 phi_a2_2;
|
|
s32 phi_a2_3;
|
|
f32 phi_f2;
|
|
f32 *phi_v1;
|
|
s32 phi_a2_4;
|
|
s32 phi_a2_5;
|
|
|
|
temp_v0 = gCurrentCourseId;
|
|
if (temp_v0 != 3) {
|
|
if (temp_v0 != 6) {
|
|
if (temp_v0 != 7) {
|
|
if (temp_v0 != 0x12) {
|
|
return;
|
|
}
|
|
temp_a2 = D_802B87BC + 2;
|
|
D_802B87BC = temp_a2;
|
|
phi_a2 = temp_a2;
|
|
if (temp_a2 >= 0x100) {
|
|
D_802B87BC = 0;
|
|
phi_a2 = 0;
|
|
}
|
|
func_802AF7B4(9.647815e-35f, 0, phi_a2);
|
|
func_802AF7B4(9.647943e-35f, 0, D_802B87BC);
|
|
func_802AF7B4(9.648072e-35f, 0, D_802B87BC);
|
|
func_802AF7B4(9.648219e-35f, 0, D_802B87BC);
|
|
func_802AF7B4(9.645712e-35f, 0, D_802B87BC);
|
|
temp_a2_2 = D_802B87C4 - 0x14;
|
|
D_802B87C4 = temp_a2_2;
|
|
phi_a2_2 = temp_a2_2;
|
|
if (temp_a2_2 < 0) {
|
|
D_802B87C4 = 0xFF;
|
|
phi_a2_2 = 0xFF;
|
|
}
|
|
func_802AF7B4(9.674465e-35f, 0, phi_a2_2);
|
|
func_80298C94();
|
|
return;
|
|
}
|
|
temp_a2_3 = D_802B87BC - 0x14;
|
|
D_802B87BC = temp_a2_3;
|
|
phi_a2_3 = temp_a2_3;
|
|
if (temp_a2_3 < 0) {
|
|
D_802B87BC = 0xFF;
|
|
phi_a2_3 = 0xFF;
|
|
}
|
|
func_802AF7B4(9.678626e-35f, 0, phi_a2_3);
|
|
func_802AF7B4(9.678515e-35f, 0, D_802B87BC);
|
|
return;
|
|
}
|
|
temp_f0 = D_8015F8E8;
|
|
phi_v1 = &D_8015F8E4;
|
|
if (temp_f0 < 0.0f) {
|
|
temp_f2 = D_8015F8E4;
|
|
phi_f2 = temp_f2;
|
|
phi_v1 = &D_8015F8E4;
|
|
phi_f2 = temp_f2;
|
|
if (temp_f2 < -20.0f) {
|
|
D_8015F8E8 = temp_f0 * -1.0f;
|
|
goto block_10;
|
|
}
|
|
} else {
|
|
temp_f2_2 = D_8015F8E4;
|
|
phi_f2 = temp_f2_2;
|
|
phi_f2 = temp_f2_2;
|
|
if (temp_f2_2 > 0.0f) {
|
|
D_8015F8E8 = temp_f0 * -1.0f;
|
|
block_10:
|
|
phi_v1 = &D_8015F8E4;
|
|
}
|
|
}
|
|
temp_a2_4 = D_802B87BC + 9;
|
|
*phi_v1 = phi_f2 + D_8015F8E8;
|
|
D_802B87BC = temp_a2_4;
|
|
phi_a2_4 = temp_a2_4;
|
|
if (temp_a2_4 >= 0x100) {
|
|
D_802B87BC = 0;
|
|
phi_a2_4 = 0;
|
|
}
|
|
temp_t9 = D_802B87C4 + 3;
|
|
D_802B87C4 = temp_t9;
|
|
if (temp_t9 >= 0x100) {
|
|
D_802B87C4 = 0;
|
|
}
|
|
func_802AF7B4(0.0f, 0x7009D58, 0, phi_a2_4);
|
|
func_802AF7B4(9.675733e-35f, 0, D_802B87C4);
|
|
D_802B87CC = random_int(0x12C) / 0x28;
|
|
if (D_802B87C8 < 0) {
|
|
D_802B87C8 = random_int(0x12C) / 0x28;
|
|
} else {
|
|
D_802B87C8 = -(random_int(0x12C) / 0x28);
|
|
}
|
|
func_802AF7B4(9.630504e-35f, D_802B87C8, D_802B87CC);
|
|
return;
|
|
}
|
|
temp_a2_5 = D_802B87BC + 1;
|
|
D_802B87BC = temp_a2_5;
|
|
phi_a2_5 = temp_a2_5;
|
|
if (temp_a2_5 >= 0x100) {
|
|
D_802B87BC = 0;
|
|
phi_a2_5 = 0;
|
|
}
|
|
func_802AF7B4((bitwise f32) &D_0600B278, 0, phi_a2_5);
|
|
}
|
|
#else
|
|
GLOBAL_ASM("asm/non_matchings/code_80290C20/func_802966A0.s")
|
|
#endif
|
|
|
|
|
|
extern f32 D_802B94F8; // rodata
|
|
|
|
void func_802969F8(void) {
|
|
|
|
switch(gCurrentCourseId) {
|
|
case 9:
|
|
D_8015F702 = 0;
|
|
D_8015F700 = 200;
|
|
break;
|
|
case 6:
|
|
D_8015F8E8 = D_802B94F8;
|
|
D_8015F8E4 = 0.0f;
|
|
break;
|
|
}
|
|
}
|