mk64/src/code_8006E9C0.c

2378 lines
65 KiB
C

#include <ultra64.h>
#include <macros.h>
#include <defines.h>
void func_8006EA5C(void);
extern s32 D_800DC530;
void func_8006E9C0(void) {
func_8006EA5C();
func_8006FA94();
switch (D_800DC530) {
case 0:
func_80071428();
break;
case 2:
func_80071818();
break;
case 1:
func_80071A20();
break;
case 3:
func_80071C28();
break;
}
func_80070148();
}
extern s8 D_8018CA70;
extern s8 D_8018CAE0;
extern s8 D_8018CAE1;
extern s8 D_8018CAE2;
extern s8 D_8018CAF1;
extern s8 D_8018CB64;
extern s8 D_8018CB65;
extern s8 D_8018CB66;
extern s8 D_8018CB75;
extern s8 D_8018CBE8;
extern s8 D_8018CBE9;
extern s8 D_8018CBEA;
extern s8 D_8018CBF9;
extern s8 D_8018CC6C;
extern s8 D_8018CC6D;
extern s8 D_8018CC6E;
extern s8 D_8018CC7D;
void func_8006EA5C(void) {
func_8006EB10();
func_8006ED60();
bzero(&D_8018CA70, 0x210);
D_8018CAE1 = 0;
D_8018CAE2 = 0;
D_8018CAF1 = 0;
D_8018CB65 = 0;
D_8018CB66 = 0;
D_8018CB75 = 0;
D_8018CBE9 = 0;
D_8018CBEA = 0;
D_8018CBF9 = 0;
D_8018CC6D = 0;
D_8018CC6E = 0;
D_8018CC7D = 0;
D_8018CAE0 = 0;
D_8018CB64 = 0;
D_8018CBE8 = 0;
D_8018CC6C = 0;
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern s32 D_80183E38;
extern s32 D_80183E4C;
extern s32 D_80183E5C;
extern s32 D_80183E6C;
extern s32 D_80183E7C;
extern ? D_8018C1B0;
extern ? D_8018C3B0;
extern ? D_8018C3F0;
extern ? D_8018C5F0;
extern ? D_8018C630;
extern ? D_8018C830;
extern ? D_8018C870;
extern ? D_8018C970;
extern ? D_8018CA70;
extern s16 D_8018CF18;
extern s16 D_8018CF20;
extern s16 D_8018CF48;
extern s16 D_8018CF60;
extern s16 D_8018CF78;
extern s16 D_8018CF90;
extern s16 D_8018CFA8;
extern s16 D_8018CFB0;
extern s16 D_8018CFB8;
extern s16 D_8018CFC0;
extern s16 D_8018CFC8;
extern s16 D_8018CFD0;
extern s16 D_8018CFD8;
extern s16 D_8018CFE0;
extern s16 D_8018CFE8;
extern s16 D_8018CFF0;
extern s16 D_8018CFF8;
extern s16 D_8018D000;
extern s16 D_8018D008;
extern s16 D_8018D010;
extern s16 D_8018D018;
extern s16 D_8018D020;
extern s16 D_8018D048;
extern s16 D_8018D070;
extern s16 D_8018D098;
extern s16 D_8018D0C0;
extern s16 D_8018D0E8;
extern s16 D_8018D110;
void func_8006EB10(void) {
? *temp_v1_5;
u32 temp_v1;
u32 temp_v1_2;
u32 temp_v1_3;
u32 temp_v1_4;
? *phi_v1;
? *phi_v1_2;
? *phi_v1_3;
? *phi_v1_4;
? *phi_v1_5;
phi_v1 = &D_8018C1B0;
do {
temp_v1 = phi_v1 + 4;
temp_v1->unk-4 = -1;
phi_v1 = temp_v1;
} while (temp_v1 < &D_8018C3B0);
phi_v1_2 = &D_8018C3F0;
do {
temp_v1_2 = phi_v1_2 + 4;
temp_v1_2->unk-4 = -1;
phi_v1_2 = temp_v1_2;
} while (temp_v1_2 < &D_8018C5F0);
phi_v1_3 = &D_8018C630;
do {
temp_v1_3 = phi_v1_3 + 4;
temp_v1_3->unk-4 = -1;
phi_v1_3 = temp_v1_3;
} while (temp_v1_3 < &D_8018C830);
phi_v1_4 = &D_8018C870;
do {
temp_v1_4 = phi_v1_4 + 4;
temp_v1_4->unk-4 = -1;
phi_v1_4 = temp_v1_4;
} while (temp_v1_4 < &D_8018C970);
phi_v1_5 = &D_8018C970;
do {
temp_v1_5 = phi_v1_5 + 0x10;
temp_v1_5->unk-10 = -1;
temp_v1_5->unk-C = -1;
temp_v1_5->unk-8 = -1;
temp_v1_5->unk-4 = -1;
phi_v1_5 = temp_v1_5;
} while (temp_v1_5 != &D_8018CA70);
D_8018CFA8 = 0;
D_8018CF90 = D_8018CFA8;
D_8018CF78 = D_8018CF90;
D_8018CF60 = D_8018CF78;
D_8018CF48 = D_8018CF60;
D_8018CF20 = D_8018CF48;
D_8018CF18 = D_8018CF20;
D_8018CFE0 = 0;
D_8018CFD8 = D_8018CFE0;
D_8018CFD0 = D_8018CFD8;
D_8018CFC8 = D_8018CFD0;
D_8018CFC0 = D_8018CFC8;
D_8018CFB8 = D_8018CFC0;
D_8018CFB0 = D_8018CFB8;
D_8018D018 = 0;
D_8018D010 = 0;
D_8018D008 = 0;
D_8018D000 = 0;
D_8018CFF8 = 0;
D_8018CFF0 = 0;
D_8018CFE8 = 0;
D_8018D110 = 0;
D_8018D0E8 = 0;
D_8018D0C0 = 0;
D_8018D098 = 0;
D_8018D070 = D_8018D098;
D_8018D048 = D_8018D070;
D_8018D020 = D_8018D048;
D_80183E7C = 0;
D_80183E6C = D_80183E7C;
D_80183E5C = D_80183E6C;
D_80183E4C = D_80183E5C;
D_80183E38 = D_80183E4C;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EB10.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern void D_80165C18;
extern s32 D_80183D5C;
void func_8006ED60(void) {
bzero(&D_80165C18, 0x1E140);
D_80183D5C = -1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006ED60.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern OSMesgQueue gDmaMesgQueue;
extern void *gMainReceivedMesg;
extern OSIoMesg gDmaIoMesg;
extern ? _other_texturesSegmentRomStart;
u8 *func_8006ED94(s32 arg0, u8 *arg1, u32 arg2, s32 arg3) {
void *sp28;
u32 temp_a1;
void *temp_a0;
temp_a0 = arg1 + arg3;
temp_a1 = (arg2 + 0xF) & ~0xF;
arg2 = temp_a1;
sp28 = temp_a0;
osInvalDCache(temp_a0, temp_a1);
osPiStartDma(&gDmaIoMesg, 0, 0, (arg0 & 0xFFFFFF) + &_other_texturesSegmentRomStart, sp28, arg2, &gDmaMesgQueue);
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, 1);
mio0decode(temp_a0, arg1);
return arg1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006ED94.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_8006ED94(? *, s32, ?, ?); // extern
extern s32 D_8018D1E0;
extern s32 D_8018D9B0;
extern ? gTextureLogoMarioKart64;
void func_8006EE44(void) {
D_8018D1E0 = func_8006ED94(&gTextureLogoMarioKart64, D_8018D9B0, 0x79E1, 0x20000);
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EE44.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? D_0D01DED8;
extern ? D_0D01FED8;
extern ? D_80165C18;
void func_8006EE7C(s32 arg0) {
void *temp_v0;
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
temp_v0->unkA4 = 0;
temp_v0->unk68 = &D_0D01DED8;
temp_v0->unk60 = &D_0D01DED8;
temp_v0->unk6C = &D_0D01FED8;
temp_v0->unk64 = &D_0D01FED8;
temp_v0->unk4C = -1;
temp_v0->unk9C = 0xA0;
temp_v0->unk9E = -0x20;
temp_v0->unkD2 = temp_v0->unkA4;
temp_v0->unk0 = 1.0f;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EE7C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_802A84F4(s32, s16, s16, s32); // extern
extern ? D_800E54D0;
extern ? D_800E5520;
extern ? D_800E5548;
extern s32 D_8018D240;
extern s16 D_8018D2B0;
extern s16 D_8018D2B8;
void func_8006EEE8(s32 arg0) {
s32 sp1C;
s16 temp_a1;
s32 temp_t0;
void *temp_v1;
temp_t0 = arg0 * 2;
temp_a1 = *(&D_800E5520 + temp_t0);
sp1C = temp_t0;
D_8018D240 = func_802A84F4(*(&D_800E54D0 + (arg0 * 4)), temp_a1, temp_a1, arg0);
temp_v1 = (temp_t0 * 2) + &D_800E5548;
D_8018D2B0 = temp_v1->unk0;
D_8018D2B8 = temp_v1->unk2;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EEE8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_8006ED94(s32, s32, s16, s16); // extern
extern s32 D_800E54D0;
extern s16 D_800E5520;
extern s32 D_8018D248;
extern s32 D_8018D9B4;
void func_8006EF60(void) {
s16 temp_a2;
s32 temp_s2;
s32 *phi_s3;
s32 phi_s1;
s16 *phi_s0;
s32 *phi_s4;
s32 phi_s2;
phi_s3 = &D_800E54D0;
phi_s1 = D_8018D9B4 + 0xFFFF0000;
phi_s0 = &D_800E5520;
phi_s4 = &D_8018D248;
phi_s2 = 0;
do {
temp_a2 = *phi_s0;
temp_s2 = phi_s2 + 1;
*phi_s4 = func_8006ED94(*phi_s3, phi_s1, temp_a2, temp_a2);
phi_s3 += 4;
phi_s1 += *phi_s0;
phi_s0 += 2;
phi_s4 += 4;
phi_s2 = temp_s2;
} while (temp_s2 != 0x14);
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EF60.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_8006EEE8(s16); /* extern */
s32 func_802A84F4(? *, ?, ?, s16); /* extern */
extern ? D_0F0D0E50;
extern ? gTextureExhaust0;
extern ? gTextureExhaust1;
extern ? gTextureExhaust2;
extern ? gTextureExhaust3;
extern ? gTextureExhaust4;
extern ? gTextureExhaust5;
s16 gCurrentCourseId; /* unable to generate initializer */
void func_8006F008(void) {
s16 temp_a0;
s8 temp_v0;
u32 phi_a0;
s16 phi_t9;
s16 *phi_v1;
s16 *phi_t0;
D_801655C8 = 0;
D_8018D01C = 1.0f;
if (gIsMirrorMode != 0) {
D_8018D01C = -1.0f;
}
D_8018D2C0 = 0x101;
D_8018D2D8 = 0xAA;
D_8018D300 = 0xFF;
D_8018D308 = 0xFF;
temp_a0 = gCurrentCourseId;
D_8018D310 = 0xFF;
D_8018D318 = 0xFF;
phi_a0 = temp_a0;
if (temp_a0 < 0x14) {
func_8006EEE8(temp_a0);
phi_a0 = gCurrentCourseId;
}
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
switch (phi_a0) {
case 0:
D_8018D220 = func_802A84F4(&gTextureExhaust5, 0x443, 0x1000, 0xFF);
D_8018D2A0 = 0.022f;
D_8018D2E0 = 6;
D_8018D2E8 = 0x1C;
D_8018D2C0 = 0x104;
D_8018D2D8 = 0xAA;
D_80165718 = 0;
D_80165720 = 5;
D_80165728 = -0xF0;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 1:
D_8018D2A0 = 0.022f;
D_8018D2C0 = 0x109;
D_8018D2E0 = 0x13;
phi_t9 = 0x25;
block_26:
D_8018D2E8 = phi_t9;
break;
case 2:
D_8018D2C0 = 0x109;
D_8018D2A0 = 0.0174f;
D_8018D2E0 = 0xC;
D_8018D2E8 = 0x30;
break;
case 3:
D_80165880 = func_802A84F4(&D_0F0D0E50, 0x4CC2, 0xD980, 0xFF);
D_8018D2A0 = 0.016f;
D_8018D2C0 = 0x106;
D_8018D2E0 = 0x37;
D_8018D2E8 = 0x27;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 4:
D_8018D220 = func_802A84F4(&gTextureExhaust0, 0x479, 0xC00, 0xFF);
D_8018D2A0 = 0.018f;
D_8018D2E0 = 0x3D;
D_8018D2E8 = 0x26;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 5:
D_8018D2C0 = 0x106;
D_8018D2A0 = 0.016f;
D_8018D2E0 = 0x24;
D_8018D2E8 = 0x28;
D_8018D300 = 0x48;
D_8018D308 = 0x64;
D_8018D310 = 0xFF;
break;
case 6:
D_8018D220 = func_802A84F4(&gTextureExhaust3, 0x3C8, 0x1000, 0xFF);
D_8018D2A0 = 0.014f;
D_8018D2C0 = 0x10C;
D_8018D2E0 = 0x28;
D_8018D2E8 = 0x15;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 7:
D_8018D220 = func_802A84F4(&gTextureExhaust4, 0x3F8, 0x1000, 0xFF);
D_8018D2C0 = 0x106;
D_8018D2A0 = 0.014f;
D_8018D2E0 = 0x25;
D_8018D2E8 = 0x32;
D_80165718 = -0x40;
D_80165720 = 5;
D_80165728 = -0x14A;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 8:
D_8018D220 = func_802A84F4(&gTextureExhaust2, 0x4F4, 0xC00, 0xFF);
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0x10F;
D_8018D2E0 = 0x2D;
D_8018D2E8 = 0x3C;
D_80165718 = -0x8C;
D_80165720 = -0x2C;
D_80165728 = -0xD7;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 9:
D_8018D220 = func_802A84F4(&gTextureExhaust0, 0x479, 0xC00, 0xFF);
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0x10F;
D_8018D2E0 = 0x12;
D_8018D2E8 = 0x24;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 10:
D_8018D2A0 = 0.013f;
D_8018D2C0 = 0xFC;
D_8018D2E0 = 0x39;
D_8018D2E8 = 0x2C;
break;
case 11:
D_8018D2C0 = 0x107;
D_8018D2D8 = 0xA5;
D_8018D220 = func_802A84F4(&gTextureExhaust5, 0x443, 0x1000, 0xFF);
D_8018D2A0 = 0.015f;
D_8018D2E0 = 0x37;
D_8018D2E8 = 0x1B;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 12:
D_8018D220 = func_802A84F4(&gTextureExhaust1, 0x485, 0xC00, 0xFF);
D_8018D2A0 = 0.015f;
D_8018D2C0 = 0x106;
D_8018D2E0 = 0x34;
D_8018D2E8 = 0x21;
D_8018D300 = 0x48;
D_8018D308 = 0x64;
D_8018D310 = 0xFF;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
break;
case 13:
D_8018D2A0 = 0.0103f;
D_8018D2C0 = 0x105;
D_8018D2D8 = 0xA6;
D_8018D2E0 = 0x27;
D_8018D2E8 = 0x37;
break;
case 14:
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0x106;
D_8018D2E0 = 0x35;
D_8018D2E8 = 0x23;
break;
case 15:
D_8018D2A0 = 0.0335f;
D_8018D2E0 = 0x20;
D_8018D2E8 = 0x20;
break;
case 16:
D_8018D2A0 = 0.0445f;
D_8018D2E0 = 0x20;
D_8018D2E8 = 0x20;
break;
case 17:
D_8018D2A0 = 0.0285f;
D_8018D2E0 = 0x20;
D_8018D2E8 = 0x20;
break;
case 18:
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0xFF;
D_8018D2E0 = 0x1D;
D_8018D2E8 = 0x2F;
break;
case 19:
D_8018D2A0 = 0.0257f;
D_8018D2E0 = 0x20;
phi_t9 = 0x1F;
goto block_26;
}
if (gIsMirrorMode != 0) {
D_8018D2E0 = D_8018D2B0 - D_8018D2E0;
}
temp_v0 = D_8018EDF3;
if (temp_v0 == 4) {
phi_v1->unk0 = 0xA0;
phi_t0->unk0 = 0x78;
return;
}
if (temp_v0 == 3) {
phi_v1->unk0 = 0xEB;
phi_t0->unk0 = 0xAF;
return;
}
if (temp_v0 == 2) {
if (gCurrentCourseId != 0xA) {
phi_v1->unk2 = 0x109;
phi_v1->unk0 = phi_v1->unk2;
} else {
phi_v1->unk2 = 0xFF;
phi_v1->unk0 = phi_v1->unk2;
}
phi_t0->unk0 = 0x41;
phi_t0->unk2 = 0xB4;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F008.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? play_sound2(?); // extern
extern u16 D_800DC5FC;
extern s8 D_801657E4;
extern s8 D_801657E6;
extern s8 D_801657E8;
extern s8 D_801657F0;
extern s8 D_801657F8;
extern ? D_80165800;
extern s8 D_80165808;
extern s8 D_80165810;
extern s8 D_80165818;
extern s8 D_80165820;
extern s8 D_80165828;
extern ? D_80165832;
void func_8006F824(s32 arg0) {
D_80165808 = D_801657E4;
D_80165810 = D_801657E6;
D_80165820 = D_801657F0;
D_80165818 = D_801657E8;
D_80165828 = D_801657F8;
D_80165832.unk0 = D_80165800.unk0;
D_80165832.unk1 = D_80165800.unk1;
if ((arg0 != 0) && (D_800DC5FC == 0)) {
play_sound2(0x4900801C);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F824.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8006F824(?, s8 *, s8 *, s32); // extern
extern s8 D_801657E4;
extern s8 D_801657E6;
extern s8 D_801657E8;
extern s8 D_801657F0;
extern s8 D_801657F8;
extern ? D_80165800;
extern s8 D_80165808;
extern s8 D_80165810;
extern s8 D_80165818;
extern s8 D_80165820;
extern s8 D_80165828;
extern ? D_80165832;
extern ? D_8018D2D8;
extern s8 D_8018EDFC;
void func_8006F8CC(void) {
s8 temp_a0;
if (D_8018EDFC == 0) {
D_8018EDFC = 1;
D_801657E4 = 0;
D_801657E6 = 0;
D_80165800.unk1 = 1;
D_801657F0 = 0;
D_801657E8 = 1;
D_80165800.unk0 = D_80165800.unk1;
temp_a0 = D_8018EDF3;
if (temp_a0 == 4) {
if (gModeSelection != BATTLE) {
D_801657E4 = 1;
D_801657F0 = 1;
D_801657F8 = 1;
D_80165800.unk1 = 0;
D_80165800.unk0 = D_80165800.unk1;
} else {
D_801657F8 = 0;
D_80165800.unk0 = D_80165800.unk1;
}
} else if (temp_a0 == 3) {
D_801657E8 = 0;
D_801657F8 = 1;
} else if (temp_a0 == 2) {
if (gModeSelection != BATTLE) {
D_80165800.unk1 = 0;
D_801657E4 = 1;
D_801657F0 = 1;
D_80165800.unk0 = D_80165800.unk1;
}
D_8018D2D8.unk0 = 0x41;
D_8018D2D8.unk2 = 0xB4;
}
func_8006F824(0, &D_801657E4, &D_801657F0, 3);
} else {
D_801657E4 = D_80165808;
D_801657E6 = D_80165810;
D_801657F0 = D_80165820;
D_801657E8 = D_80165818;
D_801657F8 = D_80165828;
D_80165800.unk0 = D_80165832.unk0;
D_80165800.unk1 = D_80165832.unk1;
}
if (D_800DC51C != 0) {
D_801657F0 = 0;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F8CC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8006F008(); // extern
? func_8006F8CC(); // extern
extern s32 D_801655D8;
extern s32 D_801655E8;
extern s32 D_801655F8;
extern s32 D_80165608;
extern s32 D_80165618;
extern s32 D_80165628;
extern ? D_80165658;
extern s16 D_801656F0;
extern s16 D_80165730;
extern s8 D_8016576A;
extern s8 D_8016579C;
extern s8 D_801657AE;
extern s8 D_801657B0;
extern s8 D_801657B2;
extern s8 D_801657D8;
extern s8 D_801657E1;
extern s8 D_801657E2;
extern s8 D_801657E3;
extern s8 D_801657E5;
extern s32 D_801657FC;
extern s32 D_80165804;
extern s32 D_8016580C;
extern s32 D_80165814;
extern s32 D_8016581C;
extern s8 D_801658BC;
extern s8 D_801658C6;
extern s8 D_801658CE;
extern s8 D_801658D6;
extern s8 D_801658DC;
extern s8 D_801658E4;
extern s8 D_801658EC;
extern s8 D_801658F4;
extern s8 D_801658FE;
extern ? D_8018CF28;
extern ? D_8018CF50;
extern ? D_8018CFAC;
extern ? D_8018CFB4;
extern ? D_8018CFBC;
extern ? D_8018CFC4;
extern ? D_8018D050;
extern ? D_8018D0F0;
extern s32 D_8018D114;
extern s32 D_8018D160;
extern s32 D_8018D168;
extern s16 D_8018D16C;
extern s32 D_8018D170;
extern s16 D_8018D174;
extern s32 D_8018D178;
extern s16 D_8018D17C;
extern s32 D_8018D180;
extern s16 D_8018D184;
extern s32 D_8018D188;
extern s16 D_8018D18C;
extern s32 D_8018D190;
extern s32 D_8018D1A0;
extern s32 D_8018D1B4;
extern s32 D_8018D1C4;
extern s32 D_8018D1CC;
extern s32 D_8018D1DC;
extern s32 D_8018D1F0;
extern s32 D_8018D1F8;
extern s32 D_8018D1FC;
extern s32 D_8018D204;
extern s32 D_8018D20C;
extern s32 D_8018D214;
extern s32 D_8018D224;
extern s8 D_8018D228;
extern s32 D_8018D2A4;
extern s32 D_8018D2AC;
extern s32 D_8018D2B4;
extern s32 D_8018D2BC;
extern ? D_8018D2C8;
extern s16 D_8018D2F0;
extern s16 D_8018D2F8;
extern s32 D_8018D320;
void func_8006FA94(void) {
? *temp_a1;
? *temp_a2;
? *temp_v1;
s16 temp_a0_2;
s16 temp_t7;
s32 temp_t6;
s32 temp_v0;
s32 temp_v0_2;
s8 temp_ra;
u32 temp_a0;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
? *phi_v1;
? *phi_a1;
? *phi_a2;
? *phi_a0;
? *phi_a1_2;
? *phi_a2_2;
struct_D_8018CE10 *phi_v1_2;
s16 phi_a0_2;
? *phi_a3;
Player *phi_v0;
? *phi_t0;
func_8006F8CC();
func_8006F008();
osSetTime(0, 0);
D_8018D170 = 0;
D_8018D190 = 0;
D_8018D188 = 0;
D_8018D178 = 0;
D_8018D1CC = 0;
D_801657E2 = 0;
D_80165730 = 0;
D_801658FE = 0;
D_801657E5 = 0;
D_801657E3 = D_801657E5;
D_801657E1 = D_801657E3;
D_801658D6 = 0;
D_801658E4 = D_801658D6;
D_801658F4 = D_801658E4;
D_801658EC = D_801658F4;
D_801658DC = D_801658EC;
D_801658CE = D_801658DC;
D_801658C6 = D_801658CE;
D_80165658.unk8 = 0;
D_80165658.unk4 = 0;
D_80165658.unk0 = 0;
temp_ra = D_8018EDF3;
D_801658BC = D_801658C6;
if (temp_ra != 1) {
if (temp_ra != 2) {
if (temp_ra != 3) {
if (temp_ra != 4) {
} else {
if (gModeSelection == VERSUS) {
D_8018D114 = 0xA;
D_8018D178 = 0x1E;
D_8018D180 = 0x1E;
} else {
D_8018D114 = 0xB;
D_8018D178 = 0x1E;
D_8018D180 = 0x1E;
}
D_8018D2AC = 0xA;
}
} else if (gModeSelection == VERSUS) {
D_8018D114 = 8;
D_8018D178 = 0x64;
D_8018D180 = 0x96;
D_8018D2AC = 0x3C;
} else {
D_8018D180 = 9;
D_8018D178 = 0x64;
D_8018D180 = 0x96;
D_8018D2AC = 0x3C;
}
} else if (D_800DC530 == 1) {
temp_v0 = gModeSelection;
if (temp_v0 == GRAND_PRIX) {
D_8018D114 = 2;
D_8018D178 = 0x96;
D_8018D180 = 0xF0;
D_8018D2AC = 0x3C;
} else if (temp_v0 == VERSUS) {
D_8018D114 = 3;
D_8018D178 = 0x1E;
D_8018D180 = 0x1E;
D_8018D2AC = 0x3C;
} else {
D_8018D114 = 4;
D_8018D178 = 0x28;
D_8018D180 = 0x28;
D_8018D2AC = 0x3C;
}
} else {
temp_v0_2 = gModeSelection;
if (temp_v0_2 == GRAND_PRIX) {
D_8018D114 = 5;
} else if (temp_v0_2 == VERSUS) {
D_8018D114 = 6;
} else {
D_8018D114 = 7;
}
}
} else if (gModeSelection == GRAND_PRIX) {
D_8018D114 = 0;
D_8018D178 = 0x96;
D_8018D114 = 0xF0;
} else {
D_8018D114 = 1;
D_8018D178 = 0xA;
D_8018D180 = 0;
}
if (gEnableDebugMode == 0) {
D_8016576A = 0;
D_8016579C = 0;
}
if (temp_ra > 0) {
phi_v1 = &D_8018CFBC;
phi_a1 = &D_8018CFAC;
phi_a2 = &D_8018CFC4;
phi_a0 = &D_8018CFB4;
do {
temp_a0 = phi_a0 + 1;
temp_v1 = phi_v1 + 1;
temp_a1 = phi_a1 + 1;
temp_a2 = phi_a2 + 1;
temp_v1->unk-1 = 0;
temp_a1->unk-1 = 0;
temp_a2->unk-1 = 0;
temp_a0->unk-1 = 0;
phi_v1 = temp_v1;
phi_a1 = temp_a1;
phi_a2 = temp_a2;
phi_a0 = temp_a0;
} while (temp_a0 < (temp_ra + &D_8018CFB4));
}
D_8018D204 = 1;
D_8018D1FC = 0;
D_8018D224 = 0;
D_8018D1F8 = 0;
D_8018D1F0 = 0;
D_8018D228 = 0xFF;
D_80165628 = 0;
D_80165618 = 0;
temp_t6 = D_80165618;
D_80165608 = temp_t6;
D_801655F8 = temp_t6;
D_801655E8 = temp_t6;
D_801655D8 = temp_t6;
D_8018D160 = 0;
D_8018D1DC = 0;
D_8018D1C4 = 0;
D_8018D1B4 = 0;
D_8018D1A0 = 0;
D_8018D168 = 0;
D_801656F0 = 0;
D_801657B2 = 0;
D_801657D8 = D_801657B2;
D_8018D214 = D_801657D8;
D_801657B0 = D_8018D214;
D_801657AE = D_801657B0;
D_8018D20C = 0;
D_8018D2F8 = 0;
D_8018D2F0 = D_8018D2F8;
D_8018D320 = 3;
D_8018D2AC = 0;
D_8018D2BC = 0;
D_8018D2B4 = D_8018D2BC;
D_8018D2A4 = D_8018D2B4;
D_8018D2C8.unk0 = 0;
D_8018D2C8.unk4 = 0;
D_8018D2C8.unk8 = 0;
D_8018D2C8.unkC = 0;
D_8016581C = 0;
D_8016580C = 0;
D_80165814 = 0;
D_80165804 = 0;
D_801657FC = 0;
D_8018D18C = -1;
temp_t7 = D_8018D18C;
D_8018D184 = temp_t7;
D_8018D16C = temp_t7;
D_8018D17C = temp_t7;
D_8018D174 = temp_t7;
phi_a1_2 = &D_8018D050;
phi_a2_2 = &D_8018D0F0;
phi_v1_2 = D_8018CE10;
phi_a0_2 = 0;
phi_a3 = &D_8018CF50;
phi_v0 = D_800DC4DC;
phi_t0 = &D_8018CF28;
do {
phi_a1_2->unk0 = -32.0f;
phi_a2_2->unk0 = -32.0f;
phi_v1_2->unk_0C = 0.0f;
phi_v1_2->unk_08 = 0.0f;
phi_v1_2->unk_04 = 0.0f;
phi_a3->unk0 = phi_a0_2;
phi_t0->unk0 = phi_v0;
phi_v0->unk_040 = -1;
temp_v0_3 = phi_v0 + 0xDD8;
phi_t0->unk4 = temp_v0_3;
phi_a3->unk2 = phi_a0_2 + 1;
phi_v1_2->unk24 = 0.0f;
phi_v1_2->unk28 = 0.0f;
phi_v1_2->unk2C = 0.0f;
phi_a2_2->unk4 = -32.0f;
phi_a1_2->unk4 = -32.0f;
temp_v0_3->unk40 = -1;
temp_v0_4 = temp_v0_3 + 0xDD8;
phi_a3->unk4 = phi_a0_2 + 2;
phi_t0->unk8 = temp_v0_4;
phi_v1_2->unk44 = 0.0f;
phi_v1_2->unk48 = 0.0f;
phi_v1_2->unk4C = 0.0f;
phi_a2_2->unk8 = -32.0f;
phi_a1_2->unk8 = -32.0f;
temp_v0_4->unk40 = -1;
temp_v0_5 = temp_v0_4 + 0xDD8;
phi_t0->unkC = temp_v0_5;
phi_a3->unk6 = phi_a0_2 + 3;
temp_a0_2 = phi_a0_2 + 4;
phi_v1_2->unk64 = 0.0f;
phi_v1_2->unk68 = 0.0f;
phi_v1_2->unk6C = 0.0f;
phi_a2_2->unkC = -32.0f;
phi_a1_2->unkC = -32.0f;
temp_v0_5->unk40 = -1;
phi_a1_2 += 0x10;
phi_a2_2 += 0x10;
phi_v1_2 += 0x80;
phi_a0_2 = temp_a0_2;
phi_a3 += 8;
phi_v0 = temp_v0_5 + 0xDD8;
phi_t0 += 0x10;
} while (temp_a0_2 != 8);
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006FA94.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(? *); // extern
extern ? D_8018CE24;
extern ? D_8018CF24;
void func_80070148(void) {
? *temp_s0;
? *phi_s0;
phi_s0 = &D_8018CE24;
do {
find_unused_obj_index(phi_s0);
temp_s0 = phi_s0 + 0x20;
phi_s0 = temp_s0;
} while (temp_s0 != &D_8018CF24);
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070148.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(? *); // extern
extern ? D_80183DD8;
extern ? D_80183DF4;
extern ? D_80183EA0;
extern ? D_80183F28;
extern ? D_8018BFA8;
extern ? D_8018C030;
extern ? D_8018C0B0;
void func_80070190(void) {
? *temp_s0_2;
u32 temp_s0;
? *phi_s1;
? *phi_s2;
? *phi_s3;
? *phi_s0;
? *phi_s0_2;
phi_s1 = &D_80183EA0;
phi_s2 = &D_80183F28;
phi_s3 = &D_8018BFA8;
phi_s0 = &D_8018C030;
do {
find_unused_obj_index(phi_s1);
find_unused_obj_index(phi_s2);
find_unused_obj_index(phi_s3);
find_unused_obj_index(phi_s0);
temp_s0 = phi_s0 + 4;
phi_s1 += 4;
phi_s2 += 4;
phi_s3 += 4;
phi_s0 = temp_s0;
} while (temp_s0 < &D_8018C0B0);
phi_s0_2 = &D_80183DD8;
do {
find_unused_obj_index(phi_s0_2);
temp_s0_2 = phi_s0_2 + 4;
phi_s0_2 = temp_s0_2;
} while (temp_s0_2 != &D_80183DF4);
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070190.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800723A4(); // extern
? func_80073404(s32, ?, ?, ? *); // extern
extern ? D_0D005FB0;
extern ? D_80165C18;
extern s32 D_8018D220;
void func_80070250(s32 arg0, void *arg2) {
void *sp20;
f32 temp_f6;
u16 temp_t1;
void *temp_v0;
f32 phi_f6;
func_800723A4();
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
temp_v0->unkA4 = 0;
temp_v0->unkD5 = arg2->unk6;
temp_v0->unkC0 = arg2->unk0;
temp_v0->unk9E = arg2->unk2;
temp_t1 = arg2->unk4;
temp_f6 = temp_t1;
phi_f6 = temp_f6;
if (temp_t1 < 0) {
phi_f6 = temp_f6 + 4294967296.0f;
}
temp_v0->unk0 = phi_f6 / 100.0;
sp20 = temp_v0;
temp_v0->unk64 = (arg2->unk6 << 0xA) + D_8018D220;
func_80073404(arg0, 0x40, 0x20, &D_0D005FB0);
temp_v0->unkA0 = 0xFF;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070250.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 find_unused_obj_index(void *); // extern
? func_80070250(s32, ?, void *); // extern
extern ? D_8018CC80;
extern s32 D_8018D1F0;
extern s32 D_8018D1F8;
extern s8 D_8018D230;
void func_80070328(void *arg0) {
s32 temp_s2;
s32 phi_s1;
void *phi_s0;
s32 phi_s2;
phi_s1 = 0;
phi_s0 = arg0;
phi_s2 = 0;
do {
func_80070250(find_unused_obj_index(&D_8018CC80 + (D_8018D1F8 * 4) + phi_s1), 1, phi_s0);
temp_s2 = phi_s2 + 1;
phi_s1 += 4;
phi_s0 += 8;
phi_s2 = temp_s2;
} while (phi_s0->unk8 != 0xFFFF);
D_8018D1F8 = D_8018D1F8 + temp_s2;
D_8018D1F0 = temp_s2;
D_8018D230 = 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070328.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800723A4(); // extern
? func_80073404(s32, ?, ?, ? *); // extern
extern ? D_0D005770;
extern ? D_0D0293D8;
extern ? D_80165C18;
void func_800703E0(s32 arg0, void *arg2) {
f32 temp_f6;
u16 temp_t2;
void *temp_v0;
f32 phi_f6;
func_800723A4();
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
temp_v0->unkA4 = 1;
temp_v0->unkD5 = arg2->unk6;
temp_v0->unkC0 = arg2->unk0;
temp_v0->unk9E = arg2->unk2;
temp_t2 = arg2->unk4;
temp_f6 = temp_t2;
phi_f6 = temp_f6;
if (temp_t2 < 0) {
phi_f6 = temp_f6 + 4294967296.0f;
}
temp_v0->unk64 = &D_0D0293D8;
temp_v0->unk0 = phi_f6 / 100.0;
func_80073404(arg0, 0x10, 0x10, &D_0D005770);
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_800703E0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 find_unused_obj_index(void *); // extern
? func_800703E0(s32, ?, void *); // extern
extern ? D_8018CC80;
extern s32 D_8018D1F0;
extern s32 D_8018D1F8;
extern s8 D_8018D230;
void func_800704A0(void *arg0) {
s32 temp_s2;
s32 phi_s1;
void *phi_s0;
s32 phi_s2;
phi_s1 = 0;
phi_s0 = arg0;
phi_s2 = 0;
do {
func_800703E0(find_unused_obj_index(&D_8018CC80 + (D_8018D1F8 * 4) + phi_s1), 1, phi_s0);
temp_s2 = phi_s2 + 1;
phi_s1 += 4;
phi_s0 += 8;
phi_s2 = temp_s2;
} while (phi_s0->unk8 != 0xFFFF);
D_8018D1F8 = D_8018D1F8 + temp_s2;
D_8018D1F0 = temp_s2;
D_8018D230 = 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_800704A0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? find_unused_obj_index(void *); /* extern */
? func_80070328(? *); /* extern */
? func_800704A0(? *); /* extern */
? func_8008C23C(); /* extern */
extern ? D_8018CC80;
static ? D_800E6A38; /* unable to generate initializer; const */
static ? D_800E6AA8; /* unable to generate initializer; const */
static ? D_800E6B00; /* unable to generate initializer; const */
static ? D_800E6B38; /* unable to generate initializer; const */
static ? D_800E6BA8; /* unable to generate initializer; const */
static ? D_800E6C10; /* unable to generate initializer; const */
static ? D_800E6C80; /* unable to generate initializer; const */
static ? D_800E6DE0; /* unable to generate initializer; const */
u16 gCurrentCourseId; /* unable to generate initializer */
void func_8007055C(void) {
s32 temp_s1;
u16 temp_t6;
s32 phi_s4;
s32 phi_s0;
s32 phi_s1;
s32 phi_s1_2;
temp_t6 = gCurrentCourseId;
switch (temp_t6) {
case 0:
func_80070328(&D_800E6C10);
break;
case 4:
func_80070328(&D_800E6AA8);
break;
case 5:
phi_s4 = 0x19;
phi_s0 = 0;
if (D_8018EDF3 == 1) {
phi_s4 = 0x32;
}
phi_s1 = 0;
phi_s1_2 = 0;
if (phi_s4 > 0) {
do {
find_unused_obj_index(&D_8018CC80 + (D_8018D1F8 * 4) + phi_s0);
temp_s1 = phi_s1 + 1;
phi_s0 += 4;
phi_s1 = temp_s1;
phi_s1_2 = temp_s1;
} while (temp_s1 != phi_s4);
}
D_8018D1F8 += phi_s1_2;
D_8018D1F0 = phi_s1_2;
break;
case 6:
func_80070328(&D_800E6B00);
break;
case 7:
func_80070328(&D_800E6B38);
break;
case 8:
func_80070328(&D_800E6A38);
break;
case 9:
func_80070328(&D_800E6AA8);
break;
case 10:
func_800704A0(&D_800E6C80);
break;
case 11:
func_80070328(&D_800E6C10);
break;
case 12:
func_80070328(&D_800E6BA8);
break;
case 13:
func_800704A0(&D_800E6C80);
break;
case 14:
func_800704A0(&D_800E6DE0);
break;
}
func_8008C23C();
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8007055C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern s16 D_80165730;
extern s16 D_80165738;
extern s16 D_80165740;
extern s16 D_80165748;
void func_80070714(void) {
D_80165730 = 1;
if (D_8018EDF3 == 1) {
D_80165738 = 0x64;
D_80165740 = 0x3C;
D_80165748 = 0x1E;
return;
}
D_80165738 = 0x32;
D_80165740 = 0x1E;
D_80165748 = 0xA;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070714.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? find_unused_obj_index(s32 *); /* extern */
? func_80070714(); /* extern */
? func_80071F6C(? *); /* extern */
? func_800723A4(s32, ?, s16 *, ? **); /* extern */
? func_80073444(s32, ? *, ? *, ?, s32); /* extern */
? func_800770F0(s32); /* extern */
? func_800887C0(s32); /* extern */
extern ? D_06007BB8;
extern ? D_06007DB8;
extern ? *D_80165758;
extern ? D_80165C18;
extern ? D_80183EB0;
extern ? D_80183EC8;
extern ? D_80183EDC;
extern ? D_80183F34;
extern ? D_80183F3C;
extern ? D_80183F50;
extern ? D_8018C030;
extern ? D_8018C0B0;
extern ? D_8018C278;
extern ? D_8018C404;
extern ? D_8018C5F0;
extern ? D_8018C6B0;
extern ? D_8018D1A0;
extern ? D_8018D1B3;
extern ? D_8018D1C4;
static ? D_800E5728; /* unable to generate initializer; const */
static ? D_800E5854; /* unable to generate initializer; const */
static ? D_800E5894; /* unable to generate initializer; const */
static ? D_800E58EC; /* unable to generate initializer; const */
static ? D_800E5E14; /* unable to generate initializer; const */
static ? D_800E5EE6; /* unable to generate initializer; const */
static u16 D_800E5EE8; /* type too large by 2; unable to generate initializer; const */
static ? D_800E5FD0; /* unable to generate initializer; const */
static ? D_800E6360; /* unable to generate initializer; const */
static ? D_800E641A; /* unable to generate initializer; const */
u16 gCurrentCourseId; /* unable to generate initializer */
u16 D_800E5E8C[0x2D]; /* unable to generate initializer; const */
u16 D_800E5F80[0x28]; /* unable to generate initializer; const */
void func_80070780(void) {
void *sp4C;
u16 *sp48;
u16 *sp44;
? *temp_s0_4;
? *temp_s2_2;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f0_4;
f32 temp_f0_5;
f32 temp_f2;
f32 temp_f2_2;
s32 *temp_s0_15;
s32 *temp_s0_16;
s32 *temp_s0_17;
s32 *temp_s1;
s32 *temp_s1_2;
s32 *temp_s1_3;
s32 *temp_s1_4;
s32 *temp_s1_5;
s32 *temp_s2;
s32 *temp_s2_3;
s32 temp_s0;
s32 temp_s0_10;
s32 temp_s0_14;
s32 temp_s0_2;
s32 temp_s0_3;
s32 temp_s0_5;
s32 temp_s0_6;
s32 temp_s0_7;
s32 temp_s0_8;
s32 temp_s0_9;
s32 temp_s3;
s32 temp_s3_2;
s32 temp_s3_3;
s32 temp_s3_4;
s32 temp_s3_5;
s32 temp_s3_6;
s32 temp_v0;
s32 temp_v0_11;
s8 *temp_s0_11;
s8 *temp_s0_12;
s8 *temp_s0_13;
s8 temp_v0_10;
u16 *temp_v1_2;
u16 *temp_v1_3;
u16 *temp_v1_4;
u16 temp_t6;
void *temp_v0_12;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
void *temp_v0_9;
void *temp_v1;
s32 *phi_s0;
s32 phi_s3;
s32 *phi_s1;
s32 phi_s2;
s32 phi_s3_2;
s32 *phi_s2_2;
? *phi_s1_2;
s32 phi_s3_3;
? *phi_s0_2;
s32 *phi_s1_3;
u16 *phi_v1;
s32 *phi_s2_3;
? *phi_s1_4;
s32 *phi_s1_5;
u16 *phi_v1_2;
s32 *phi_s2_4;
s32 *phi_s1_6;
u16 *phi_v1_3;
s32 *phi_s1_7;
s32 *phi_s2_5;
s32 *phi_s0_3;
s32 phi_s3_4;
s32 *phi_s0_4;
s32 phi_s3_5;
s8 *phi_s0_5;
s32 *phi_s1_8;
s8 *phi_s0_6;
s32 *phi_s1_9;
s8 *phi_s0_7;
s32 *phi_s1_10;
s32 *phi_s1_11;
? *phi_s2_6;
s32 *phi_s0_8;
s32 *phi_s1_12;
s32 *phi_s0_9;
s32 *phi_s0_10;
s32 *phi_s1_13;
s32 *phi_s1_14;
s32 *phi_s2_7;
s32 phi_s3_6;
temp_t6 = gCurrentCourseId;
switch (temp_t6) {
case 0:
if (D_800DC50C != 9) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
phi_s0 = &D_8018C630;
phi_s3 = 0;
if (D_80165738 > 0) {
do {
find_unused_obj_index(phi_s0);
func_800723A4(*phi_s0, 0);
temp_s3 = phi_s3 + 1;
phi_s0 += 4;
phi_s3 = temp_s3;
} while (temp_s3 < D_80165738);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
}
default:
return;
case 2:
D_80165750 = 0xB;
D_80165758 = &D_800E5894;
temp_v0 = gCCSelection;
if (temp_v0 != CC_50) {
if (temp_v0 != CC_100) {
if (temp_v0 != CC_150) {
if (temp_v0 != CC_EXTRA) {
}
} else {
D_80165750 = 0xC;
D_80165758 = &D_800E58EC;
}
}
} else {
D_80165750 = 8;
D_80165758 = &D_800E5854;
}
phi_s1 = &D_80183EA0;
phi_s3_2 = 0;
if (D_80165750 > 0) {
phi_s2 = 0;
do {
temp_s0 = *phi_s1;
func_800723A4(temp_s0, 0, &D_80165750, &D_80165758);
temp_v1 = D_80165758 + phi_s2;
temp_s3_2 = phi_s3_2 + 1;
temp_v0_2 = &D_80165C18 + (temp_s0 * 0xE0);
temp_v0_2->unk10 = temp_v1->unk0 * D_8018D01C;
temp_v0_2->unk18 = temp_v1->unk2;
temp_v0_2->unkD5 = temp_v1->unk4;
temp_v0_2->unkA0 = temp_v1->unk6;
phi_s1 += 4;
phi_s2 += 8;
phi_s3_2 = temp_s3_2;
} while (temp_s3_2 < D_80165750);
}
temp_s0_2 = D_80183F28;
func_800723A4(temp_s0_2, 0, &D_80165750, &D_80165758);
temp_v0_3 = &D_80165C18 + (temp_s0_2 * 0xE0);
temp_v0_3->unk8 = 80.0f;
temp_v0_3->unk4 = D_8018D01C * -68.0;
temp_v0_3->unkC = -1840.0f;
phi_s2_2 = &D_8018BFA8;
phi_s1_2 = &D_800E5728;
phi_s3_3 = 0;
do {
temp_s0_3 = *phi_s2_2;
func_800723A4(temp_s0_3, 0);
temp_v0_4 = &D_80165C18 + (temp_s0_3 * 0xE0);
temp_s3_3 = phi_s3_3 + 1;
temp_v0_4->unk8 = phi_s1_2->unk2;
temp_v0_4->unk4 = phi_s1_2->unk0 * D_8018D01C;
temp_v0_4->unkC0 = 0;
temp_v0_4->unkC = phi_s1_2->unk4;
phi_s2_2 += 4;
phi_s3_3 = temp_s3_3;
if ((phi_s3_3 & 1) != 0) {
temp_v0_4->unkC0 = 0x8000;
}
phi_s1_2 += 6;
} while (temp_s3_3 < 4);
phi_s0_2 = &D_8018C030;
do {
func_80071F6C(phi_s0_2);
temp_s0_4 = phi_s0_2 + 4;
phi_s0_2 = temp_s0_4;
} while (temp_s0_4 != &D_8018C0B0);
return;
case 3:
if (D_800DC50C != 9) {
temp_s0_5 = D_80183EA0.unk0;
func_80073444(temp_s0_5, &D_06007BB8, &D_06007DB8, 0x20, 0x40);
temp_v0_5 = &D_80165C18 + (temp_s0_5 * 0xE0);
temp_v0_5->unkB2 = 0;
temp_v0_5->unkB4 = 0;
temp_v0_5->unkB6 = 0x8000;
func_800723A4(D_80183EA0.unk4, 0);
func_800723A4(D_80183EA0.unk8, 0);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 4:
phi_s1_3 = &D_80183EA0;
do {
func_800723A4(*phi_s1_3, 0);
temp_s1 = phi_s1_3 + 4;
phi_s1_3 = temp_s1;
} while (temp_s1 < &D_80183EB0);
phi_s2_3 = &D_80183F28;
if (D_800DC50C != 9) {
phi_v1 = D_800E5E8C;
phi_s1_4 = &D_800E5E14;
do {
temp_s0_6 = *phi_s2_3;
sp44 = phi_v1;
func_800723A4(temp_s0_6, 0);
temp_f2 = D_8018D01C;
temp_f0 = phi_s1_4->unk0 * temp_f2;
temp_v0_6 = &D_80165C18 + (temp_s0_6 * 0xE0);
temp_v0_6->unk10 = temp_f0;
temp_v0_6->unk4 = temp_f0;
temp_f0_2 = phi_s1_4->unk2 + 6.0;
temp_v1_2 = phi_v1 + 6;
temp_v0_6->unk44 = temp_f0_2;
temp_v0_6->unk8 = temp_f0_2;
temp_f0_3 = phi_s1_4->unk4;
temp_v0_6->unkD5 = phi_s1_4->unk6;
temp_v0_6->unk9E = phi_v1->unk4;
temp_v0_6->unk18 = temp_f0_3;
temp_v0_6->unkC = temp_f0_3;
temp_v0_6->unk9C = phi_v1->unk0 * temp_f2;
phi_v1 = temp_v1_2;
phi_s2_3 += 4;
phi_s1_4 += 8;
} while (temp_v1_2 != &D_800E5EE6);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 5:
phi_s1_5 = &D_8018C1B0;
do {
find_unused_obj_index(phi_s1_5);
temp_s1_2 = phi_s1_5 + 4;
phi_s1_5 = temp_s1_2;
} while (temp_s1_2 < &D_8018C278);
phi_s1_6 = &D_80183EA0;
if (D_800DC50C != 9) {
phi_v1_2 = &D_800E5EE8;
phi_s2_4 = &D_80183F28;
do {
temp_s0_7 = *phi_s2_4;
sp44 = phi_v1_2;
func_800723A4(temp_s0_7, 0);
temp_v0_7 = &D_80165C18 + (temp_s0_7 * 0xE0);
temp_s0_8 = *phi_s1_6;
temp_v0_7->unk10 = phi_v1_2->unk0 * D_8018D01C;
temp_v0_7->unk18 = phi_v1_2->unk4;
temp_v0_7->unk14 = phi_v1_2->unk2 + 5.0 + 3.0;
func_800723A4(temp_s0_8, 0);
temp_v0_8 = &D_80165C18 + (temp_s0_8 * 0xE0);
temp_v1_3 = phi_v1_2 + 8;
temp_v0_8->unkD5 = phi_v1_2->unk6;
temp_v0_8->unk10 = phi_v1_2->unk0 * D_8018D01C;
temp_v0_8->unk14 = phi_v1_2->unk2 + 3.0;
temp_v0_8->unk18 = phi_v1_2->unk4;
phi_v1_2 = temp_v1_3;
phi_s2_4 += 4;
phi_s1_6 += 4;
} while (temp_v1_3 != D_800E5F80);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 6:
phi_s1_7 = &D_80183EA0;
if (D_800DC50C != 9) {
phi_v1_3 = D_800E5F80;
do {
temp_s0_9 = *phi_s1_7;
sp48 = phi_v1_3;
func_800723A4(temp_s0_9, 0);
temp_f2_2 = D_8018D01C;
temp_v0_9 = &D_80165C18 + (temp_s0_9 * 0xE0);
temp_f0_4 = phi_v1_3->unk0 * temp_f2_2;
temp_v1_4 = phi_v1_3 + 8;
temp_v0_9->unk10 = temp_f0_4;
temp_v0_9->unk4 = temp_f0_4;
temp_f0_5 = phi_v1_3->unk4;
temp_v0_9->unk1C = phi_v1_3->unk2 * temp_f2_2;
temp_v0_9->unk18 = temp_f0_5;
temp_v0_9->unkC = temp_f0_5;
temp_v0_9->unk24 = phi_v1_3->unk6;
phi_v1_3 = temp_v1_4;
phi_s1_7 += 4;
} while (temp_v1_4 != &D_800E5FD0);
}
phi_s2_5 = &D_80183F28;
do {
temp_s0_10 = *phi_s2_5;
func_800723A4(temp_s0_10, 0);
temp_s2 = phi_s2_5 + 4;
phi_s2_5 = temp_s2;
if (phi_s2_5 < &D_80183F3C) {
(&D_80165C18 + (temp_s0_10 * 0xE0))->unkD5 = 0;
} else {
(&D_80165C18 + (temp_s0_10 * 0xE0))->unkD5 = 1;
}
} while (temp_s2 != &D_80183F50);
return;
case 7:
if (D_800DC50C != 9) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
phi_s0_3 = &D_8018C630;
phi_s3_4 = 0;
if (D_80165738 > 0) {
do {
find_unused_obj_index(phi_s0_3);
func_800723A4(*phi_s0_3, 0);
temp_s3_4 = phi_s3_4 + 1;
phi_s0_3 += 4;
phi_s3_4 = temp_s3_4;
} while (temp_s3_4 < D_80165738);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 8:
if (D_800DC50C != 9) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
D_80165898 = 0;
func_800723A4(D_80183EA0.unk0, 0);
phi_s0_4 = &D_8018C630;
phi_s3_5 = 0;
if (D_80165738 > 0) {
do {
find_unused_obj_index(phi_s0_4);
func_800723A4(*phi_s0_4, 0);
temp_s3_5 = phi_s3_5 + 1;
phi_s0_4 += 4;
phi_s3_5 = temp_s3_5;
} while (temp_s3_5 < D_80165738);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 9:
if (D_800DC50C != 9) {
temp_v0_10 = D_8018EDF3;
phi_s1_8 = &D_80183EA0;
if ((temp_v0_10 == 1) || ((temp_v0_10 == 2) && (gModeSelection == VERSUS))) {
temp_v0_11 = gCCSelection;
if (temp_v0_11 != CC_50) {
if (temp_v0_11 != CC_100) {
if (temp_v0_11 != CC_150) {
if (temp_v0_11 != CC_EXTRA) {
} else {
D_8018D1C8 = 5;
D_8018D1D0 = 8;
D_8018D1D8 = 8;
}
} else {
D_8018D1C8 = 5;
D_8018D1D0 = 8;
D_8018D1D8 = 0xA;
}
} else {
D_8018D1C8 = 5;
D_8018D1D0 = 8;
D_8018D1D8 = 8;
}
} else {
D_8018D1C8 = 4;
D_8018D1D0 = 6;
goto block_75;
}
} else {
D_8018D1C8 = 4;
D_8018D1D0 = 6;
block_75:
D_8018D1D8 = 6;
}
phi_s0_5 = &D_8018D198;
do {
*phi_s0_5 = 0;
find_unused_obj_index(phi_s1_8);
temp_s0_11 = phi_s0_5 + 1;
phi_s0_5 = temp_s0_11;
phi_s1_8 += 4;
} while (temp_s0_11 < &D_8018D1A0);
phi_s0_6 = &D_8018D1A8;
phi_s1_9 = &D_80183EA0;
do {
*phi_s0_6 = 0;
find_unused_obj_index(phi_s1_9);
temp_s0_12 = phi_s0_6 + 1;
phi_s0_6 = temp_s0_12;
phi_s1_9 += 4;
} while (temp_s0_12 < &D_8018D1B3);
phi_s0_7 = &D_8018D1B8;
phi_s1_10 = &D_80183EA0;
do {
*phi_s0_7 = 0;
find_unused_obj_index(phi_s1_10);
temp_s0_13 = phi_s0_7 + 1;
phi_s0_7 = temp_s0_13;
phi_s1_10 += 4;
} while (temp_s0_13 < &D_8018D1C4);
phi_s1_11 = &D_8018C1B0;
phi_s2_6 = &D_800E6360;
do {
find_unused_obj_index(phi_s1_11);
temp_s0_14 = *phi_s1_11;
func_800723A4(temp_s0_14, 0);
temp_v0_12 = &D_80165C18 + (temp_s0_14 * 0xE0);
sp4C = temp_v0_12;
temp_v0_12->unkC = phi_s2_6->unk4;
temp_v0_12->unk4 = phi_s2_6->unk0 * D_8018D01C;
func_800887C0(temp_s0_14);
temp_s2_2 = phi_s2_6 + 6;
temp_v0_12->unk0 = 0.7f;
phi_s1_11 += 4;
phi_s2_6 = temp_s2_2;
} while (temp_s2_2 < &D_800E641A);
phi_s0_8 = &D_8018C3F0;
do {
find_unused_obj_index(phi_s0_8);
temp_s0_15 = phi_s0_8 + 4;
phi_s0_8 = temp_s0_15;
} while (temp_s0_15 != &D_8018C5F0);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 11:
if (D_800DC50C != 9) {
find_unused_obj_index(&D_8018CF10);
func_800723A4(D_8018CF10, 0);
phi_s1_12 = &D_8018C1B0;
do {
find_unused_obj_index(phi_s1_12);
temp_s1_3 = phi_s1_12 + 4;
phi_s1_12 = temp_s1_3;
} while (temp_s1_3 < &D_8018C278);
phi_s0_9 = &D_8018C3F0;
do {
find_unused_obj_index(phi_s0_9);
temp_s0_16 = phi_s0_9 + 4;
phi_s0_9 = temp_s0_16;
} while (temp_s0_16 < &D_8018C404);
phi_s0_10 = &D_8018C630;
do {
find_unused_obj_index(phi_s0_10);
temp_s0_17 = phi_s0_10 + 4;
phi_s0_10 = temp_s0_17;
} while (temp_s0_17 != &D_8018C6B0);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 12:
phi_s1_13 = &D_80183EA0;
do {
func_800723A4(*phi_s1_13, 0);
temp_s1_4 = phi_s1_13 + 4;
phi_s1_13 = temp_s1_4;
} while (temp_s1_4 != &D_80183EDC);
return;
case 13:
phi_s1_14 = &D_80183EA0;
if (D_800DC50C != 9) {
do {
func_800723A4(*phi_s1_14, 0);
temp_s1_5 = phi_s1_14 + 4;
phi_s1_14 = temp_s1_5;
} while (temp_s1_5 < &D_80183EC8);
phi_s2_7 = &D_80183F28;
do {
func_800723A4(*phi_s2_7, 0);
temp_s2_3 = phi_s2_7 + 4;
phi_s2_7 = temp_s2_3;
} while (temp_s2_3 != &D_80183F34);
return;
}
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
case 18:
phi_s3_6 = 0;
do {
func_800770F0(phi_s3_6);
temp_s3_6 = phi_s3_6 + 1;
phi_s3_6 = temp_s3_6;
} while (temp_s3_6 != 8);
/* Duplicate return node #106. Try simplifying control flow for better match */
return;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070780.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32); // extern
? func_80070190(); // extern
? func_8007055C(); // extern
? func_80070780(); // extern
s32 func_800B4E24(?); // extern
s32 func_800B4F2C(?, f32, s32 *, s32, s16, s16); // extern
extern s32 D_80165638;
extern s32 D_80165648;
extern s16 D_801656B0;
extern s16 D_80165708;
extern s16 D_8016579E;
extern s16 D_801657A2;
extern s8 D_80165888;
extern s8 D_80165890;
extern s32 D_80183DA0;
extern s32 D_80183DB8;
extern s32 D_80183DBC;
extern s32 D_80183E88;
extern s32 D_80183E8C;
extern ? D_8018CA70;
extern f32 D_8018CFCC;
extern f32 D_8018CFD4;
extern f32 D_8018CFEC;
extern f32 D_8018CFF4;
extern f32 D_8018D00C;
extern ? D_8018D028;
extern ? D_8018D050;
extern ? D_8018D078;
extern ? D_8018D098;
extern ? D_8018D0A0;
extern ? D_8018D0C8;
extern ? D_8018D0F0;
extern s32 D_8018D140;
extern s32 D_8018D150;
extern s32 D_8018D158;
extern s32 D_8018D380;
extern s32 D_8018D384;
extern s32 D_8018D388;
extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
extern s32 D_8018D3C4;
extern s32 D_8018D3D4;
extern s32 D_8018D3D8;
extern s32 D_8018D3DC;
extern s32 D_8018D3E0;
extern s32 D_8018D3E4;
extern s32 D_8018D3E8;
extern s32 D_8018D3EC;
extern s32 D_8018D3F0;
extern s32 D_8018D3F4;
void func_80071428(void) {
? *temp_a0;
? *temp_a3;
? *temp_v0;
? *temp_v1;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
s32 temp_v1_2;
f32 phi_f0;
? *phi_a1;
? *phi_a2;
? *phi_v1;
? *phi_a0;
? *phi_a3;
? *phi_v0;
D_8018D140 = 0;
D_8018D150 = 0;
D_8018CFCC = 1.0f;
find_unused_obj_index(&D_80183DA0);
find_unused_obj_index(&D_80183DB8);
find_unused_obj_index(&D_80183DBC);
find_unused_obj_index(&D_80183E88);
find_unused_obj_index(&D_80183E8C);
func_80070190();
func_8007055C();
func_8007055C();
func_80070780();
D_8018CA70.unk3E = 0x156;
D_8018CA70.unk40 = 0x106;
D_8018CFEC = D_8018CA70.unk3E + 0x18;
D_8018CFF4 = D_8018CA70.unk40 + 6;
D_8016579E = 0xDD00;
D_8018CA70.unk62 = 0x34;
D_8018CA70.unk64 = 0xC8;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk4E = 0x12C;
D_8018CA70.unk50 = 0x12C;
D_8018CA70.unk52 = 0x12C;
D_8018CA70.unk58 = 0x11;
D_8018CA70.unk5A = -0x28;
D_8018CA70.unk5C = -0x28;
D_8018CA70.unk5E = -0x28;
D_8018CA70.unk60 = 0x19;
D_8018CA70.unk42 = 0xA0;
D_8018CA70.unk44 = -0x20;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk6A = *D_801643B8;
func_8006EE7C(D_80183E88);
phi_f0 = 35.0f;
phi_a1 = &D_8018D050;
phi_a2 = &D_8018D0F0;
phi_v1 = &D_8018D0C8;
phi_a0 = &D_8018D028;
phi_a3 = &D_8018D0A0;
phi_v0 = &D_8018D078;
do {
phi_a1->unk0 = phi_f0;
phi_a2->unk0 = phi_f0;
temp_v0 = phi_v0 + 0x10;
phi_v1->unk4 = 40.0f;
temp_f0 = phi_f0 + 32.0;
phi_a0->unk4 = -24.0f;
phi_a3->unk4 = 0.0f;
temp_v0->unk-C = 0.0f;
phi_a1->unk4 = temp_f0;
phi_a2->unk4 = temp_f0;
phi_v1->unk8 = 40.0f;
phi_a0->unk8 = -24.0f;
temp_f0_2 = temp_f0 + 32.0;
phi_a3->unk8 = 0.0f;
temp_v0->unk-8 = 0.0f;
phi_v1->unkC = 40.0f;
phi_a1->unk8 = temp_f0_2;
phi_a2->unk8 = temp_f0_2;
phi_a0->unkC = -24.0f;
phi_a3->unkC = 0.0f;
temp_f0_3 = temp_f0_2 + 32.0;
temp_v0->unk-4 = 0.0f;
temp_v1 = phi_v1 + 0x10;
temp_a0 = phi_a0 + 0x10;
phi_a1->unkC = temp_f0_3;
phi_a2->unkC = temp_f0_3;
temp_a3 = phi_a3 + 0x10;
temp_v1->unk-10 = 40.0f;
temp_a0->unk-10 = -24.0f;
temp_a3->unk-10 = 0.0f;
temp_v0->unk-10 = 0.0f;
phi_f0 = temp_f0_3 + 32.0;
phi_a1 += 0x10;
phi_a2 += 0x10;
phi_v1 = temp_v1;
phi_a0 = temp_a0;
phi_a3 = temp_a3;
phi_v0 = temp_v0;
} while (temp_v0 != &D_8018D098);
D_8018CFD4 = 1.0f;
D_8018D3DC = 0xFF;
D_8018D3D8 = 0xFF;
D_8018D3D4 = 0xFF;
D_8018D3E0 = 0xA0;
D_8018D3E4 = 0xFF;
D_8018D3E8 = 0xFF;
D_8018D3EC = 0xFF;
D_8018D3F0 = 0xFF;
D_8018D3F4 = 1;
D_8018CA70.unk4C = 0x78;
D_8018CA70.unk4A = 0xA0;
D_8018CA70.unk4 = 0.5f;
D_801656B0 = 0;
D_80165708 = 0x28;
D_8018D00C = 5.0f;
D_8018D388 = 4;
D_8018D380 = 0xA0;
D_8018D384 = 0x78;
D_8018D3C4 = 0x32;
D_8018D3BC = 0x28;
temp_v1_2 = gModeSelection;
D_8018D3C0 = 0x50;
D_801657A2 = 0x333;
if (temp_v1_2 != GRAND_PRIX) {
if (temp_v1_2 != TIME_TRIALS) {
return;
}
D_80165638 = (func_800B4F2C(0, 40.0f, &D_8018D3DC, 1, 0x78, 0x28) & 0xFFFFF) - 1;
D_80165648 = func_800B4E24(0) & 0xFFFFF;
D_80165888 = 1;
D_80165890 = 1;
D_8018D158 = 1;
return;
}
D_8018D158 = 8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071428.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32); // extern
? func_80070190(); // extern
? func_8007055C(); // extern
? func_80070780(); // extern
extern s16 D_801657A2;
extern s32 D_80183DA0;
extern s32 D_80183DB8;
extern s32 D_80183DBC;
extern s32 D_80183E88;
extern s32 D_80183E8C;
extern ? D_8018CA70;
extern s32 D_8018D158;
extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
extern s32 D_8018D3C4;
void func_80071818(void) {
s32 temp_v1;
find_unused_obj_index(&D_80183DA0);
find_unused_obj_index(&D_80183DB8);
find_unused_obj_index(&D_80183DBC);
find_unused_obj_index(&D_80183E88);
find_unused_obj_index(&D_80183E8C);
func_80070190();
func_8007055C();
func_8007055C();
func_80070780();
D_8018CA70.unk42 = -0x52;
D_8018CA70.unk44 = 0x32;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk4A = 0x50;
D_8018CA70.unk4C = 0x78;
D_8018CA70.unk62 = 0x32;
D_8018CA70.unk64 = 0xD2;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk4E = 0x4B;
D_8018CA70.unk58 = 0x10;
D_8018CA70.unk5A = 0x67;
D_8018CA70.unk60 = 0x28;
func_8006EE7C(D_80183E88);
D_8018CA70.unkC6 = 0x43;
D_8018CA70.unkC8 = 0x32;
D_8018CA70.unkCA = 0;
D_8018CA70.unkCC = 0;
D_8018CA70.unkCE = 0xF0;
D_8018CA70.unkD0 = 0x78;
D_8018CA70.unkE6 = 0xC8;
D_8018CA70.unkE8 = 0xD2;
D_8018CA70.unkEA = 0;
D_8018CA70.unkEC = 0;
D_8018CA70.unkD2 = 0xDC;
D_8018CA70.unkDC = 0x10;
D_8018CA70.unkDE = 0xF7;
D_8018CA70.unkE4 = 0x28;
func_8006EE7C(D_80183E8C);
D_8018CA70.unk88 = 0.5f;
D_8018CA70.unk6A = D_801643B8->unk0;
D_8018CA70.unkEE = D_801643B8->unk4;
D_8018CA70.unk4 = D_8018CA70.unk88;
D_8018D3C4 = 0x1E;
D_8018D3BC = 0x18;
temp_v1 = gModeSelection;
D_8018D3C0 = 0x28;
D_801657A2 = 0x666;
if (temp_v1 != GRAND_PRIX) {
if (temp_v1 != VERSUS) {
if (temp_v1 != BATTLE) {
return;
}
goto block_7;
}
block_7:
D_8018D158 = 2;
return;
}
D_8018D158 = 8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071818.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32, s16, s16, s16); // extern
? func_80070190(); // extern
? func_8007055C(); // extern
? func_80070780(); // extern
extern s16 D_801657A2;
extern s32 D_80183DA0;
extern s32 D_80183DB8;
extern s32 D_80183DBC;
extern s32 D_80183E88;
extern s32 D_80183E8C;
extern ? D_8018CA70;
extern s32 D_8018D158;
extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
extern s32 D_8018D3C4;
void func_80071A20(void) {
s32 temp_v0;
find_unused_obj_index(&D_80183DA0);
find_unused_obj_index(&D_80183DB8);
find_unused_obj_index(&D_80183DBC);
find_unused_obj_index(&D_80183E88);
find_unused_obj_index(&D_80183E8C);
func_80070190();
func_8007055C();
func_8007055C();
func_80070780();
D_8018CA70.unk44 = 0x22;
D_8018CA70.unk42 = -0x53;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk4A = 0xA0;
D_8018CA70.unk4C = 0x3C;
D_8018CA70.unk62 = 0x34;
D_8018CA70.unk64 = 0x62;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk4E = 0xEA;
D_8018CA70.unk58 = 0x10;
D_8018CA70.unk5A = 0x101;
D_8018CA70.unk60 = 0x6A;
D_8018CA70.unkC6 = -0x53;
D_8018CA70.unkC8 = 0x8F;
D_8018CA70.unkCA = 0;
D_8018CA70.unkCC = 0;
D_8018CA70.unkCE = 0xA0;
D_8018CA70.unkD0 = 0xB4;
D_8018CA70.unkE6 = 0x34;
D_8018CA70.unkE8 = 0xD2;
D_8018CA70.unkEA = 0;
D_8018CA70.unkEC = 0;
D_8018CA70.unkD2 = 0xEA;
D_8018CA70.unkDC = 0x7F;
D_8018CA70.unkDE = 0x101;
D_8018CA70.unkE4 = 0xDA;
if (gModeSelection == BATTLE) {
D_8018CA70.unk44 = 0x5E;
D_8018CA70.unkC8 = 0xD0;
}
D_8018CA70.unk88 = 0.5f;
D_8018CA70.unk6A = D_801643B8->unk0;
D_8018CA70.unkEE = D_801643B8->unk4;
D_8018CA70.unk4 = D_8018CA70.unk88;
func_8006EE7C(D_80183E88, 0x34, 0xEA, 0x101);
func_8006EE7C(D_80183E8C);
D_8018D3C4 = 0x1E;
D_8018D3BC = 0x18;
temp_v0 = gModeSelection;
D_8018D3C0 = 0x28;
D_801657A2 = 0x666;
if (temp_v0 != GRAND_PRIX) {
if (temp_v0 != VERSUS) {
if (temp_v0 != BATTLE) {
return;
}
goto block_9;
}
block_9:
D_8018D158 = 2;
return;
}
D_8018D158 = 8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071A20.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32, s16, s16, s16); // extern
? func_80070190(); // extern
? func_80070780(); // extern
extern s16 D_801657A2;
extern s32 D_80183DA0;
extern s32 D_80183DB8;
extern s32 D_80183DBC;
extern s32 D_80183DC0;
extern s32 D_80183DC4;
extern s32 D_80183E88;
extern s32 D_80183E8C;
extern s32 D_80183E90;
extern s32 D_80183E94;
extern ? D_8018CA70;
extern s32 D_8018D158;
extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
extern s32 D_8018D3C4;
void func_80071C28(void) {
f32 temp_f0;
f32 temp_f0_2;
find_unused_obj_index(&D_80183DA0);
find_unused_obj_index(&D_80183DB8);
find_unused_obj_index(&D_80183DBC);
find_unused_obj_index(&D_80183DC0);
find_unused_obj_index(&D_80183DC4);
find_unused_obj_index(&D_80183E88);
find_unused_obj_index(&D_80183E8C);
find_unused_obj_index(&D_80183E90);
find_unused_obj_index(&D_80183E94);
func_80070190();
func_80070780();
D_8018CA70.unkE6 = 0x11A;
D_8018CA70.unk16C = 0xD2;
D_8018CA70.unk14C = 0x2D;
D_8018CA70.unk168 = 0xD4;
D_8018CA70.unk176 = 0xC0;
D_8018CA70.unk1D0 = 0x2D;
D_8018CA70.unk1EE = 0x11A;
D_8018CA70.unk42 = -0x36;
D_8018CA70.unk44 = 0x36;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk4A = 0x50;
D_8018CA70.unk4C = 0x3C;
D_8018CA70.unk62 = 0x25;
D_8018CA70.unk64 = 0x64;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk5A = 0x8C;
D_8018CA70.unk60 = 0x60;
D_8018CA70.unk6C = 0xDE;
D_8018CA70.unk6E = 0xC8;
D_8018CA70.unkC6 = 0x175;
D_8018CA70.unkC8 = 0x36;
D_8018CA70.unkCA = 0;
D_8018CA70.unkCC = 0;
D_8018CA70.unkCE = 0xF0;
D_8018CA70.unkD0 = 0x3C;
D_8018CA70.unkE8 = 0x64;
D_8018CA70.unkEA = 0;
D_8018CA70.unkEC = 0;
D_8018CA70.unkDE = 0xB4;
D_8018CA70.unkE4 = 0x60;
D_8018CA70.unkF0 = 0xC8;
D_8018CA70.unkF2 = 0xC8;
D_8018CA70.unk14A = -0x36;
D_8018CA70.unk14E = 0;
D_8018CA70.unk150 = 0;
D_8018CA70.unk152 = 0x50;
D_8018CA70.unk154 = 0xB4;
D_8018CA70.unk16A = 0x25;
D_8018CA70.unk16E = 0;
D_8018CA70.unk170 = 0;
D_8018CA70.unk162 = 0x8C;
D_8018CA70.unk174 = 0xDE;
D_8018CA70.unk1CE = 0x175;
D_8018CA70.unk1D2 = 0;
D_8018CA70.unk1D4 = 0;
D_8018CA70.unk1D6 = 0xF0;
D_8018CA70.unk1D8 = 0xB4;
D_8018CA70.unk1F0 = 0xD2;
D_8018CA70.unk1F2 = 0;
D_8018CA70.unk1F4 = 0;
D_8018CA70.unk1E6 = 0xB4;
D_8018CA70.unk1EC = 0xD4;
D_8018CA70.unk1F8 = 0xC8;
D_8018CA70.unk1FA = 0xC0;
if (gModeSelection == BATTLE) {
D_8018CA70.unk44 = 0xC8;
D_8018CA70.unkC8 = 0xC8;
D_8018CA70.unk14C = 0xB8;
D_8018CA70.unk1D0 = 0xB8;
}
D_8018CA70.unk190 = 0.5f;
temp_f0 = D_8018CA70.unk190;
D_8018CA70.unk10C = temp_f0;
D_8018CA70.unk88 = temp_f0;
D_8018CA70.unk4 = temp_f0;
D_8018CA70.unk6A = D_801643B8->unk0;
D_8018CA70.unkEE = D_801643B8->unk4;
D_8018CA70.unk172 = D_801643B8->unk8;
D_8018CA70.unk1F6 = D_801643B8->unkC;
func_8006EE7C(D_80183E88, 0x36, 0x50, 0x3C);
func_8006EE7C(D_80183E8C);
func_8006EE7C(D_80183E90);
func_8006EE7C(D_80183E94);
D_8018CA70.unk18C = 1.5f;
temp_f0_2 = D_8018CA70.unk18C;
D_8018CA70.unk108 = temp_f0_2;
D_8018CA70.unk84 = temp_f0_2;
D_8018CA70.unk0 = temp_f0_2;
D_8018D158 = D_8018EDF3;
D_8018D3C4 = 0x14;
D_8018D3BC = 0x10;
D_8018D3C0 = 0x1E;
D_801657A2 = 0x888;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071C28.s")
#endif