summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler McGavran <tyler.taggerung@gmail.com>2022-09-20 21:45:14 -0400
committerGitHub <noreply@github.com>2022-09-20 18:45:14 -0700
commit3c048af3e646efe7ea23fa03ec592b46c4be978a (patch)
treee3e8f2edd744226c174d91d543a5f026d10845c2 /src
parent32358c30fdccf52a3f623a32ebb98522684547e3 (diff)
Some matches for code_80091750 (#258)
Managed to get some arcane fake matches for some long standing non-matching functions Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/code_80091750.c2298
-rw-r--r--src/code_80091750.h13
2 files changed, 1024 insertions, 1287 deletions
diff --git a/src/code_80091750.c b/src/code_80091750.c
index a61d3d163..15de55d73 100644
--- a/src/code_80091750.c
+++ b/src/code_80091750.c
@@ -1979,585 +1979,512 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80095BD0.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-Gfx *func_80095E10(Gfx *arg0, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, u32 argB, u32 argC) {
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+Gfx *func_80095E10(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, u32 argB, u32 argC) {
s32 sp7C;
- s32 sp70;
+ u32 sp70;
s32 sp6C;
s32 sp68;
s32 sp64;
u32 sp34;
- Gfx *temp_a0_10;
+ Gfx *temp_a0;
+ Gfx *temp_a0_2;
+ Gfx *temp_a0_3;
+ Gfx *temp_a0_4;
+ Gfx *temp_a0_5;
+ Gfx *temp_a0_6;
+ Gfx *temp_a0_7;
+ Gfx *temp_a0_8;
+ Gfx *temp_a0_9;
+ Gfx *var_a0;
+ s32 temp_a1;
s32 temp_a2;
- s32 temp_a2_2;
- s32 temp_a2_3;
+ s32 temp_at;
+ s32 temp_at_2;
s32 temp_lo;
- s32 temp_s2;
- s32 temp_s4;
s32 temp_t1;
s32 temp_t2;
- s32 temp_t3;
s32 temp_t6;
s32 temp_t7_2;
s32 temp_v0;
s32 temp_v0_2;
- s32 temp_v0_3;
- s32 temp_v1;
- s32 temp_v1_2;
+ s32 var_a1;
+ s32 var_a1_2;
+ s32 var_a2;
+ s32 var_a2_2;
+ s32 var_a3;
+ s32 var_ra;
+ s32 var_s1;
+ s32 var_s3;
+ s32 var_s4;
+ s32 var_s6;
+ s32 var_s7;
+ s32 var_t0_2;
+ s32 var_t2;
+ s32 var_v0;
+ s32 var_v0_3;
+ s32 var_v0_4;
+ s32 var_v1;
u32 temp_s5;
+ u32 temp_t3;
u32 temp_t6_2;
u32 temp_t7;
- void *temp_a0;
- void *temp_a0_2;
- void *temp_a0_3;
- void *temp_a0_4;
- void *temp_a0_5;
- void *temp_a0_6;
- void *temp_a0_7;
- void *temp_a0_8;
- void *temp_a0_9;
- u32 phi_t0;
- s32 phi_t0_2;
- s32 phi_v0;
- s32 phi_v0_2;
- s32 phi_a2;
- s32 phi_v0_3;
- s32 phi_v0_4;
- s32 phi_a1;
- s32 phi_a2_2;
- s32 phi_s3;
- u32 phi_v1;
- s32 phi_t0_3;
- s32 phi_a1_2;
- u32 phi_t1;
- Gfx *phi_a0;
- s32 phi_t2;
- s32 phi_s2;
- s32 phi_t4;
- s32 phi_a3;
- s32 phi_t0_4;
- s32 phi_v1_2;
- s32 phi_a2_3;
- s32 phi_s1;
- s32 phi_s6;
- s32 phi_s7;
- s32 phi_fp;
- Gfx *phi_a0_2;
- s32 phi_a2_4;
- Gfx *phi_a0_3;
- s32 phi_s4;
- s32 phi_ra;
- Gfx *phi_a0_4;
+ u32 var_fp;
+ u32 var_s2;
+ u32 var_t0;
+ u32 var_t1;
+ u32 var_t4;
+ u32 var_v0_2;
+ var_a0 = displayListHead;
+ var_t0 = 1;
sp68 = 0;
sp64 = 0;
- phi_t0 = 1U;
- phi_t0_2 = (s32) 1U;
- phi_a0_2 = arg0;
- phi_a0_3 = arg0;
if (argB >= 2U) {
do {
- temp_t7 = phi_t0 * 2;
- phi_t0 = temp_t7;
- phi_t0_2 = (s32) temp_t7;
+ temp_t7 = var_t0 * 2;
+ var_t0 = temp_t7;
} while (temp_t7 < argB);
}
- temp_lo = 0x400 / phi_t0_2;
- phi_a2 = temp_lo;
- phi_t0_3 = phi_t0_2;
+ temp_lo = 0x400 / (s32) var_t0;
+ var_a2 = temp_lo;
if (argC < (u32) (temp_lo / 2)) {
- phi_v0 = temp_lo / 2;
+ var_v0 = var_a2 / 2;
do {
- temp_v0 = phi_v0 / 2;
- phi_v0 = temp_v0;
- } while (argC < (u32) temp_v0);
- sp6C = phi_v0;
- phi_a2 = phi_v0;
+ temp_a1 = var_v0;
+ var_v0 = temp_a1 / 2;
+ } while (argC < (u32) var_v0);
+ sp6C = temp_a1;
+ var_a2 = temp_a1;
}
- phi_v0_2 = phi_t0_2;
- phi_a2_2 = phi_a2;
- if (phi_t0_2 >= 2) {
+ var_v0_2 = var_t0;
+ if ((s32) var_t0 >= 2) {
do {
- temp_t7_2 = phi_v0_2 / 2;
+ temp_t7_2 = (s32) var_v0_2 / 2;
+ temp_at = temp_t7_2 < 2;
+ var_v0_2 = (u32) temp_t7_2;
sp68 += 1;
- phi_v0_2 = temp_t7_2;
- } while (temp_t7_2 >= 2);
+ } while (temp_at == 0);
}
- phi_v0_3 = phi_a2;
- if (phi_a2 >= 2) {
+ var_v0_3 = var_a2;
+ if (var_a2 >= 2) {
do {
- temp_t6 = phi_v0_3 / 2;
+ temp_t6 = var_v0_3 / 2;
+ temp_at_2 = temp_t6 < 2;
+ var_v0_3 = temp_t6;
sp64 += 1;
- phi_v0_3 = temp_t6;
- } while (temp_t6 >= 2);
+ } while (temp_at_2 == 0);
}
- phi_a1 = arg8;
- if (arg8 < 0) {
- arg4 -= arg8;
- phi_a1 = 0;
- } else if (((arg6 - arg4) + arg8) >= 0x141) {
- arg6 = (arg4 - arg8) + 0x140;
- }
- phi_v0_4 = arg5;
- phi_v1 = (u32) arg6;
- phi_ra = arg9;
- if (arg9 < 0) {
- phi_v0_4 = arg5 - arg9;
- phi_ra = 0;
- } else if (((arg7 - arg5) + arg9) >= 0xF1) {
- arg7 = (arg5 - arg9) + 0xF0;
+ var_a1 = arg8;
+ if (var_a1 < 0) {
+ arg4 -= var_a1;
+ var_a1 = 0;
+ } else if (((arg6 - arg4) + var_a1) >= 0x141) {
+ arg6 = (arg4 - var_a1) + 0x140;
+ }
+ var_ra = arg9;
+ var_v0_4 = arg5;
+ if (var_ra < 0) {
+ var_v0_4 = arg5 - var_ra;
+ var_ra = 0;
+ } else if (((arg7 - var_v0_4) + var_ra) >= 0xF1) {
+ arg7 = (var_v0_4 - var_ra) + 0xF0;
}
if (arg6 < arg4) {
- } else if (arg7 < phi_v0_4) {
+ } else if (arg7 < var_v0_4) {
} else {
- sp7C = phi_a1;
- phi_s3 = phi_v0_4;
- if ((u32) phi_v0_4 < (u32) arg7) {
- arg8 = phi_a1;
+ sp7C = var_a1;
+ var_s3 = var_v0_4;
+ if ((u32) var_v0_4 < (u32) arg7) {
+ arg8 = var_a1;
loop_24:
- temp_t6_2 = phi_a2_2 + phi_s3;
+ temp_t6_2 = var_a2 + var_s3;
sp34 = temp_t6_2;
- phi_a0 = phi_a0_3;
- phi_a0_2 = phi_a0_3;
- phi_a2_4 = phi_a2_2;
- phi_a0_4 = phi_a0_3;
if ((u32) arg7 < temp_t6_2) {
- temp_s4 = arg7 - phi_s3;
- phi_s4 = temp_s4;
- if (temp_s4 != 0) {
+ var_s4 = arg7 - var_s3;
+ if (var_s4 != 0) {
goto block_28;
}
} else {
- phi_s4 = phi_a2_2;
+ var_s4 = var_a2;
block_28:
- phi_a1_2 = arg4;
- if ((u32) arg4 < phi_v1) {
- arg6 = (s32) phi_v1;
- sp6C = phi_a2_2;
- sp70 = phi_t0_3;
+ var_a1_2 = arg4;
+ if ((u32) arg4 < (u32) arg6) {
+ sp6C = var_a2;
+ sp70 = var_t0;
loop_30:
- temp_s5 = sp70 + phi_a1_2;
- phi_s2 = sp70;
- phi_v1 = (u32) arg6;
- phi_a0_4 = phi_a0;
+ temp_s5 = sp70 + var_a1_2;
+ var_s2 = sp70;
if ((u32) arg6 < temp_s5) {
- temp_s2 = arg6 - phi_a1_2;
- phi_s2 = temp_s2;
- if (temp_s2 == 0) {
- phi_a2_4 = sp6C;
- phi_t0_3 = sp70;
+ var_s2 = arg6 - var_a1_2;
+ if (var_s2 == 0) {
+ var_t0 = sp70;
+ var_a2 = sp6C;
} else {
- arg6 = arg6;
- temp_v0_2 = (arg1 & 7) << 0x15;
- temp_a2 = (sp68 & 0xF) * 0x10;
- temp_v1 = (sp64 & 0xF) << 0xE;
- phi_t1 = temp_v0_2 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
- phi_t2 = temp_v0_2 | 0xF5000000 | 0x100000;
- phi_t4 = temp_v1 | 0x07000000 | temp_a2;
- phi_a3 = (phi_s3 * 4) & 0xFFF;
- phi_t0_4 = ((phi_s3 + phi_s4) * 4) & 0xFFF;
- phi_v1_2 = temp_v1;
- phi_a2_3 = temp_a2;
- phi_s1 = ((phi_ra + phi_s4) * 4) & 0xFFF;
- phi_s6 = (phi_ra * 4) & 0xFFF;
- phi_s7 = (phi_s3 << 5) & 0xFFFF;
- phi_fp = (arg2 << 0x10) | (arg3 & 0xFFFF);
+ temp_v0 = (arg1 & 7) << 0x15;
+ var_t1 = temp_v0 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
+ var_a2_2 = (sp68 & 0xF) * 0x10;
+ var_v1 = (sp64 & 0xF) << 0xE;
+ var_t4 = var_v1 | 0x07000000 | var_a2_2;
+ var_t0_2 = ((var_s3 + var_s4) * 4) & 0xFFF;
+ var_s1 = ((var_ra + var_s4) * 4) & 0xFFF;
+ var_s6 = (var_ra * 4) & 0xFFF;
+ var_t2 = temp_v0 | 0xF5000000 | 0x100000;
+ var_s7 = (var_s3 << 5) & 0xFFFF;
+ var_a3 = (var_s3 * 4) & 0xFFF;
+ var_fp = (arg2 << 0x10) | (arg3 & 0xFFFF);
goto block_35;
}
} else {
- temp_v0_3 = (arg1 & 7) << 0x15;
- temp_a2_2 = (sp68 & 0xF) * 0x10;
- temp_v1_2 = (sp64 & 0xF) << 0xE;
- phi_t1 = temp_v0_3 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
- phi_t2 = temp_v0_3 | 0xF5000000 | 0x100000;
- phi_t4 = temp_v1_2 | 0x07000000 | temp_a2_2;
- phi_a3 = (phi_s3 * 4) & 0xFFF;
- phi_t0_4 = ((phi_s3 + phi_s4) * 4) & 0xFFF;
- phi_v1_2 = temp_v1_2;
- phi_a2_3 = temp_a2_2;
- phi_s1 = ((phi_ra + phi_s4) * 4) & 0xFFF;
- phi_s6 = (phi_ra * 4) & 0xFFF;
- phi_s7 = (phi_s3 << 5) & 0xFFFF;
- phi_fp = (arg2 << 0x10) | (arg3 & 0xFFFF);
+ temp_v0_2 = (arg1 & 7) << 0x15;
+ var_t1 = temp_v0_2 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
+ var_a2_2 = (sp68 & 0xF) * 0x10;
+ var_v1 = (sp64 & 0xF) << 0xE;
+ var_t4 = var_v1 | 0x07000000 | var_a2_2;
+ var_t0_2 = ((var_s3 + var_s4) * 4) & 0xFFF;
+ var_s1 = ((var_ra + var_s4) * 4) & 0xFFF;
+ var_s6 = (var_ra * 4) & 0xFFF;
+ var_t2 = temp_v0_2 | 0xF5000000 | 0x100000;
+ var_s7 = (var_s3 << 5) & 0xFFFF;
+ var_a3 = (var_s3 * 4) & 0xFFF;
+ var_fp = (arg2 << 0x10) | (arg3 & 0xFFFF);
block_35:
- phi_a0->words.w0 = phi_t1;
- temp_a2_3 = phi_a1_2 + phi_s2;
- phi_a0->words.w1 = argA;
- temp_a0 = phi_a0 + 8;
- temp_t3 = phi_t2 | ((((u32) (((temp_a2_3 - phi_a1_2) * 2) + 9) >> 3) & 0x1FF) << 9);
+ var_a0->words.w0 = var_t1;
+ temp_a2 = var_a1_2 + var_s2;
+ var_a0->words.w1 = (u32) argA;
+ temp_a0 = var_a0 + 8;
+ temp_t3 = var_t2 | ((((u32) (((temp_a2 - var_a1_2) * 2) + 9) >> 3) & 0x1FF) << 9);
temp_a0_2 = temp_a0 + 8;
- temp_t1 = ((phi_a1_2 * 4) & 0xFFF) << 0xC;
- temp_a0->unk0 = temp_t3;
- temp_a0->unk4 = phi_t4;
- temp_a0_2->unk0 = 0xE6000000;
+ temp_t1 = ((var_a1_2 * 4) & 0xFFF) << 0xC;
+ temp_a0->words.w0 = temp_t3;
+ temp_a0->words.w1 = var_t4;
+ temp_a0_2->words.w0 = 0xE6000000;
temp_a0_3 = temp_a0_2 + 8;
- temp_t2 = ((temp_a2_3 * 4) & 0xFFF) << 0xC;
- temp_a0_2->unk4 = 0;
- temp_a0_3->unk0 = (s32) (temp_t1 | 0xF4000000 | phi_a3);
+ temp_t2 = ((temp_a2 * 4) & 0xFFF) << 0xC;
+ temp_a0_2->words.w1 = 0;
+ temp_a0_3->words.w0 = temp_t1 | 0xF4000000 | var_a3;
temp_a0_4 = temp_a0_3 + 8;
- temp_a0_3->unk4 = (s32) (temp_t2 | 0x07000000 | phi_t0_4);
+ temp_a0_3->words.w1 = temp_t2 | 0x07000000 | var_t0_2;
temp_a0_5 = temp_a0_4 + 8;
- temp_a0_4->unk0 = 0xE7000000;
- temp_a0_4->unk4 = 0;
+ temp_a0_4->words.w0 = 0xE7000000;
+ temp_a0_4->words.w1 = 0;
temp_a0_6 = temp_a0_5 + 8;
- temp_a0_5->unk4 = (s32) (phi_v1_2 | phi_a2_3);
- temp_a0_5->unk0 = temp_t3;
- temp_a0_6->unk4 = (s32) (temp_t2 | phi_t0_4);
- temp_a0_6->unk0 = (s32) (temp_t1 | 0xF2000000 | phi_a3);
+ temp_a0_5->words.w1 = var_v1 | var_a2_2;
+ temp_a0_5->words.w0 = temp_t3;
+ temp_a0_6->words.w1 = temp_t2 | var_t0_2;
+ temp_a0_6->words.w0 = temp_t1 | 0xF2000000 | var_a3;
temp_a0_7 = temp_a0_6 + 8;
- temp_a0_7->unk0 = (s32) (((((arg8 + phi_s2) * 4) & 0xFFF) << 0xC) | 0xE4000000 | phi_s1);
+ temp_a0_7->words.w0 = ((((arg8 + var_s2) * 4) & 0xFFF) << 0xC) | 0xE4000000 | var_s1;
temp_a0_8 = temp_a0_7 + 8;
- temp_a0_7->unk4 = (s32) ((((arg8 * 4) & 0xFFF) << 0xC) | phi_s6);
- temp_a0_8->unk0 = 0xB3000000;
+ temp_a0_7->words.w1 = (((arg8 * 4) & 0xFFF) << 0xC) | var_s6;
+ temp_a0_8->words.w0 = 0xB3000000;
temp_a0_9 = temp_a0_8 + 8;
- temp_a0_8->unk4 = (s32) ((phi_a1_2 << 0x15) | phi_s7);
- temp_a0_9->unk0 = 0xB2000000;
- temp_a0_9->unk4 = phi_fp;
+ temp_a0_8->words.w1 = (var_a1_2 << 0x15) | var_s7;
+ temp_a0_9->words.w0 = 0xB2000000;
+ temp_a0_9->words.w1 = var_fp;
+ var_a1_2 = (s32) temp_s5;
arg8 += sp70;
- temp_a0_10 = temp_a0_9 + 8;
- phi_a1_2 = (s32) temp_s5;
- phi_a0 = temp_a0_10;
- phi_a0_4 = temp_a0_10;
+ var_a0 = temp_a0_9 + 8;
if (temp_s5 >= (u32) arg6) {
- phi_a2_4 = sp6C;
- phi_v1 = (u32) arg6;
- phi_t0_3 = sp70;
+ var_t0 = sp70;
+ var_a2 = sp6C;
} else {
goto loop_30;
}
}
}
+ var_s3 = (s32) sp34;
+ var_ra += var_a2;
arg8 = sp7C;
- phi_a2_2 = phi_a2_4;
- phi_s3 = (s32) sp34;
- phi_a0_2 = phi_a0_4;
- phi_a0_3 = phi_a0_4;
- phi_ra += phi_a2_4;
- if (sp34 < (u32) arg7) {
+ if ((u32) var_s3 < (u32) arg7) {
goto loop_24;
}
}
}
}
- return phi_a0_2;
+ return var_a0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_80095E10.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-Gfx *func_800963F0(Gfx *arg0, s8 arg1, s32 arg2, s32 arg3, f32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, s32 argB, s32 argC, u32 argD, u32 argE) {
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+Gfx *func_800963F0(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, f32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, s32 argB, s32 argC, u32 argD, u32 argE) {
s32 sp8C;
- s32 sp78;
+ u32 sp78;
s32 sp74;
s32 sp70;
s32 sp6C;
u32 sp34;
- Gfx *temp_a0_10;
+ Gfx *temp_a0;
+ Gfx *temp_a0_2;
+ Gfx *temp_a0_3;
+ Gfx *temp_a0_4;
+ Gfx *temp_a0_5;
+ Gfx *temp_a0_6;
+ Gfx *temp_a0_7;
+ Gfx *temp_a0_8;
+ Gfx *temp_a0_9;
+ Gfx *var_a0;
f32 temp_f0;
f32 temp_f0_2;
- f32 temp_f10;
- f32 temp_f8;
+ f32 var_f0;
+ f32 var_f10;
+ f32 var_f12;
+ f32 var_f16;
+ f32 var_f18;
+ f32 var_f8;
+ s32 temp_a1;
s32 temp_a2;
s32 temp_a2_2;
s32 temp_a2_3;
- s32 temp_fp;
+ s32 temp_at;
+ s32 temp_at_2;
s32 temp_lo;
s32 temp_t1;
s32 temp_t2;
- s32 temp_t3;
s32 temp_t6;
s32 temp_t7_2;
s32 temp_v0;
s32 temp_v0_2;
- s32 temp_v0_3;
s32 temp_v1;
s32 temp_v1_2;
- u32 temp_s2;
+ s32 var_a1;
+ s32 var_a1_2;
+ s32 var_a3;
+ s32 var_a3_2;
+ s32 var_fp;
+ s32 var_ra;
+ s32 var_s1;
+ s32 var_s3;
+ s32 var_s5;
+ s32 var_s6;
+ s32 var_t0_2;
+ s32 var_t2;
+ s32 var_v0;
+ s32 var_v0_3;
+ s32 var_v0_4;
u32 temp_s4;
+ u32 temp_t3;
u32 temp_t7;
u32 temp_t8;
- void *temp_a0;
- void *temp_a0_2;
- void *temp_a0_3;
- void *temp_a0_4;
- void *temp_a0_5;
- void *temp_a0_6;
- void *temp_a0_7;
- void *temp_a0_8;
- void *temp_a0_9;
- u32 phi_t0;
- s32 phi_t0_2;
- s32 phi_v0;
- s32 phi_v0_2;
- s32 phi_a3;
- s32 phi_v0_3;
- s32 phi_v0_4;
- s32 phi_ra;
- s32 phi_a1;
- s32 phi_a3_2;
- s32 phi_s3;
- u32 phi_a2;
- u32 phi_v1;
- s32 phi_t0_3;
- u32 phi_a1_2;
- s32 phi_fp;
- u32 phi_t1;
- Gfx *phi_a0;
- s32 phi_t2;
- u32 phi_s2;
- s32 phi_t4;
- s32 phi_a3_3;
- s32 phi_t0_4;
- s32 phi_s0;
- s32 phi_ra_2;
- s32 phi_s1;
- s32 phi_s5;
- s32 phi_s6;
- s32 phi_s7;
- f32 phi_f12;
- f32 phi_f18;
- u32 phi_a2_2;
- Gfx *phi_a0_2;
- Gfx *phi_a0_3;
- f32 phi_f0;
- f32 phi_f16;
- f32 phi_f10;
- f32 phi_f8;
- Gfx *phi_a0_4;
+ u32 var_s0;
+ u32 var_s2;
+ u32 var_s7;
+ u32 var_t0;
+ u32 var_t1;
+ u32 var_t4;
+ u32 var_v0_2;
+ var_a0 = displayListHead;
+ var_t0 = 1;
sp70 = 0;
sp6C = 0;
- phi_t0 = 1U;
- phi_t0_2 = (s32) 1U;
- phi_a0_2 = arg0;
- phi_a0_3 = arg0;
if (argD >= 2U) {
do {
- temp_t7 = phi_t0 * 2;
- phi_t0 = temp_t7;
- phi_t0_2 = (s32) temp_t7;
+ temp_t7 = var_t0 * 2;
+ var_t0 = temp_t7;
} while (temp_t7 < argD);
}
- temp_lo = 0x400 / phi_t0_2;
- phi_a3 = temp_lo;
- phi_t0_3 = phi_t0_2;
+ temp_lo = 0x400 / (s32) var_t0;
+ var_a3 = temp_lo;
if (argE < (u32) (temp_lo / 2)) {
- phi_v0 = temp_lo / 2;
+ var_v0 = var_a3 / 2;
do {
- temp_v0 = phi_v0 / 2;
- phi_v0 = temp_v0;
- } while (argE < (u32) temp_v0);
- sp74 = phi_v0;
- phi_a3 = phi_v0;
+ temp_a1 = var_v0;
+ var_v0 = temp_a1 / 2;
+ } while (argE < (u32) var_v0);
+ sp74 = temp_a1;
+ var_a3 = temp_a1;
}
- phi_v0_2 = phi_t0_2;
- phi_a3_2 = phi_a3;
- if (phi_t0_2 >= 2) {
+ var_v0_2 = var_t0;
+ if ((s32) var_t0 >= 2) {
do {
- temp_t7_2 = phi_v0_2 / 2;
+ temp_t7_2 = (s32) var_v0_2 / 2;
+ temp_at = temp_t7_2 < 2;
+ var_v0_2 = (u32) temp_t7_2;
sp70 += 1;
- phi_v0_2 = temp_t7_2;
- } while (temp_t7_2 >= 2);
+ } while (temp_at == 0);
}
- phi_v0_3 = phi_a3;
- if (phi_a3 >= 2) {
+ var_v0_3 = var_a3;
+ if (var_a3 >= 2) {
do {
- temp_t6 = phi_v0_3 / 2;
+ temp_t6 = var_v0_3 / 2;
+ temp_at_2 = temp_t6 < 2;
+ var_v0_3 = temp_t6;
sp6C += 1;
- phi_v0_3 = temp_t6;
- } while (temp_t6 >= 2);
+ } while (temp_at_2 == 0);
}
- phi_ra = argA;
- if (argA < 0) {
- arg6 -= argA;
- phi_ra = 0;
+ var_ra = argA;
+ if (var_ra < 0) {
+ arg6 -= var_ra;
+ var_ra = 0;
} else {
- temp_f0 = (f32) argA + ((f32) (arg8 - arg6) * arg4);
+ temp_f0 = (f32) var_ra + ((f32) (arg8 - arg6) * arg4);
if (temp_f0 > 320.0f) {
arg8 = (s32) ((f32) arg8 - (temp_f0 - 320.0f));
}
}
- phi_v0_4 = arg7;
- phi_a1 = argB;
- phi_ra_2 = phi_ra;
- if (argB < 0) {
- phi_v0_4 = arg7 - argB;
- phi_a1 = 0;
+ var_a1 = argB;
+ var_v0_4 = arg7;
+ if (var_a1 < 0) {
+ var_v0_4 = arg7 - var_a1;
+ var_a1 = 0;
} else {
- temp_f0_2 = (f32) argB + ((f32) (arg9 - arg7) * arg5);
+ temp_f0_2 = (f32) var_a1 + ((f32) (arg9 - var_v0_4) * arg5);
if (temp_f0_2 > 240.0f) {
arg9 = (s32) ((f32) arg9 - (temp_f0_2 - 240.0f));
}
}
- phi_a2 = (u32) arg9;
- phi_v1 = (u32) arg8;
if (arg8 < arg6) {
- } else if (arg9 < phi_v0_4) {
+ } else if (arg9 < var_v0_4) {
} else {
- sp8C = phi_ra;
+ sp8C = var_ra;
+ var_s3 = var_v0_4;
arg2 = (s32) ((f32) arg2 / arg4);
arg3 = (s32) ((f32) arg3 / arg5);
- phi_s3 = phi_v0_4;
- if ((u32) phi_v0_4 < (u32) arg9) {
- argB = phi_a1;
+ if ((u32) var_v0_4 < (u32) arg9) {
+ argB = var_a1;
loop_24:
- temp_t8 = phi_a3_2 + phi_s3;
+ temp_t8 = var_a3 + var_s3;
sp34 = temp_t8;
- phi_a0 = phi_a0_3;
- phi_a2_2 = phi_a2;
- phi_a0_2 = phi_a0_3;
- phi_a0_4 = phi_a0_3;
- if (phi_a2 < temp_t8) {
- temp_fp = phi_a2 - phi_s3;
- phi_fp = temp_fp;
- if (temp_fp != 0) {
- phi_f12 = (f32) argB;
- phi_f18 = (f32) phi_a3_2 * arg5;
+ if ((u32) arg9 < temp_t8) {
+ var_fp = arg9 - var_s3;
+ if (var_fp != 0) {
+ var_a1_2 = arg6;
+ var_f12 = (f32) argB;
+ var_f18 = (f32) var_a3 * arg5;
goto block_28;
}
} else {
- phi_fp = phi_a3_2;
- phi_f12 = (f32) argB;
- phi_f18 = (f32) phi_a3_2 * arg5;
+ var_fp = var_a3;
+ var_a1_2 = arg6;
+ var_f12 = (f32) argB;
+ var_f18 = (f32) var_a3 * arg5;
block_28:
- phi_a1_2 = (u32) arg6;
- if ((u32) arg6 < phi_v1) {
- sp74 = phi_a3_2;
- sp78 = phi_t0_3;
+ if ((u32) arg6 < (u32) arg8) {
+ sp74 = var_a3;
+ sp78 = var_t0;
loop_30:
- temp_s4 = sp78 + phi_a1_2;
- phi_a2_2 = (u32) arg9;
- phi_v1 = (u32) arg8;
- phi_a0_4 = phi_a0;
+ temp_s4 = sp78 + var_a1_2;
if ((u32) arg8 < temp_s4) {
- temp_s2 = arg8 - phi_a1_2;
- phi_s2 = temp_s2;
- if (temp_s2 == 0) {
- phi_a3_2 = sp74;
- phi_t0_3 = sp78;
+ var_s2 = arg8 - var_a1_2;
+ if (var_s2 == 0) {
+ var_t0 = sp78;
+ var_a3 = sp74;
} else {
- temp_v0_2 = (arg1 & 7) << 0x15;
+ temp_v0 = (arg1 & 7) << 0x15;
+ var_t1 = temp_v0 | 0xFD000000 | 0x100000 | ((argD - 1) & 0xFFF);
temp_v1 = (sp6C & 0xF) << 0xE;
temp_a2 = (sp70 & 0xF) * 0x10;
- temp_f10 = (f32) phi_fp;
- phi_t1 = temp_v0_2 | 0xFD000000 | 0x100000 | ((argD - 1) & 0xFFF);
- phi_t2 = temp_v0_2 | 0xF5000000 | 0x100000;
- phi_t4 = temp_v1 | 0x07000000 | temp_a2;
- phi_a3_3 = (phi_s3 * 4) & 0xFFF;
- phi_t0_4 = ((phi_s3 + phi_fp) * 4) & 0xFFF;
- phi_s0 = temp_v1 | temp_a2;
- phi_s5 = (argB * 4) & 0xFFF;
- phi_s6 = (phi_s3 << 5) & 0xFFFF;
- phi_s7 = (arg2 << 0x10) | (arg3 & 0xFFFF);
- phi_f0 = (f32) phi_ra_2;
- phi_f16 = (f32) sp78 * arg4;
- phi_f10 = temp_f10;
- if (phi_fp < 0) {
- phi_f10 = temp_f10 + 4294967296.0f;
+ var_t4 = temp_v1 | 0x07000000 | temp_a2;
+ var_s5 = (argB * 4) & 0xFFF;
+ var_a3_2 = (var_s3 * 4) & 0xFFF;
+ var_s6 = (var_s3 << 5) & 0xFFFF;
+ var_t0_2 = ((var_s3 + var_fp) * 4) & 0xFFF;
+ var_t2 = temp_v0 | 0xF5000000 | 0x100000;
+ var_f0 = (f32) var_ra;
+ var_f16 = (f32) sp78 * arg4;
+ var_s7 = (arg2 << 0x10) | (arg3 & 0xFFFF);
+ var_s0 = temp_v1 | temp_a2;
+ var_f10 = (f32) var_fp;
+ if (var_fp < 0) {
+ var_f10 += 4294967296.0f;
}
- phi_s1 = ((argB + (u32) (phi_f10 * arg5)) * 4) & 0xFFF;
+ var_s1 = ((argB + (u32) (var_f10 * arg5)) * 4) & 0xFFF;
goto block_39;
}
} else {
- temp_v0_3 = (arg1 & 7) << 0x15;
+ var_s2 = sp78;
+ temp_v0_2 = (arg1 & 7) << 0x15;
+ var_f0 = (f32) var_ra;
+ var_t1 = temp_v0_2 | 0xFD000000 | 0x100000 | ((argD - 1) & 0xFFF);
+ var_f16 = (f32) var_s2 * arg4;
temp_v1_2 = (sp6C & 0xF) << 0xE;
temp_a2_2 = (sp70 & 0xF) * 0x10;
- temp_f8 = (f32) phi_fp;
- phi_t1 = temp_v0_3 | 0xFD000000 | 0x100000 | ((argD - 1) & 0xFFF);
- phi_t2 = temp_v0_3 | 0xF5000000 | 0x100000;
- phi_s2 = (u32) sp78;
- phi_t4 = temp_v1_2 | 0x07000000 | temp_a2_2;
- phi_a3_3 = (phi_s3 * 4) & 0xFFF;
- phi_t0_4 = ((phi_s3 + phi_fp) * 4) & 0xFFF;
- phi_s0 = temp_v1_2 | temp_a2_2;
- phi_s5 = (argB * 4) & 0xFFF;
- phi_s6 = (phi_s3 << 5) & 0xFFFF;
- phi_s7 = (arg2 << 0x10) | (arg3 & 0xFFFF);
- phi_f0 = (f32) phi_ra_2;
- phi_f16 = (f32) sp78 * arg4;
- phi_f8 = temp_f8;
- if (phi_fp < 0) {
- phi_f8 = temp_f8 + 4294967296.0f;
+ var_t4 = temp_v1_2 | 0x07000000 | temp_a2_2;
+ var_f8 = (f32) var_fp;
+ var_t0_2 = ((var_s3 + var_fp) * 4) & 0xFFF;
+ var_a3_2 = (var_s3 * 4) & 0xFFF;
+ var_t2 = temp_v0_2 | 0xF5000000 | 0x100000;
+ var_s5 = (argB * 4) & 0xFFF;
+ var_s6 = (var_s3 << 5) & 0xFFFF;
+ var_s0 = temp_v1_2 | temp_a2_2;
+ var_s7 = (arg2 << 0x10) | (arg3 & 0xFFFF);
+ if (var_fp < 0) {
+ var_f8 += 4294967296.0f;
}
- phi_s1 = ((argB + (u32) (phi_f8 * arg5)) * 4) & 0xFFF;
+ var_s1 = ((argB + (u32) (var_f8 * arg5)) * 4) & 0xFFF;
block_39:
- phi_a0->words.w0 = phi_t1;
- temp_a2_3 = phi_a1_2 + phi_s2;
- phi_a0->words.w1 = argC;
- temp_a0 = phi_a0 + 8;
- temp_t3 = phi_t2 | ((((u32) (((temp_a2_3 - phi_a1_2) * 2) + 9) >> 3) & 0x1FF) << 9);
+ var_a0->words.w0 = var_t1;
+ temp_a2_3 = var_a1_2 + var_s2;
+ var_a0->words.w1 = (u32) argC;
+ temp_a0 = var_a0 + 8;
+ temp_t3 = var_t2 | ((((u32) (((temp_a2_3 - var_a1_2) * 2) + 9) >> 3) & 0x1FF) << 9);
temp_a0_2 = temp_a0 + 8;
- temp_t1 = ((phi_a1_2 * 4) & 0xFFF) << 0xC;
- temp_a0->unk0 = temp_t3;
- temp_a0->unk4 = phi_t4;
- temp_a0_2->unk0 = 0xE6000000;
+ temp_t1 = ((var_a1_2 * 4) & 0xFFF) << 0xC;
+ temp_a0->words.w0 = temp_t3;
+ temp_a0->words.w1 = var_t4;
+ temp_a0_2->words.w0 = 0xE6000000;
temp_a0_3 = temp_a0_2 + 8;
temp_t2 = ((temp_a2_3 * 4) & 0xFFF) << 0xC;
- temp_a0_2->unk4 = 0;
- temp_a0_3->unk0 = (s32) (temp_t1 | 0xF4000000 | phi_a3_3);
+ temp_a0_2->words.w1 = 0;
+ temp_a0_3->words.w0 = temp_t1 | 0xF4000000 | var_a3_2;
temp_a0_4 = temp_a0_3 + 8;
- temp_a0_3->unk4 = (s32) (temp_t2 | 0x07000000 | phi_t0_4);
+ temp_a0_3->words.w1 = temp_t2 | 0x07000000 | var_t0_2;
temp_a0_5 = temp_a0_4 + 8;
temp_a0_6 = temp_a0_5 + 8;
- temp_a0_4->unk0 = 0xE7000000;
- temp_a0_4->unk4 = 0;
+ temp_a0_4->words.w0 = 0xE7000000;
+ temp_a0_4->words.w1 = 0;
temp_a0_7 = temp_a0_6 + 8;
- temp_a0_5->unk4 = phi_s0;
- temp_a0_5->unk0 = temp_t3;
- temp_a0_6->unk4 = (s32) (temp_t2 | phi_t0_4);
- temp_a0_6->unk0 = (s32) (temp_t1 | 0xF2000000 | phi_a3_3);
+ temp_a0_5->words.w1 = var_s0;
+ temp_a0_5->words.w0 = temp_t3;
+ temp_a0_6->words.w1 = temp_t2 | var_t0_2;
+ temp_a0_6->words.w0 = temp_t1 | 0xF2000000 | var_a3_2;
temp_a0_8 = temp_a0_7 + 8;
temp_a0_9 = temp_a0_8 + 8;
- temp_a0_7->unk0 = (s32) (((((phi_ra_2 + (u32) ((f32) phi_s2 * arg4)) * 4) & 0xFFF) << 0xC) | 0xE4000000 | phi_s1);
- temp_a0_7->unk4 = (s32) ((((phi_ra_2 * 4) & 0xFFF) << 0xC) | phi_s5);
- temp_a0_8->unk0 = 0xB3000000;
- temp_a0_8->unk4 = (s32) ((phi_a1_2 << 0x15) | phi_s6);
- temp_a0_9->unk0 = 0xB2000000;
- temp_a0_9->unk4 = phi_s7;
- temp_a0_10 = temp_a0_9 + 8;
- phi_a1_2 = temp_s4;
- phi_a0 = temp_a0_10;
- phi_ra_2 = (s32) (phi_f0 + phi_f16);
- phi_a0_4 = temp_a0_10;
+ temp_a0_7->words.w0 = ((((var_ra + (u32) ((f32) var_s2 * arg4)) * 4) & 0xFFF) << 0xC) | 0xE4000000 | var_s1;
+ temp_a0_7->words.w1 = (((var_ra * 4) & 0xFFF) << 0xC) | var_s5;
+ temp_a0_8->words.w0 = 0xB3000000;
+ temp_a0_8->words.w1 = (var_a1_2 << 0x15) | var_s6;
+ temp_a0_9->words.w0 = 0xB2000000;
+ temp_a0_9->words.w1 = var_s7;
+ var_ra = (s32) (var_f0 + var_f16);
+ var_a1_2 = (s32) temp_s4;
+ var_a0 = temp_a0_9 + 8;
if (temp_s4 >= (u32) arg8) {
- phi_a2_2 = (u32) arg9;
- phi_a3_2 = sp74;
- phi_v1 = (u32) arg8;
- phi_t0_3 = sp78;
+ var_t0 = sp78;
+ var_a3 = sp74;
} else {
goto loop_30;
}
}
}
- argB = (s32) (phi_f12 + phi_f18);
- phi_s3 = (s32) sp34;
- phi_a2 = phi_a2_2;
- phi_a0_2 = phi_a0_4;
- phi_a0_3 = phi_a0_4;
- phi_ra_2 = sp8C;
- if (sp34 < phi_a2_2) {
+ var_s3 = (s32) sp34;
+ var_ra = sp8C;
+ argB = (s32) (var_f12 + var_f18);
+ if ((u32) var_s3 < (u32) arg9) {
goto loop_24;
}
}
}
}
- return phi_a0_2;
+ return var_a0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800963F0.s")
#endif
#ifdef MIPS_TO_C
-//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
extern ? D_0B002A00;
-Gfx *func_80096CD8(Gfx *arg0, s32 arg1, s32 arg2, u32 arg3, u32 arg4) {
+Gfx *func_80096CD8(Gfx *displayListHead, s32 arg1, s32 arg2, u32 arg3, u32 arg4) {
s32 spD4;
s32 spD0; /* compiler-managed */
s32 spCC;
@@ -2620,7 +2547,7 @@ Gfx *func_80096CD8(Gfx *arg0, s32 arg1, s32 arg2, u32 arg3, u32 arg4) {
u32 var_s6;
u32 var_s7;
- var_s0 = arg0;
+ var_s0 = displayListHead;
var_s2 = arg2;
var_s4 = arg1;
var_ra = 1;
@@ -3146,153 +3073,166 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097A14.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-Gfx *func_80097AE4(Gfx *arg0, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) {
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+Gfx *func_80097AE4(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) {
s32 sp34;
- Gfx *temp_a0_20;
+ Gfx *temp_a0;
+ Gfx *temp_a0_10;
+ Gfx *temp_a0_11;
+ Gfx *temp_a0_12;
+ Gfx *temp_a0_13;
+ Gfx *temp_a0_14;
+ Gfx *temp_a0_15;
+ Gfx *temp_a0_16;
+ Gfx *temp_a0_17;
+ Gfx *temp_a0_18;
+ Gfx *temp_a0_19;
+ Gfx *temp_a0_2;
+ Gfx *temp_a0_3;
+ Gfx *temp_a0_4;
+ Gfx *temp_a0_5;
+ Gfx *temp_a0_6;
+ Gfx *temp_a0_7;
+ Gfx *temp_a0_8;
+ Gfx *temp_a0_9;
+ Gfx *var_a0;
s32 temp_s1;
s32 temp_t1;
s32 temp_t6;
- s32 temp_t7;
s32 temp_t7_2;
s32 temp_t8;
- s32 temp_t8_2;
s32 temp_t8_3;
s32 temp_t9;
s32 temp_v1;
+ s32 var_a2;
+ s32 var_s0;
+ s32 var_s2;
u32 temp_s4;
- void *temp_a0;
- void *temp_a0_10;
- void *temp_a0_11;
- void *temp_a0_12;
- void *temp_a0_13;
- void *temp_a0_14;
- void *temp_a0_15;
- void *temp_a0_16;
- void *temp_a0_17;
- void *temp_a0_18;
- void *temp_a0_19;
- void *temp_a0_2;
- void *temp_a0_3;
- void *temp_a0_4;
- void *temp_a0_5;
- void *temp_a0_6;
- void *temp_a0_7;
- void *temp_a0_8;
- void *temp_a0_9;
- Gfx *phi_a0;
- s32 phi_a2;
- s32 phi_s0;
- s32 phi_s2;
- Gfx *phi_a0_2;
+ u32 temp_t7;
+ u32 temp_t8_2;
- phi_a0 = arg0;
- phi_s0 = arg2;
- phi_s2 = arg3;
- phi_a0_2 = arg0;
+ var_a0 = displayListHead;
+ var_s0 = arg2;
+ var_s2 = arg3;
if (arg5 >= 0x20) {
} else {
temp_t8 = (arg1 & 7) << 0x15;
temp_s4 = temp_t8 | 0xFD000000 | 0x100000 | 0x3F;
temp_t8_2 = temp_t8 | 0xF5000000 | 0x100000 | 0x1200;
- sp34 = arg2;
+ sp34 = var_s0;
+ var_a2 = 0;
temp_t7 = (((0x8000 / (s32) (0x20 - arg5)) & 0xFFFF) << 0x10) | 0x400;
- phi_a2 = 0;
do {
- temp_a0 = phi_a0 + 8;
- phi_a0->words.w0 = temp_s4;
- phi_a0->words.w1 = arg4;
+ temp_a0 = var_a0 + 8;
+ var_a0->words.w0 = temp_s4;
+ var_a0->words.w1 = (u32) arg4;
temp_a0_2 = temp_a0 + 8;
- temp_t6 = (phi_a2 * 4) & 0xFFF;
+ temp_t6 = (var_a2 * 4) & 0xFFF;
temp_a0_3 = temp_a0_2 + 8;
- temp_a0->unk4 = 0x07014050;
- temp_a0->unk0 = temp_t8_2;
- temp_s1 = phi_a2 + 0x20;
+ temp_a0->words.w1 = 0x07014050;
+ temp_a0->words.w0 = temp_t8_2;
+ temp_s1 = var_a2 + 0x20;
temp_t9 = (temp_s1 * 4) & 0xFFF;
- temp_a0_2->unk4 = 0;
- temp_a0_2->unk0 = 0xE6000000;
+ temp_a0_2->words.w1 = 0;
+ temp_a0_2->words.w0 = 0xE6000000;
temp_a0_4 = temp_a0_3 + 8;
- temp_a0_3->unk4 = (s32) (temp_t9 | 0x07080000);
- temp_a0_3->unk0 = (s32) (temp_t6 | 0xF4000000);
+ temp_a0_3->words.w1 = temp_t9 | 0x07080000;
+ temp_a0_3->words.w0 = temp_t6 | 0xF4000000;
temp_a0_5 = temp_a0_4 + 8;
- temp_a0_4->unk4 = 0;
- temp_a0_4->unk0 = 0xE7000000;
- temp_a0_5->unk4 = 0x14050;
- temp_a0_5->unk0 = temp_t8_2;
+ temp_a0_4->words.w1 = 0;
+ temp_a0_4->words.w0 = 0xE7000000;
+ temp_a0_5->words.w1 = 0x00014050;
+ temp_a0_5->words.w0 = temp_t8_2;
temp_a0_6 = temp_a0_5 + 8;
- temp_v1 = phi_s0 + 0x20;
- temp_t1 = phi_s2 + 0x20;
- temp_a0_6->unk0 = (s32) (temp_t6 | 0xF2000000);
- temp_a0_6->unk4 = (s32) (temp_t9 | 0x80000);
+ temp_v1 = var_s0 + 0x20;
+ temp_t1 = var_s2 + 0x20;
+ temp_a0_6->words.w0 = temp_t6 | 0xF2000000;
+ temp_a0_6->words.w1 = temp_t9 | 0x80000;
temp_t7_2 = (temp_t1 * 4) & 0xFFF;
temp_a0_7 = temp_a0_6 + 8;
- temp_t8_3 = (phi_s2 * 4) & 0xFFF;
- temp_a0_7->unk0 = (s32) ((((temp_v1 * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t7_2);
+ temp_t8_3 = (var_s2 * 4) & 0xFFF;
+ temp_a0_7->words.w0 = (((temp_v1 * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t7_2;
temp_a0_8 = temp_a0_7 + 8;
- temp_a0_7->unk4 = (s32) (((((phi_s0 + arg5) * 4) & 0xFFF) << 0xC) | temp_t8_3);
+ temp_a0_7->words.w1 = ((((var_s0 + arg5) * 4) & 0xFFF) << 0xC) | temp_t8_3;
temp_a0_9 = temp_a0_8 + 8;
- temp_a0_8->unk0 = 0xB3000000;
+ temp_a0_8->words.w0 = 0xB3000000;
temp_a0_10 = temp_a0_9 + 8;
- temp_a0_8->unk4 = 0;
- temp_a0_9->unk0 = 0xB2000000;
- temp_a0_9->unk4 = temp_t7;
+ temp_a0_8->words.w1 = 0;
+ temp_a0_9->words.w0 = 0xB2000000;
+ temp_a0_9->words.w1 = temp_t7;
temp_a0_11 = temp_a0_10 + 8;
- temp_a0_10->unk4 = arg4;
- temp_a0_10->unk0 = temp_s4;
+ temp_a0_10->words.w1 = (u32) arg4;
+ temp_a0_10->words.w0 = temp_s4;
temp_a0_12 = temp_a0_11 + 8;
- temp_a0_11->unk4 = 0x07014050;
- temp_a0_11->unk0 = temp_t8_2;
+ temp_a0_11->words.w1 = 0x07014050;
+ temp_a0_11->words.w0 = temp_t8_2;
temp_a0_13 = temp_a0_12 + 8;
- temp_a0_12->unk4 = 0;
- temp_a0_12->unk0 = 0xE6000000;
+ temp_a0_12->words.w1 = 0;
+ temp_a0_12->words.w0 = 0xE6000000;
temp_a0_14 = temp_a0_13 + 8;
- temp_a0_13->unk4 = (s32) (temp_t9 | 0x07100000);
- temp_a0_13->unk0 = (s32) (temp_t6 | 0xF4080000);
+ temp_a0_13->words.w1 = temp_t9 | 0x07100000;
+ temp_a0_13->words.w0 = temp_t6 | 0xF4080000;
temp_a0_15 = temp_a0_14 + 8;
- temp_a0_14->unk4 = 0;
- temp_a0_14->unk0 = 0xE7000000;
- temp_a0_15->unk4 = 0x14050;
+ temp_a0_14->words.w1 = 0;
+ temp_a0_14->words.w0 = 0xE7000000;
+ temp_a0_15->words.w1 = 0x00014050;
temp_a0_16 = temp_a0_15 + 8;
- temp_a0_15->unk0 = temp_t8_2;
- temp_a0_16->unk0 = (s32) (temp_t6 | 0xF2080000);
- temp_a0_16->unk4 = (s32) (temp_t9 | 0x100000);
+ temp_a0_15->words.w0 = temp_t8_2;
+ temp_a0_16->words.w0 = temp_t6 | 0xF2080000;
+ temp_a0_16->words.w1 = temp_t9 | 0x100000;
temp_a0_17 = temp_a0_16 + 8;
- temp_a0_17->unk0 = (s32) ((((((temp_v1 - arg5) + 0x20) * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t7_2);
+ temp_a0_17->words.w0 = (((((temp_v1 - arg5) + 0x20) * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t7_2;
temp_a0_18 = temp_a0_17 + 8;
- temp_a0_17->unk4 = (s32) ((((temp_v1 * 4) & 0xFFF) << 0xC) | temp_t8_3);
+ temp_a0_17->words.w1 = (((temp_v1 * 4) & 0xFFF) << 0xC) | temp_t8_3;
temp_a0_19 = temp_a0_18 + 8;
- temp_a0_18->unk0 = 0xB3000000;
- temp_a0_18->unk4 = 0;
- temp_a0_19->unk0 = 0xB2000000;
- temp_a0_19->unk4 = temp_t7;
- temp_a0_20 = temp_a0_19 + 8;
- phi_a0 = temp_a0_20;
- phi_a2 = temp_s1;
- phi_s0 = sp34;
- phi_s2 = temp_t1;
- phi_a0_2 = temp_a0_20;
+ temp_a0_18->words.w0 = 0xB3000000;
+ temp_a0_18->words.w1 = 0;
+ temp_a0_19->words.w0 = 0xB2000000;
+ temp_a0_19->words.w1 = temp_t7;
+ var_a2 = temp_s1;
+ var_a0 = temp_a0_19 + 8;
+ var_s0 = sp34;
+ var_s2 = temp_t1;
} while (temp_s1 != 0x40);
}
- return phi_a0_2;
+ return var_a0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097AE4.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-Gfx *func_80097E58(Gfx *arg0, s8 arg1, s32 arg2, u32 arg3, u32 arg5, s32 arg6, s32 arg7, s32 arg8, u32 arg9, s32 argB, s32 argB) {
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+Gfx *func_80097E58(Gfx *displayListHead, s8 arg1, s32 arg2, u32 arg3, u32 arg5, s32 arg6, s32 arg7, s32 arg8, u32 arg9, s32 argB, s32 argB, s32 argB) {
s32 spEC;
s32 spDC;
s32 sp80;
s32 sp60;
- s32 sp5C;
+ u32 sp5C;
s32 sp40;
- s32 sp3C;
+ u32 sp3C;
s32 sp30;
- Gfx *temp_a0_20;
- s32 temp_a1;
+ Gfx *temp_a0;
+ Gfx *temp_a0_10;
+ Gfx *temp_a0_11;
+ Gfx *temp_a0_12;
+ Gfx *temp_a0_13;
+ Gfx *temp_a0_14;
+ Gfx *temp_a0_15;
+ Gfx *temp_a0_16;
+ Gfx *temp_a0_17;
+ Gfx *temp_a0_18;
+ Gfx *temp_a0_19;
+ Gfx *temp_a0_2;
+ Gfx *temp_a0_3;
+ Gfx *temp_a0_4;
+ Gfx *temp_a0_5;
+ Gfx *temp_a0_6;
+ Gfx *temp_a0_7;
+ Gfx *temp_a0_8;
+ Gfx *temp_a0_9;
+ Gfx *var_a0;
s32 temp_a3;
s32 temp_s0;
s32 temp_t1;
@@ -3310,335 +3250,291 @@ Gfx *func_80097E58(Gfx *arg0, s8 arg1, s32 arg2, u32 arg3, u32 arg5, s32 arg6, s
s32 temp_v0;
s32 temp_v1;
s32 temp_v1_2;
+ s32 var_s0;
+ s32 var_s1;
+ s32 var_s2;
+ s32 var_s4;
+ s32 var_s5;
+ s32 var_s6;
+ s32 var_s7;
+ s32 var_t3;
+ s32 var_v0;
+ u32 temp_a1;
u32 temp_t0;
- u32 temp_t4;
- void *temp_a0;
- void *temp_a0_10;
- void *temp_a0_11;
- void *temp_a0_12;
- void *temp_a0_13;
- void *temp_a0_14;
- void *temp_a0_15;
- void *temp_a0_16;
- void *temp_a0_17;
- void *temp_a0_18;
- void *temp_a0_19;
- void *temp_a0_2;
- void *temp_a0_3;
- void *temp_a0_4;
- void *temp_a0_5;
- void *temp_a0_6;
- void *temp_a0_7;
- void *temp_a0_8;
- void *temp_a0_9;
- u32 phi_t4;
- u32 phi_s3;
- Gfx *phi_a0;
- s32 phi_t2;
- s32 phi_s0;
- s32 phi_s2;
- s32 phi_v0;
- s32 phi_s4;
- s32 phi_s1;
- s32 phi_ra;
- s32 phi_s7;
- s32 phi_fp;
- s32 phi_s6;
- s32 phi_t3;
- s32 phi_s5;
- Gfx *phi_a0_2;
+ u32 var_fp;
+ u32 var_ra;
+ u32 var_s3;
+ u32 var_t2;
+ u32 var_t4;
- phi_a0 = arg0;
- phi_a0_2 = arg0;
+ var_a0 = displayListHead;
if (argB >= 0x20) {
} else {
+ var_s4 = arg7;
temp_t0 = (u32) argB >> 1;
temp_t7 = argB - temp_t0;
sp80 = temp_t7;
spDC = temp_t7;
- spEC = arg7;
- phi_t4 = arg3;
- phi_s4 = arg7;
+ var_t4 = arg3;
+ spEC = var_s4;
if (arg3 < (u32) arg6) {
loop_3:
- phi_a0_2 = phi_a0;
- if ((u32) arg6 < (u32) (phi_t4 + 0x20)) {
- temp_v0 = arg6 - phi_t4;
- phi_s2 = temp_v0;
+ if ((u32) arg6 < (u32) (var_t4 + 0x20)) {
+ temp_v0 = arg6 - var_t4;
+ var_s2 = temp_v0;
if (temp_v0 != 0) {
temp_t9 = (arg1 & 7) << 0x15;
temp_v1 = 0x20 - argB;
sp30 = argB;
+ var_s3 = temp_t9 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
temp_t6 = temp_t9 | 0xF5000000 | 0x100000;
+ var_s5 = (s32) (spDC * temp_v1) / 32;
sp60 = temp_t0 << 0x15;
temp_t6_2 = ((temp_t0 * 4) & 0xFFF) << 0xC;
sp5C = (((s32) ((sp80 << 5) << 0xA) / (s32) (sp80 * temp_v1)) << 0x10) | 0x400;
+ var_s6 = temp_t6_2 | 0xF2000000;
temp_t7_2 = ((argB * 4) & 0xFFF) << 0xC;
- sp40 = temp_t6_2 | 0xF4000000;
+ var_v0 = temp_t6_2;
+ var_s7 = temp_t7_2 | 0x07000000;
+ var_t3 = temp_t7_2;
+ var_fp = temp_t6 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
+ var_ra = temp_t6 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
+ sp40 = var_v0 | 0xF4000000;
sp3C = (((s32) ((temp_t0 << 5) << 0xA) / (s32) (temp_t0 * temp_v1)) << 0x10) | 0x400;
- phi_s3 = temp_t9 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
- phi_t2 = temp_t6 | ((((u32) ((temp_t0 * 2) + 9) >> 3) & 0x1FF) << 9);
- phi_s0 = temp_t6_2 | 0x07000000;
- phi_v0 = temp_t6_2;
- phi_s1 = (s32) (temp_t0 * argB) / 32;
- phi_ra = temp_t6 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
- phi_s7 = temp_t7_2 | 0x07000000;
- phi_fp = temp_t6 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
- phi_s6 = temp_t6_2 | 0xF2000000;
- phi_t3 = temp_t7_2;
- phi_s5 = (s32) (spDC * temp_v1) / 32;
+ var_s1 = (s32) (temp_t0 * argB) / 32;
+ var_s0 = var_v0 | 0x07000000;
+ var_t2 = temp_t6 | ((((u32) ((temp_t0 * 2) + 9) >> 3) & 0x1FF) << 9);
goto block_7;
}
} else {
temp_v1_2 = 0x20 - argB;
temp_t8 = (arg1 & 7) << 0x15;
sp30 = argB;
+ var_s3 = temp_t8 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
temp_t7_3 = temp_t8 | 0xF5000000 | 0x100000;
+ var_s2 = 0x20;
+ var_s5 = (s32) (spDC * temp_v1_2) / 32;
sp60 = temp_t0 << 0x15;
temp_t7_4 = ((temp_t0 * 4) & 0xFFF) << 0xC;
sp5C = (((s32) ((sp80 << 5) << 0xA) / (s32) (sp80 * temp_v1_2)) << 0x10) | 0x400;
+ var_s6 = temp_t7_4 | 0xF2000000;
temp_t6_3 = ((argB * 4) & 0xFFF) << 0xC;
- sp40 = temp_t7_4 | 0xF4000000;
+ var_v0 = temp_t7_4;
+ var_s7 = temp_t6_3 | 0x07000000;
+ var_t3 = temp_t6_3;
+ var_fp = temp_t7_3 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
+ var_ra = temp_t7_3 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
+ sp40 = var_v0 | 0xF4000000;
sp3C = (((s32) ((temp_t0 << 5) << 0xA) / (s32) (temp_t0 * temp_v1_2)) << 0x10) | 0x400;
- phi_s3 = temp_t8 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF);
- phi_t2 = temp_t7_3 | ((((u32) ((temp_t0 * 2) + 9) >> 3) & 0x1FF) << 9);
- phi_s0 = temp_t7_4 | 0x07000000;
- phi_s2 = 0x20;
- phi_v0 = temp_t7_4;
- phi_s1 = (s32) (temp_t0 * argB) / 32;
- phi_ra = temp_t7_3 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
- phi_s7 = temp_t6_3 | 0x07000000;
- phi_fp = temp_t7_3 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9);
- phi_s6 = temp_t7_4 | 0xF2000000;
- phi_t3 = temp_t6_3;
- phi_s5 = (s32) (spDC * temp_v1_2) / 32;
+ var_s1 = (s32) (temp_t0 * argB) / 32;
+ var_s0 = var_v0 | 0x07000000;
+ var_t2 = temp_t7_3 | ((((u32) ((temp_t0 * 2) + 9) >> 3) & 0x1FF) << 9);
block_7:
- phi_a0->words.w0 = phi_s3;
- temp_a0 = phi_a0 + 8;
- phi_a0->words.w1 = arg9;
- temp_a0->unk4 = 0x07014050;
+ var_a0->words.w0 = var_s3;
+ temp_a0 = var_a0 + 8;
+ var_a0->words.w1 = arg9;
+ temp_a0->words.w1 = 0x07014050;
temp_a0_2 = temp_a0 + 8;
- temp_a0->unk0 = phi_t2;
- temp_t9_2 = (phi_t4 * 4) & 0xFFF;
+ temp_a0->words.w0 = var_t2;
+ temp_t9_2 = (var_t4 * 4) & 0xFFF;
temp_a0_3 = temp_a0_2 + 8;
- temp_a0_2->unk0 = 0xE6000000;
- temp_a3 = ((phi_t4 + phi_s2) * 4) & 0xFFF;
- temp_a0_2->unk4 = 0;
- temp_a0_3->unk0 = (s32) (temp_t9_2 | 0xF4000000);
+ temp_a0_2->words.w0 = 0xE6000000;
+ temp_a3 = ((var_t4 + var_s2) * 4) & 0xFFF;
+ temp_a0_2->words.w1 = 0;
+ temp_a0_3->words.w0 = temp_t9_2 | 0xF4000000;
temp_a0_4 = temp_a0_3 + 8;
- temp_a0_3->unk4 = (s32) (phi_s0 | temp_a3);
+ temp_a0_3->words.w1 = var_s0 | temp_a3;
temp_a0_5 = temp_a0_4 + 8;
- temp_a0_4->unk0 = 0xE7000000;
- temp_a0_4->unk4 = 0;
+ temp_a0_4->words.w0 = 0xE7000000;
+ temp_a0_4->words.w1 = 0;
temp_a0_6 = temp_a0_5 + 8;
- temp_a0_5->unk4 = 0x14050;
- temp_a0_5->unk0 = phi_t2;
- temp_a0_6->unk4 = (s32) (phi_v0 | temp_a3);
- temp_a0_6->unk0 = (s32) (temp_t9_2 | 0xF2000000);
- temp_s0 = phi_s4 + temp_t0;
- temp_t1 = ((arg8 + phi_s2) * 4) & 0xFFF;
+ temp_a0_5->words.w1 = 0x00014050;
+ temp_a0_5->words.w0 = var_t2;
+ temp_a0_6->words.w1 = var_v0 | temp_a3;
+ temp_a0_6->words.w0 = temp_t9_2 | 0xF2000000;
+ temp_s0 = var_s4 + temp_t0;
+ temp_t1 = ((arg8 + var_s2) * 4) & 0xFFF;
temp_a0_7 = temp_a0_6 + 8;
- temp_a0_7->unk0 = (s32) ((((temp_s0 * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t1);
+ temp_a0_7->words.w0 = (((temp_s0 * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t1;
temp_t2 = (arg8 * 4) & 0xFFF;
- temp_a0_7->unk4 = (s32) (((((phi_s1 + phi_s4) * 4) & 0xFFF) << 0xC) | temp_t2);
+ temp_a0_7->words.w1 = ((((var_s1 + var_s4) * 4) & 0xFFF) << 0xC) | temp_t2;
temp_a0_8 = temp_a0_7 + 8;
- temp_a1 = (phi_t4 << 5) & 0xFFFF;
+ temp_a1 = (var_t4 << 5) & 0xFFFF;
temp_a0_9 = temp_a0_8 + 8;
- temp_a0_8->unk0 = 0xB3000000;
- temp_a0_8->unk4 = temp_a1;
- temp_a0_9->unk0 = 0xB2000000;
+ temp_a0_8->words.w0 = 0xB3000000;
+ temp_a0_8->words.w1 = temp_a1;
+ temp_a0_9->words.w0 = 0xB2000000;
temp_a0_10 = temp_a0_9 + 8;
- temp_a0_9->unk4 = sp3C;
- temp_a0_10->unk0 = phi_s3;
+ temp_a0_9->words.w1 = sp3C;
+ temp_a0_10->words.w0 = var_s3;
temp_a0_11 = temp_a0_10 + 8;
- temp_a0_10->unk4 = arg9;
+ temp_a0_10->words.w1 = arg9;
temp_a0_12 = temp_a0_11 + 8;
- temp_a0_11->unk4 = 0x07014050;
- temp_a0_11->unk0 = phi_ra;
- temp_a0_12->unk0 = 0xE6000000;
- temp_a0_12->unk4 = 0;
+ temp_a0_11->words.w1 = 0x07014050;
+ temp_a0_11->words.w0 = var_ra;
+ temp_a0_12->words.w0 = 0xE6000000;
+ temp_a0_12->words.w1 = 0;
temp_a0_13 = temp_a0_12 + 8;
temp_a0_14 = temp_a0_13 + 8;
- temp_a0_13->unk0 = (s32) (sp40 | temp_t9_2);
- temp_a0_13->unk4 = (s32) (phi_s7 | temp_a3);
+ temp_a0_13->words.w0 = sp40 | temp_t9_2;
+ temp_a0_13->words.w1 = var_s7 | temp_a3;
temp_a0_15 = temp_a0_14 + 8;
- temp_a0_14->unk0 = 0xE7000000;
- temp_a0_14->unk4 = 0;
- temp_a0_15->unk4 = 0x14050;
+ temp_a0_14->words.w0 = 0xE7000000;
+ temp_a0_14->words.w1 = 0;
+ temp_a0_15->words.w1 = 0x00014050;
temp_a0_16 = temp_a0_15 + 8;
- temp_a0_15->unk0 = phi_fp;
- temp_a0_16->unk0 = (s32) (phi_s6 | temp_t9_2);
- temp_a0_16->unk4 = (s32) (phi_t3 | temp_a3);
+ temp_a0_15->words.w0 = var_fp;
+ temp_a0_16->words.w0 = var_s6 | temp_t9_2;
+ temp_a0_16->words.w1 = var_t3 | temp_a3;
temp_a0_17 = temp_a0_16 + 8;
- temp_a0_17->unk0 = (s32) (((((phi_s5 + temp_s0) * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t1);
- temp_a0_17->unk4 = (s32) ((((temp_s0 * 4) & 0xFFF) << 0xC) | temp_t2);
+ temp_a0_17->words.w0 = ((((var_s5 + temp_s0) * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t1;
+ temp_a0_17->words.w1 = (((temp_s0 * 4) & 0xFFF) << 0xC) | temp_t2;
temp_a0_18 = temp_a0_17 + 8;
- temp_a0_18->unk0 = 0xB3000000;
+ temp_a0_18->words.w0 = 0xB3000000;
temp_a0_19 = temp_a0_18 + 8;
- temp_a0_18->unk4 = (s32) (sp60 | temp_a1);
- temp_a0_19->unk0 = 0xB2000000;
- temp_t4 = phi_t4 + 0x20;
- temp_a0_20 = temp_a0_19 + 8;
- temp_a0_19->unk4 = sp5C;
+ temp_a0_18->words.w1 = sp60 | temp_a1;
+ temp_a0_19->words.w0 = 0xB2000000;
+ var_t4 += 0x20;
+ var_a0 = temp_a0_19 + 8;
+ temp_a0_19->words.w1 = sp5C;
+ var_s4 = spEC;
arg8 += 0x20;
- phi_t4 = temp_t4;
- phi_a0 = temp_a0_20;
- phi_s4 = spEC;
- phi_a0_2 = temp_a0_20;
- if (temp_t4 < (u32) arg6) {
+ if (var_t4 < (u32) arg6) {
goto loop_3;
}
}
}
}
- return phi_a0_2;
+ return var_a0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097E58.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-extern u32 D_8018D9B0;
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
extern u32 D_8018E7B8;
extern s32 D_8018E7D0;
-Gfx *func_800987D0(Gfx *arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4, s32 arg5, s32 arg6, s32 arg8, s32 arg8) {
+Gfx *func_800987D0(Gfx *displayListHead, u32 arg1, u32 arg2, u32 arg3, u32 arg4, s32 arg5, s32 arg6, s32 arg8, s32 arg8) {
u32 sp60;
s32 sp5C;
- Gfx *temp_s0_10;
+ Gfx *temp_s0;
+ Gfx *temp_s0_2;
+ Gfx *temp_s0_3;
+ Gfx *temp_s0_4;
+ Gfx *temp_s0_5;
+ Gfx *temp_s0_6;
+ Gfx *temp_s0_7;
+ Gfx *temp_s0_8;
+ Gfx *temp_s0_9;
+ Gfx *var_s0;
f32 temp_f0;
f32 temp_f18;
f32 temp_f24;
f32 temp_f2;
- f32 temp_f6;
- f64 temp_f10;
- s32 temp_a3;
- s32 temp_f4;
- s32 temp_f6_2;
+ f32 temp_f4;
+ f32 temp_f8;
+ f32 var_f6;
+ f64 var_f10;
+ s32 temp_f4_2;
+ s32 temp_f6;
s32 temp_t1;
s32 temp_t4;
s32 temp_t8;
s32 temp_t8_2;
- s32 temp_v0_3;
- s32 temp_v0_4;
+ s32 temp_v0;
+ s32 temp_v0_2;
+ s32 var_t5;
+ u32 temp_a3;
u32 temp_t2;
u32 temp_t9;
- u32 temp_v0;
- u32 temp_v0_2;
- void *temp_s0;
- void *temp_s0_2;
- void *temp_s0_3;
- void *temp_s0_4;
- void *temp_s0_5;
- void *temp_s0_6;
- void *temp_s0_7;
- void *temp_s0_8;
- void *temp_s0_9;
- u32 phi_v0;
- u32 phi_v0_2;
- Gfx *phi_s0;
- u32 phi_a2;
- s32 phi_t5;
- f32 phi_f6;
- f64 phi_f10;
- u32 phi_v0_3;
- Gfx *phi_s0_2;
- Gfx *phi_s0_3;
- Gfx *phi_s0_4;
+ u32 var_a2;
+ u32 var_v0;
+ u32 var_v0_2;
- temp_v0 = D_8018E7B8;
- phi_v0 = temp_v0;
- phi_s0_2 = arg0;
- phi_s0_3 = arg0;
- if (temp_v0 == 0) {
+ var_v0 = D_8018E7B8;
+ var_s0 = displayListHead;
+ if (var_v0 == 0) {
D_8018E7B8 = 1;
- phi_v0 = 1U;
+ var_v0 = 1;
}
- temp_f24 = sins(((u32) ((u32) (D_8018E7D0 * 0x4E20U) / phi_v0) % 20000U) & 0xFFFF);
+ temp_f24 = sins(((u32) ((u32) (D_8018E7D0 * 0x4E20U) / var_v0) % 20000U) & 0xFFFF);
temp_f0 = coss(((u32) ((u32) (D_8018E7D0 * 0x4E20U) / (u32) D_8018E7B8) % 20000U) & 0xFFFF);
temp_t8 = D_8018E7D0;
- temp_f6 = (f32) temp_t8;
- phi_f6 = temp_f6;
- phi_t5 = arg5;
+ var_t5 = arg5;
+ var_f6 = (f32) temp_t8;
if (temp_t8 < 0) {
- phi_f6 = temp_f6 + 4294967296.0f;
+ var_f6 += 4294967296.0f;
}
temp_t9 = D_8018E7B8;
- temp_f10 = (f64) temp_t9;
- phi_f10 = temp_f10;
+ var_f10 = (f64) temp_t9;
if ((s32) temp_t9 < 0) {
- phi_f10 = temp_f10 + 4294967296.0;
+ var_f10 += 4294967296.0;
}
- sp5C = arg5;
- temp_f18 = (f32) ((((f64) phi_f6 * 0.5) / phi_f10) + 1.0);
- phi_v0_2 = arg2;
+ var_v0_2 = arg2;
+ sp5C = var_t5;
+ temp_f18 = (f32) ((((f64) var_f6 * 0.5) / var_f10) + 1.0);
if (arg2 < arg4) {
do {
- phi_s0 = phi_s0_3;
- phi_a2 = arg1;
- phi_v0_3 = phi_v0_2;
- phi_s0_4 = phi_s0_3;
+ var_a2 = arg1;
if (arg1 < arg3) {
- sp60 = phi_v0_2;
- temp_v0_3 = arg6 - 0x78;
- temp_t8_2 = (phi_v0_2 * 4) & 0xFFF;
- temp_t4 = ((phi_v0_2 + 0x20) * 4) & 0xFFF;
+ sp60 = var_v0_2;
+ temp_v0 = arg6 - 0x78;
+ temp_t8_2 = (var_v0_2 * 4) & 0xFFF;
+ temp_t4 = ((var_v0_2 + 0x20) * 4) & 0xFFF;
do {
- phi_s0->words.w0 = ((arg8 - 1) & 0xFFF) | 0xFD100000;
- temp_s0 = phi_s0 + 8;
- phi_s0->words.w1 = D_8018D9B0;
+ var_s0->words.w0 = ((arg8 - 1) & 0xFFF) | 0xFD100000;
+ temp_s0 = var_s0 + 8;
+ var_s0->words.w1 = (u32) D_8018D9B0;
temp_s0_2 = temp_s0 + 8;
temp_a3 = ((((s32) ((arg1 * 0 * 2) + 0x49) >> 3) & 0x1FF) << 9) | 0xF5100000;
- temp_t1 = ((phi_a2 * 4) & 0xFFF) << 0xC;
- temp_t2 = phi_a2 + 0x20;
+ temp_t1 = ((var_a2 * 4) & 0xFFF) << 0xC;
+ temp_t2 = var_a2 + 0x20;
temp_s0_3 = temp_s0_2 + 8;
- temp_s0->unk0 = temp_a3;
- temp_s0->unk4 = 0x07014050;
- temp_v0_4 = ((temp_t2 * 4) & 0xFFF) << 0xC;
- temp_s0_2->unk4 = 0;
- temp_s0_2->unk0 = 0xE6000000;
- temp_s0_3->unk0 = (s32) (temp_t1 | 0xF4000000 | temp_t8_2);
+ temp_s0->words.w0 = temp_a3;
+ temp_s0->words.w1 = 0x07014050;
+ temp_v0_2 = ((temp_t2 * 4) & 0xFFF) << 0xC;
+ temp_s0_2->words.w1 = 0;
+ temp_s0_2->words.w0 = 0xE6000000;
+ temp_s0_3->words.w0 = temp_t1 | 0xF4000000 | temp_t8_2;
temp_s0_4 = temp_s0_3 + 8;
- temp_s0_3->unk4 = (s32) (temp_v0_4 | 0x07000000 | temp_t4);
+ temp_s0_3->words.w1 = temp_v0_2 | 0x07000000 | temp_t4;
temp_s0_5 = temp_s0_4 + 8;
- temp_s0_4->unk4 = 0;
- temp_s0_4->unk0 = 0xE7000000;
- temp_s0_5->unk4 = 0x14050;
- temp_s0_5->unk0 = temp_a3;
+ temp_s0_4->words.w1 = 0;
+ temp_s0_4->words.w0 = 0xE7000000;
+ temp_s0_5->words.w1 = 0x00014050;
+ temp_s0_5->words.w0 = temp_a3;
temp_s0_6 = temp_s0_5 + 8;
- temp_f2 = (f32) (phi_t5 - 0xA0);
- temp_s0_6->unk4 = (s32) (temp_v0_4 | temp_t4);
- temp_s0_6->unk0 = (s32) (temp_t1 | 0xF2000000 | temp_t8_2);
+ temp_f2 = (f32) (var_t5 - 0xA0);
+ temp_s0_6->words.w1 = temp_v0_2 | temp_t4;
+ temp_s0_6->words.w0 = temp_t1 | 0xF2000000 | temp_t8_2;
temp_s0_7 = temp_s0_6 + 8;
temp_s0_8 = temp_s0_7 + 8;
temp_s0_9 = temp_s0_8 + 8;
- temp_s0_10 = temp_s0_9 + 8;
- temp_f6_2 = (s32) ((((temp_f2 * temp_f0) + (temp_f24 * (f32) temp_v0_3)) * temp_f18) + 160.0f);
- temp_f4 = (s32) ((((-temp_f24 * temp_f2) + (temp_f0 * (f32) temp_v0_3)) * temp_f18) + 120.0f);
- temp_s0_7->unk0 = (s32) (((((temp_f6_2 + 0x20) * 4) & 0xFFF) << 0xC) | 0xE4000000 | (((temp_f4 + 0x20) * 4) & 0xFFF));
- temp_s0_7->unk4 = (s32) ((((temp_f6_2 * 4) & 0xFFF) << 0xC) | ((temp_f4 * 4) & 0xFFF));
- temp_s0_8->unk0 = 0xB3000000;
- temp_s0_8->unk4 = 0;
- temp_s0_9->unk0 = 0xB2000000;
- temp_s0_9->unk4 = 0x04000400;
- phi_s0 = temp_s0_10;
- phi_a2 = temp_t2;
- phi_t5 += 0x20;
- phi_s0_4 = temp_s0_10;
+ temp_f8 = ((temp_f2 * temp_f0) + (temp_f24 * (f32) temp_v0)) * temp_f18;
+ var_a2 = temp_t2;
+ var_s0 = temp_s0_9 + 8;
+ temp_f4 = -temp_f24 * temp_f2;
+ var_t5 += 0x20;
+ temp_f6 = (s32) (temp_f8 + 160.0f);
+ temp_f4_2 = (s32) (((temp_f4 + (temp_f0 * (f32) temp_v0)) * temp_f18) + 120.0f);
+ temp_s0_7->words.w0 = ((((temp_f6 + 0x20) * 4) & 0xFFF) << 0xC) | 0xE4000000 | (((temp_f4_2 + 0x20) * 4) & 0xFFF);
+ temp_s0_7->words.w1 = (((temp_f6 * 4) & 0xFFF) << 0xC) | ((temp_f4_2 * 4) & 0xFFF);
+ temp_s0_8->words.w0 = 0xB3000000;
+ temp_s0_8->words.w1 = 0;
+ temp_s0_9->words.w0 = 0xB2000000;
+ temp_s0_9->words.w1 = 0x04000400;
} while (temp_t2 < arg3);
- phi_v0_3 = sp60;
+ var_v0_2 = sp60;
}
- temp_v0_2 = phi_v0_3 + 0x20;
+ var_v0_2 += 0x20;
+ var_t5 = sp5C;
arg6 += 0x20;
- phi_v0_2 = temp_v0_2;
- phi_s0_2 = phi_s0_4;
- phi_s0_3 = phi_s0_4;
- phi_t5 = sp5C;
- } while (temp_v0_2 < arg4);
+ } while (var_v0_2 < arg4);
}
- return phi_s0_2;
+ return var_s0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800987D0.s")
@@ -4377,54 +4273,38 @@ block_5:
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A478.s")
#endif
-#ifdef NON_MATCHING
-void func_80099A94(MkTexture *, s32); /* extern */
-
-// Non-matching due to the argument registers to an addu command being swapped.
void func_8009A594(s32 arg0, s32 arg1, MkAnimation *arg2) {
MkAnimation *temp_v0;
- struct_8018DEE0_entry *temp_s0;
- MkTexture *temp_v0_2;
- s32 thing = arg1;
+ MkTexture *temp_a0;
temp_v0 = segmented_to_virtual_dupe_2(arg2);
- temp_s0 = &D_8018DEE0[arg0];
- temp_s0->textureSequence = temp_v0;
- temp_s0->sequenceIndex = arg1;
- temp_s0->frameCountDown = temp_v0[arg1].frame_length;
- temp_v0_2 = segmented_to_virtual_dupe(temp_v0[thing].mk64Texture);
- if (temp_s0->unk14 != 0) {
- func_80099A94(temp_v0_2, temp_s0->D_8018E118_index);
- temp_s0->unk14 = 0;
+ D_8018DEE0[arg0].textureSequence = temp_v0;
+ D_8018DEE0[arg0].sequenceIndex = arg1;
+ // All hail the fake match gods who, in their infinite grace, have blessed us
+ // with this enigma of a match on the first iteration of permutation
+ D_8018DEE0[arg0].frameCountDown = (temp_v0 + arg1)->frame_length;
+ temp_a0 = segmented_to_virtual_dupe(temp_v0[arg1].mk64Texture);
+ if (D_8018DEE0[arg0].unk14 != 0) {
+ func_80099A94(temp_a0, D_8018DEE0[arg0].D_8018E118_index);
+ D_8018DEE0[arg0].unk14 = 0;
} else {
- func_80099A94(temp_v0_2, temp_s0->D_8018E118_index + 1);
- temp_s0->unk14 = 1;
+ func_80099A94(temp_a0, D_8018DEE0[arg0].D_8018E118_index + 1);
+ D_8018DEE0[arg0].unk14 = 1;
}
}
-#else
-GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A594.s")
-#endif
-#ifdef NON_MATCHING
-// Non-matching due to the argument registers to an addu command being swapped.
-// Also some stack mangement around the segmented_to_virtual_dupe call is wrong
-extern void func_80099E60(MkTexture *, s32, s32);
void func_8009A640(s32 arg0, s32 arg1, s32 arg2, MkAnimation *arg3) {
MkAnimation *temp_v0;
MkTexture *temp_a0;
- s32 thing = arg1;
temp_v0 = segmented_to_virtual_dupe_2(arg3);
D_8018DEE0[arg0].textureSequence = temp_v0;
D_8018DEE0[arg0].sequenceIndex = arg1;
- D_8018DEE0[arg0].frameCountDown = temp_v0[arg1].frame_length;
- temp_a0 = segmented_to_virtual_dupe(temp_v0[thing].mk64Texture);
+ D_8018DEE0[arg0].frameCountDown = (temp_v0 + arg1)->frame_length;
+ temp_a0 = segmented_to_virtual_dupe(temp_v0[arg1].mk64Texture);
D_8018DEE0[arg0].unk14 ^= 1;
func_80099E60(temp_a0, arg2, D_8018DEE0[arg0].unk14);
}
-#else
-GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A640.s")
-#endif
UNUSED void func_8009A6D4(void) {
s32 index;
@@ -4453,127 +4333,95 @@ void func_8009A7EC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
}
}
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 0ca3d5f5fa5e3d957908269ac1535e7d4f12bce9
MkTexture *func_8009A878(struct_8018DEE0_entry *arg0) {
- MkAnimation *temp_v0;
MkAnimation *temp_v1;
- MkTexture *temp_v0_2;
- s32 temp_t1;
- s32 temp_t3;
- s32 temp_t8;
- MkAnimation *phi_v0;
+ MkAnimation *var_v0;
+ MkAnimation *test;
+ MkTexture *temp_a0;
temp_v1 = arg0->textureSequence;
if (arg0->sequenceIndex < 0) {
arg0->sequenceIndex = 0;
arg0->frameCountDown = 0;
}
- temp_t8 = arg0->frameCountDown - 1;
- arg0->frameCountDown = temp_t8;
- if (temp_t8 <= 0) {
- temp_t1 = arg0->sequenceIndex + 1;
- temp_t3 = temp_t1 * 8;
- arg0->sequenceIndex = temp_t1;
- temp_v0 = temp_v1 + temp_t3;
- phi_v0 = temp_v0;
- if (temp_v0->mk64Texture == 0) {
+ arg0->frameCountDown--;
+ if (arg0->frameCountDown <= 0) {
+ arg0->sequenceIndex++;
+ // Again, hail the fake match gods
+ var_v0 = ((test = temp_v1) + arg0->sequenceIndex);
+ if (var_v0->mk64Texture == NULL) {
arg0->sequenceIndex = 0;
- phi_v0 = &temp_v1[0];
}
- arg0->frameCountDown = phi_v0->frame_length;
- temp_v0_2 = segmented_to_virtual_dupe(phi_v0->mk64Texture);
+ var_v0 = (test + arg0->sequenceIndex);
+ arg0->frameCountDown = var_v0->frame_length;
+ temp_a0 = segmented_to_virtual_dupe(var_v0->mk64Texture);
if (arg0->unk14 != 0) {
- func_80099A94(temp_v0_2, arg0->D_8018E118_index);
+ func_80099A94(temp_a0, arg0->D_8018E118_index);
arg0->unk14 = 0;
} else {
- func_80099A94(temp_v0_2, arg0->D_8018E118_index + 1);
+ func_80099A94(temp_a0, arg0->D_8018E118_index + 1);
arg0->unk14 = 1;
}
}
return arg0->textureSequence[arg0->sequenceIndex].mk64Texture;
}
-#else
-GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A878.s")
-#endif
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 0ca3d5f5fa5e3d957908269ac1535e7d4f12bce9
MkTexture *func_8009A944(struct_8018DEE0_entry *arg0, s32 arg1) {
- MkAnimation *temp_v0;
MkAnimation *temp_v1;
+ MkAnimation *var_v0;
+ MkAnimation *test;
MkTexture *temp_a0;
- s32 temp_a2;
- s32 temp_t1;
- s32 temp_t3;
- s32 temp_t8;
- MkAnimation *phi_v0;
temp_v1 = arg0->textureSequence;
if (arg0->sequenceIndex < 0) {
arg0->sequenceIndex = 0;
arg0->frameCountDown = 0;
}
- temp_t8 = arg0->frameCountDown - 1;
- arg0->frameCountDown = temp_t8;
- if (temp_t8 <= 0) {
- temp_t1 = arg0->sequenceIndex + 1;
- temp_t3 = temp_t1 * 8;
- arg0->sequenceIndex = temp_t1;
- temp_v0 = temp_v1 + temp_t3;
- phi_v0 = temp_v0;
- if (temp_v0->mk64Texture == 0) {
+ arg0->frameCountDown--;
+ if (arg0->frameCountDown <= 0) {
+ arg0->sequenceIndex++;
+ var_v0 = ((test = temp_v1) + arg0->sequenceIndex);
+ if (var_v0->mk64Texture == NULL) {
arg0->sequenceIndex = 0;
- phi_v0 = &temp_v1[0];
}
- arg0->frameCountDown = phi_v0->frame_length;
- arg0 = arg0;
- temp_a0 = segmented_to_virtual_dupe(phi_v0->mk64Texture);
- temp_a2 = arg0->unk14 ^ 1;
- arg0->unk14 = temp_a2;
- func_80099E60(temp_a0, arg1, temp_a2);
+ var_v0 = (test + arg0->sequenceIndex);
+ arg0->frameCountDown = var_v0->frame_length;
+ temp_a0 = segmented_to_virtual_dupe(var_v0->mk64Texture);
+ arg0->unk14 ^= 1;
+ func_80099E60(temp_a0, arg1, arg0->unk14);
}
- return *(arg0->textureSequence + (arg0->sequenceIndex * 8));
+ return arg0->textureSequence[arg0->sequenceIndex].mk64Texture;
}
-#else
-GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A944.s")
-#endif
#ifdef MIPS_TO_C
-extern s32 D_8018D9B0;
-extern struct_8018E118_entry D_8018E118;
-
-UNUSED void func_8009A9FC(s32 arg0, s32 arg1, u32 arg2, s32 arg3) {
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+void func_8009A9FC(s32 arg0, s32 arg1, u32 arg2, s32 arg3) {
s32 temp_t6;
s32 temp_t7;
s32 temp_t8;
s32 temp_t9;
s32 temp_v1;
+ u16 *var_v0;
u16 temp_a0;
- u32 temp_t1;
- void *temp_t0;
- u16 *phi_v0;
- void *phi_t0;
- u32 phi_t1;
+ u32 var_t1;
+ void *var_t0;
temp_v1 = D_8018D9B0;
- phi_v0 = ((&D_8018E118 + (arg0 * 8))->unk4 * 2) + temp_v1;
- phi_t0 = ((&D_8018E118 + (arg1 * 8))->unk4 * 2) + temp_v1;
- phi_t1 = 0U;
+ var_v0 = (D_8018E118[arg0].offset * 2) + temp_v1;
+ var_t1 = 0;
+ var_t0 = (D_8018E118[arg1].offset * 2) + temp_v1;
if (arg2 != 0) {
do {
- temp_a0 = *phi_v0;
- temp_t1 = phi_t1 + 1;
+ temp_a0 = *var_v0;
+ var_t1 += 1;
+ var_v0 += 2;
temp_t6 = (s32) (temp_a0 & 0xF800) >> 0xB;
temp_t7 = (s32) (temp_a0 & 0x7C0) >> 6;
temp_t8 = (s32) (temp_a0 & 0x3E) >> 1;
- temp_t0 = phi_t0 + 2;
+ var_t0 += 2;
temp_t9 = (s32) ((temp_t6 * 0x4D) + (temp_t7 * 0x96) + (temp_t8 * 0x1D)) >> 8;
- temp_t0->unk-2 = (s16) (((((s32) ((((s32) (temp_t9 * 6) / 8) - temp_t8) * arg3) >> 8) + temp_t8) * 2) + ((((s32) ((((s32) (temp_t9 * 7) / 8) - temp_t7) * arg3) >> 8) + temp_t7) << 6) + ((((s32) ((temp_t9 - temp_t6) * arg3) >> 8) + temp_t6) << 0xB) + (temp_a0 & 1));
- phi_v0 += 2;
- phi_t0 = temp_t0;
- phi_t1 = temp_t1;
- } while (temp_t1 < arg2);
+ var_t0->unk-2 = (s16) (((((s32) ((((s32) (temp_t9 * 6) / 8) - temp_t8) * arg3) >> 8) + temp_t8) * 2) + ((((s32) ((((s32) (temp_t9 * 7) / 8) - temp_t7) * arg3) >> 8) + temp_t7) << 6) + ((((s32) ((temp_t9 - temp_t6) * arg3) >> 8) + temp_t6) << 0xB) + (temp_a0 & 1));
+ } while (var_t1 < arg2);
}
}
#else
@@ -4581,53 +4429,45 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A9FC.s")
#endif
#ifdef MIPS_TO_C
-extern s32 D_8018D9B0;
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
extern ? D_8018E11C;
-UNUSED void func_8009AB7C(s32 arg0) {
- s32 temp_v1;
- u16 *temp_v0;
+void func_8009AB7C(s32 arg0) {
+ s32 var_v1;
+ u16 *var_v0;
u16 temp_a1;
u16 temp_a1_2;
u16 temp_a1_3;
u16 temp_a1_4;
- u16 *phi_v0;
- s32 phi_v1;
- phi_v0 = (*(&D_8018E11C + (arg0 * 8)) * 2) + D_8018D9B0;
- phi_v1 = 0;
+ var_v1 = 0;
+ var_v0 = (*(&D_8018E11C + (arg0 * 8)) * 2) + D_8018D9B0;
do {
- temp_a1 = *phi_v0;
- temp_v1 = phi_v1 + 4;
- temp_v0 = phi_v0 + 8;
- temp_a1_2 = temp_v0->unk-6;
- temp_v0->unk-8 = (s16) ((((u32) ((((s32) (temp_a1 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1 & 1));
- temp_a1_3 = temp_v0->unk-4;
- temp_v0->unk-6 = (u16) ((((u32) ((((s32) (temp_a1_2 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1_2 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1_2 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1_2 & 1));
- temp_a1_4 = temp_v0->unk-2;
- temp_v0->unk-4 = (u16) ((((u32) ((((s32) (temp_a1_3 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1_3 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1_3 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1_3 & 1));
- temp_v0->unk-2 = (u16) ((((u32) ((((s32) (temp_a1_4 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1_4 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1_4 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1_4 & 1));
- phi_v0 = temp_v0;
- phi_v1 = temp_v1;
- } while (temp_v1 != 0x4B000);
+ temp_a1 = *var_v0;
+ var_v1 += 4;
+ var_v0 += 8;
+ temp_a1_2 = var_v0->unk-6;
+ var_v0->unk-8 = (s16) ((((u32) ((((s32) (temp_a1 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1 & 1));
+ temp_a1_3 = var_v0->unk-4;
+ var_v0->unk-6 = (u16) ((((u32) ((((s32) (temp_a1_2 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1_2 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1_2 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1_2 & 1));
+ temp_a1_4 = var_v0->unk-2;
+ var_v0->unk-4 = (u16) ((((u32) ((((s32) (temp_a1_3 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1_3 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1_3 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1_3 & 1));
+ var_v0->unk-2 = (u16) ((((u32) ((((s32) (temp_a1_4 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a1_4 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a1_4 & 0x3E) >> 1) * 0x1D)) >> 8) * 0x842) + (temp_a1_4 & 1));
+ } while (var_v1 != 0x4B000);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009AB7C.s")
#endif
#ifdef MIPS_TO_C
-extern s32 D_8018D9B0;
-extern struct_8018E118_entry D_8018E118;
-
-UNUSED void func_8009AD78(s32 arg0, s32 arg1) {
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+void func_8009AD78(s32 arg0, s32 arg1) {
s32 temp_a2;
s32 temp_a3;
- s32 temp_t0;
- s32 temp_t0_2;
s32 temp_v1_2;
- u16 *temp_v0;
- u16 *temp_v0_2;
- u16 *temp_v0_3;
+ s32 var_t0;
+ struct_8018E118_entry *temp_v1;
+ u16 *var_v0;
u16 temp_a0;
u16 temp_a0_2;
u16 temp_a0_3;
@@ -4638,57 +4478,43 @@ UNUSED void func_8009AD78(s32 arg0, s32 arg1) {
u32 temp_t7;
u32 temp_t8;
u32 temp_t9;
- void *temp_v1;
- u16 *phi_v0;
- s32 phi_t0;
- u16 *phi_v0_2;
- s32 phi_t0_2;
- temp_v1 = (arg0 * 8) + &D_8018E118;
- temp_a2 = temp_v1->unk4;
+ temp_v1 = &D_8018E118[arg0];
+ temp_a2 = temp_v1->offset;
temp_a3 = temp_v1->unkC - temp_a2;
- temp_v0 = (temp_a2 * 2) + D_8018D9B0;
- phi_v0 = temp_v0;
- phi_t0 = 0;
- phi_v0_2 = temp_v0;
- phi_t0_2 = 0;
+ var_t0 = 0;
+ var_v0 = (temp_a2 * 2) + D_8018D9B0;
if (temp_a3 != 0) {
temp_v1_2 = temp_a3 & 3;
if (temp_v1_2 != 0) {
do {
- temp_a0 = *phi_v0;
- temp_t0 = phi_t0 + 1;
- temp_v0_2 = phi_v0 + 2;
+ temp_a0 = *var_v0;
+ var_t0 += 1;
+ var_v0 += 2;
temp_t6 = (u32) ((((s32) (temp_a0 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a0 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a0 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_2->unk-2 = (s16) (((temp_t6 + ((u32) ((0x20 - temp_t6) * arg1) >> 8)) * 0x842) + (temp_a0 & 1));
- phi_v0 = temp_v0_2;
- phi_t0 = temp_t0;
- phi_v0_2 = temp_v0_2;
- phi_t0_2 = temp_t0;
- } while (temp_v1_2 != temp_t0);
- if (temp_t0 != temp_a3) {
+ var_v0->unk-2 = (s16) (((temp_t6 + ((u32) ((0x20 - temp_t6) * arg1) >> 8)) * 0x842) + (temp_a0 & 1));
+ } while (temp_v1_2 != var_t0);
+ if (var_t0 != temp_a3) {
goto block_5;
}
} else {
block_5:
do {
- temp_a0_2 = *phi_v0_2;
- temp_t0_2 = phi_t0_2 + 4;
- temp_v0_3 = phi_v0_2 + 8;
- temp_a0_3 = temp_v0_3->unk-6;
+ temp_a0_2 = *var_v0;
+ var_t0 += 4;
+ var_v0 += 8;
+ temp_a0_3 = var_v0->unk-6;
temp_t7 = (u32) ((((s32) (temp_a0_2 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a0_2 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a0_2 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-8 = (s16) (((temp_t7 + ((u32) ((0x20 - temp_t7) * arg1) >> 8)) * 0x842) + (temp_a0_2 & 1));
- temp_a0_4 = temp_v0_3->unk-4;
+ var_v0->unk-8 = (s16) (((temp_t7 + ((u32) ((0x20 - temp_t7) * arg1) >> 8)) * 0x842) + (temp_a0_2 & 1));
+ temp_a0_4 = var_v0->unk-4;
temp_t8 = (u32) ((((s32) (temp_a0_3 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a0_3 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a0_3 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-6 = (u16) (((temp_t8 + ((u32) ((0x20 - temp_t8) * arg1) >> 8)) * 0x842) + (temp_a0_3 & 1));
- temp_a0_5 = temp_v0_3->unk-2;
+ var_v0->unk-6 = (u16) (((temp_t8 + ((u32) ((0x20 - temp_t8) * arg1) >> 8)) * 0x842) + (temp_a0_3 & 1));
+ temp_a0_5 = var_v0->unk-2;
temp_t9 = (u32) ((((s32) (temp_a0_4 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a0_4 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a0_4 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-4 = (u16) (((temp_t9 + ((u32) ((0x20 - temp_t9) * arg1) >> 8)) * 0x842) + (temp_a0_4 & 1));
+ var_v0->unk-4 = (u16) (((temp_t9 + ((u32) ((0x20 - temp_t9) * arg1) >> 8)) * 0x842) + (temp_a0_4 & 1));
temp_t6_2 = (u32) ((((s32) (temp_a0_5 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a0_5 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a0_5 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-2 = (u16) (((temp_t6_2 + ((u32) ((0x20 - temp_t6_2) * arg1) >> 8)) * 0x842) + (temp_a0_5 & 1));
- phi_v0_2 = temp_v0_3;
- phi_t0_2 = temp_t0_2;
- } while (temp_t0_2 != temp_a3);
+ var_v0->unk-2 = (u16) (((temp_t6_2 + ((u32) ((0x20 - temp_t6_2) * arg1) >> 8)) * 0x842) + (temp_a0_5 & 1));
+ } while (var_t0 != temp_a3);
}
}
}
@@ -4798,17 +4624,13 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009B0A4.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
-extern s32 D_8018D9B0;
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
extern ? D_8018E11C;
void func_8009B538(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
s32 temp_a0;
- s32 temp_v1;
- s32 temp_v1_2;
- u16 *temp_v0;
- u16 *temp_v0_2;
- u16 *temp_v0_3;
+ s32 var_v1;
+ u16 *var_v0;
u16 temp_a2;
u16 temp_a2_2;
u16 temp_a2_3;
@@ -4819,53 +4641,40 @@ void func_8009B538(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
u32 temp_t8_2;
u32 temp_t9;
u32 temp_t9_2;
- u16 *phi_v0;
- s32 phi_v1;
- u16 *phi_v0_2;
- s32 phi_v1_2;
- temp_v0 = (*(&D_8018E11C + (arg0 * 8)) * 2) + D_8018D9B0;
- phi_v0 = temp_v0;
- phi_v1 = 0;
- phi_v0_2 = temp_v0;
- phi_v1_2 = 0;
+ var_v1 = 0;
+ var_v0 = (*(&D_8018E11C + (arg0 * 8)) * 2) + D_8018D9B0;
if (arg1 != 0) {
temp_a0 = arg1 & 3;
if (temp_a0 != 0) {
do {
- temp_a2 = *phi_v0;
- temp_v1 = phi_v1 + 1;
- temp_v0_2 = phi_v0 + 2;
- temp_t9 = ((((temp_a2 & 0xF800) >> 0xB) * 0x4D) + (((temp_a2 & 0x7C0) >> 6) * 0x96) + (((temp_a2 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_2->unk-2 = (((arg2 * temp_t9) >> 8) << 0xB) + (((arg3 * temp_t9) >> 8) << 6) + (((arg4 * temp_t9) >> 8) * 2) + (temp_a2 & 1);
- phi_v0 = temp_v0_2;
- phi_v1 = temp_v1;
- phi_v0_2 = temp_v0_2;
- phi_v1_2 = temp_v1;
- } while (temp_a0 != temp_v1);
- if (temp_v1 != arg1) {
+ temp_a2 = *var_v0;
+ var_v1 += 1;
+ var_v0 += 2;
+ temp_t9 = (u32) ((((s32) (temp_a2 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a2 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a2 & 0x3E) >> 1) * 0x1D)) >> 8;
+ var_v0->unk-2 = (s16) ((((u32) (arg2 * temp_t9) >> 8) << 0xB) + (((u32) (arg3 * temp_t9) >> 8) << 6) + (((u32) (arg4 * temp_t9) >> 8) * 2) + (temp_a2 & 1));
+ } while (temp_a0 != var_v1);
+ if (var_v1 != arg1) {
goto block_5;
}
} else {
block_5:
do {
- temp_a2_2 = *phi_v0_2;
- temp_v1_2 = phi_v1_2 + 4;
- temp_v0_3 = phi_v0_2 + 8;
- temp_a2_3 = temp_v0_3->unk-6;
- temp_t8 = ((((temp_a2_2 & 0xF800) >> 0xB) * 0x4D) + (((temp_a2_2 & 0x7C0) >> 6) * 0x96) + (((temp_a2_2 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-8 = (((arg2 * temp_t8) >> 8) << 0xB) + (((arg3 * temp_t8) >> 8) << 6) + (((arg4 * temp_t8) >> 8) * 2) + (temp_a2_2 & 1);
- temp_a2_4 = temp_v0_3->unk-4;
- temp_t6 = ((((temp_a2_3 & 0xF800) >> 0xB) * 0x4D) + (((temp_a2_3 & 0x7C0) >> 6) * 0x96) + (((temp_a2_3 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-6 = (((arg2 * temp_t6) >> 8) << 0xB) + (((arg3 * temp_t6) >> 8) << 6) + (((arg4 * temp_t6) >> 8) * 2) + (temp_a2_3 & 1);
- temp_a2_5 = temp_v0_3->unk-2;
- temp_t9_2 = ((((temp_a2_4 & 0xF800) >> 0xB) * 0x4D) + (((temp_a2_4 & 0x7C0) >> 6) * 0x96) + (((temp_a2_4 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-4 = (((arg2 * temp_t9_2) >> 8) << 0xB) + (((arg3 * temp_t9_2) >> 8) << 6) + (((arg4 * temp_t9_2) >> 8) * 2) + (temp_a2_4 & 1);
- temp_t8_2 = ((((temp_a2_5 & 0xF800) >> 0xB) * 0x4D) + (((temp_a2_5 & 0x7C0) >> 6) * 0x96) + (((temp_a2_5 & 0x3E) >> 1) * 0x1D)) >> 8;
- temp_v0_3->unk-2 = (((arg2 * temp_t8_2) >> 8) << 0xB) + (((arg3 * temp_t8_2) >> 8) << 6) + (((arg4 * temp_t8_2) >> 8) * 2) + (temp_a2_5 & 1);
- phi_v0_2 = temp_v0_3;
- phi_v1_2 = temp_v1_2;
- } while (temp_v1_2 != arg1);
+ temp_a2_2 = *var_v0;
+ var_v1 += 4;
+ var_v0 += 8;
+ temp_a2_3 = var_v0->unk-6;
+ temp_t8 = (u32) ((((s32) (temp_a2_2 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a2_2 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a2_2 & 0x3E) >> 1) * 0x1D)) >> 8;
+ var_v0->unk-8 = (s16) ((((u32) (arg2 * temp_t8) >> 8) << 0xB) + (((u32) (arg3 * temp_t8) >> 8) << 6) + (((u32) (arg4 * temp_t8) >> 8) * 2) + (temp_a2_2 & 1));
+ temp_a2_4 = var_v0->unk-4;
+ temp_t6 = (u32) ((((s32) (temp_a2_3 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a2_3 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a2_3 & 0x3E) >> 1) * 0x1D)) >> 8;
+ var_v0->unk-6 = (u16) ((((u32) (arg2 * temp_t6) >> 8) << 0xB) + (((u32) (arg3 * temp_t6) >> 8) << 6) + (((u32) (arg4 * temp_t6) >> 8) * 2) + (temp_a2_3 & 1));
+ temp_a2_5 = var_v0->unk-2;
+ temp_t9_2 = (u32) ((((s32) (temp_a2_4 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a2_4 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a2_4 & 0x3E) >> 1) * 0x1D)) >> 8;
+ var_v0->unk-4 = (u16) ((((u32) (arg2 * temp_t9_2) >> 8) << 0xB) + (((u32) (arg3 * temp_t9_2) >> 8) << 6) + (((u32) (arg4 * temp_t9_2) >> 8) * 2) + (temp_a2_4 & 1));
+ temp_t8_2 = (u32) ((((s32) (temp_a2_5 & 0xF800) >> 0xB) * 0x4D) + (((s32) (temp_a2_5 & 0x7C0) >> 6) * 0x96) + (((s32) (temp_a2_5 & 0x3E) >> 1) * 0x1D)) >> 8;
+ var_v0->unk-2 = (u16) ((((u32) (arg2 * temp_t8_2) >> 8) << 0xB) + (((u32) (arg3 * temp_t8_2) >> 8) << 6) + (((u32) (arg4 * temp_t8_2) >> 8) * 2) + (temp_a2_5 & 1));
+ } while (var_v1 != arg1);
}
}
}
@@ -4873,45 +4682,27 @@ block_5:
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009B538.s")
#endif
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-extern s32 D_8018D9B0;
-extern s32 gNumD_8018E118Entries;
-
s32 func_8009B8C4(u64 *arg0) {
+ s32 stackPadding1;
+ s32 stackPadding2;
s32 sp4;
- s32 temp_a1;
- s32 temp_v1;
- struct_8018E118_entry *phi_a2;
- s32 phi_v1;
- s32 phi_v0;
+ s32 found;
+ s32 someIndex;
- temp_a1 = gNumD_8018E118Entries;
- phi_v1 = 0;
- phi_v0 = 0;
- if (temp_a1 > 0) {
- phi_a2 = D_8018E118;
-loop_2:
- temp_v1 = phi_v1 + 1;
- phi_v1 = temp_v1;
- if (arg0 == phi_a2->textureData) {
- sp4 = phi_a2->offset;
- phi_v0 = 1;
- } else {
- phi_a2 += 8;
- if (temp_v1 < temp_a1) {
- goto loop_2;
- }
+ found = 0;
+ for (someIndex = 0; someIndex < gNumD_8018E118Entries; someIndex++) {
+ if (arg0 == D_8018E118[someIndex].textureData) {
+ found = 1;
+ sp4 = D_8018E118[someIndex].offset;
+ break;
}
}
- if (phi_v0 != 0) {
- return (sp4 * 2) + D_8018D9B0;
+
+ if (found != 0) {
+ return D_8018D9B0 + (sp4 * 2);
}
return 0;
}
-#else
-GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009B8C4.s")
-#endif
// D_8018D9C0 is a little weird. In code_800AF9B0 its treated as a
// struct_8018EE10_entry pointer. But here its being treated as a
@@ -5744,32 +5535,26 @@ void func_8009CE1C(void) {
}
#ifdef MIPS_TO_C
-//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
-void func_8000F124(s8, s32); /* extern */
-void func_8009CE1C(s32 *, s32, s32); /* extern */
-void func_80290338(); /* extern */
-void func_80290360(); /* extern */
-void func_80290388(); /* extern */
-void func_802903B0(); /* extern */
-extern s32 gGamestateNext;
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+? func_8009CE1C(s32 *, s32, s32, s32); /* extern */
extern s32 D_800E86A4;
extern s16 D_8015F892;
extern ? D_8018E7AC;
extern s8 D_8018E7B0;
extern u32 D_8018EDE0;
-extern s8 D_8018EDF3;
extern s8 D_8018EDFB;
extern s8 D_8018EE08;
extern s8 D_8018EE0C;
extern s16 gCreditsCourseId;
extern s8 gDebugGotoScene;
+extern s32 gGamestate;
+extern s32 gGamestateNext;
extern s32 gMenuSelectionFromEndingSequence;
-extern s32 gScreenModeSelection;
u8 gCupSelectionByCourseId[0x15]; /* unable to generate initializer */
s16 gCurrentCourseId; /* unable to generate initializer */
u8 gPerCupIndexByCourseId[0x15]; /* unable to generate initializer; const */
-void func_8009CE64(s32 *arg0, s32 arg2, s32 arg3) {
+void func_8009CE64(s32 *arg0, s32 arg1, s32 arg2, s32 arg3) {
s32 sp28;
s8 *sp18;
s16 temp_a0;
@@ -5787,6 +5572,7 @@ void func_8009CE64(s32 *arg0, s32 arg2, s32 arg3) {
s32 var_a1;
s32 var_a1_2;
s32 var_a2;
+ s32 var_a3;
s32 var_t7;
s32 var_v0;
s8 *temp_v0_2;
@@ -5800,7 +5586,8 @@ void func_8009CE64(s32 *arg0, s32 arg2, s32 arg3) {
u32 temp_t9;
var_a0 = arg0;
- var_a2 = arg3;
+ var_a2 = arg2;
+ var_a3 = arg3;
temp_v0 = gGamestate;
var_a1 = 0;
if (temp_v0 == (s32) 5) {
@@ -5831,18 +5618,18 @@ void func_8009CE64(s32 *arg0, s32 arg2, s32 arg3) {
temp_v0_3 = find_8018D9E0_entry(0x000000B0);
if (temp_v0_3 != NULL) {
temp_v1_2 = temp_v0_3->unk4;
- switch (temp_v1_2) { /* switch 8; irregular */
- case 10: /* switch 8 */
+ switch (temp_v1_2) { /* switch 7; irregular */
+ case 10: /* switch 7 */
func_802903B0();
return;
- case 11: /* switch 8 */
+ case 11: /* switch 7 */
func_80290388();
return;
- case 12: /* switch 8 */
+ case 12: /* switch 7 */
func_80290360();
return;
- default: /* switch 8 */
- case 13: /* switch 8 */
+ default: /* switch 7 */
+ case 13: /* switch 7 */
func_80290338();
return;
}
@@ -5851,13 +5638,13 @@ void func_8009CE64(s32 *arg0, s32 arg2, s32 arg3) {
temp_v0_4 = find_8018D9E0_entry(0x000000AC);
if (temp_v0_4 != NULL) {
temp_v1_3 = temp_v0_4->unk4;
- switch (temp_v1_3) { /* switch 7; irregular */
- case 11: /* switch 7 */
+ switch (temp_v1_3) { /* switch 6; irregular */
+ case 11: /* switch 6 */
func_802903B0();
D_8016556E = 1;
return;
- default: /* switch 7 */
- case 12: /* switch 7 */
+ default: /* switch 6 */
+ case 12: /* switch 6 */
func_80290338();
return;
}
@@ -5992,6 +5779,7 @@ block_74:
break;
case 3: /* switch 4 */
gCurrentCourseId = 0x000E;
+ var_a3 = 3;
var_a2 = 2;
gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN;
gPlayerCountSelection1 = 3;
@@ -6013,7 +5801,8 @@ block_74:
case 5: /* switch 4 */
gCurrentCourseId = 0x000C;
var_a2 = 2;
- gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN;
+ var_a3 = 3;
+ gScreenModeSelection = 3;
gPlayerCountSelection1 = 4;
D_8018EDF3 = (s8) 4;
gCharacterSelections->unk0 = 0;
@@ -6064,7 +5853,7 @@ block_74:
if (gModeSelection == TIME_TRIALS) {
D_8018EDFB = (s8) 1;
}
- func_8009CE1C(var_a0, 1, var_a2);
+ func_8009CE1C(var_a0, 1, var_a2, var_a3);
}
D_8018EE0C = 0;
return;
@@ -6083,7 +5872,8 @@ block_74:
if (gModeSelection == (s32) TIME_TRIALS) {
D_8018EDFB = 1;
}
- break;
+ } else {
+ gGamestateNext = (s32) 5;
}
func_8000F124(1, 2);
if ((gScreenModeSelection == SCREEN_MODE_3P_4P_SPLITSCREEN) && ((temp_v1_8 = gModeSelection, (temp_v1_8 == GRAND_PRIX)) || (temp_v1_8 == TIME_TRIALS))) {
@@ -6124,7 +5914,7 @@ block_74:
return;
}
gIsMirrorMode = 0;
- case 1: /* switch 6 */
+ case 1: /* switch 5 */
default: /* switch 2 */
return;
}
@@ -8326,27 +8116,19 @@ block_58:
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009F5E0.s")
#endif
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
-s32 func_8009BA74(s32, s32, s32, s32); // extern
-void *segmented_to_virtual_dupe(void*); // extern
-extern ? D_800E7AF8;
-extern s32 gDisplayListHead;
-
-void func_800A08D8(s32 arg0, s32 arg1, s32 arg2) {
- s32 temp_a3;
- s32 temp_t6;
- s32 phi_a3;
-
- temp_a3 = arg0 & 0xFF;
- if (temp_a3 >= 0x10) {
- temp_t6 = (temp_a3 - 0x10) & 0xFF;
- phi_a3 = temp_t6;
- if (temp_t6 < 0x85) {
- if (temp_t6 >= 0x32) {
- phi_a3 = 0x2B;
+#ifdef NEEDS_RODATA
+// I think this is rodata? It looks like its all the font textures
+// data_0DD0A0_2_0
+extern MkTexture *D_800E7AF8[0x6C];
+
+void func_800A08D8(u8 arg0, s32 column, s32 row) {
+ if (arg0 >= 0x10) {
+ arg0 -= 0x10;
+ if (arg0 < 0x85) {
+ if (arg0 >= 0x32) {
+ arg0 = 0x2B;
}
- gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(*(&D_800E7AF8 + (phi_a3 * 4))), arg1, arg2);
+ gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7AF8[arg0]), column, row);
}
}
}
@@ -8355,41 +8137,31 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A08D8.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
-void func_800A08D8(s32, s32, ?); // extern
-
-s32 func_800A095C(s8 *arg0, s32 arg1, s32 arg2, ? arg3) {
- s32 temp_s1;
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+s32 func_800A095C(s8 *arg0, s32 len, s32 column, s32 row) {
+ s32 var_s0;
+ s32 var_s1;
+ s32 var_s3;
+ s8 *var_s2;
s8 temp_v0;
- s8 *phi_s2;
- s32 phi_s0;
- s32 phi_s1;
- s32 phi_s3;
- s32 phi_s3_2;
- s32 phi_s3_3;
- phi_s2 = arg0;
- phi_s0 = arg2;
- phi_s1 = arg1;
- phi_s3 = 0;
- phi_s3_3 = 0;
- if (arg1 != 0) {
+ var_s1 = len;
+ var_s2 = arg0;
+ var_s3 = 0;
+ var_s0 = column;
+ if (len != 0) {
do {
- temp_v0 = *phi_s2;
- phi_s3_2 = phi_s3_3;
+ temp_v0 = *var_s2;
if (temp_v0 != 0) {
- phi_s3_2 = phi_s3_3 + 1;
+ var_s3 += 1;
}
- func_800A08D8(temp_v0 & 0xFF, phi_s0, arg3);
- temp_s1 = phi_s1 - 1;
- phi_s2 += 1;
- phi_s0 += 8;
- phi_s1 = temp_s1;
- phi_s3 = phi_s3_2;
- phi_s3_3 = phi_s3_2;
- } while (temp_s1 != 0);
+ var_s2 += 1;
+ func_800A08D8(temp_v0 & 0xFF, var_s0, row);
+ var_s1 -= 1;
+ var_s0 += 8;
+ } while (var_s1 != 0);
}
- return phi_s3;
+ return var_s3;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A095C.s")
@@ -11838,161 +11610,153 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A79F4.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 054f217e0ef630f2a2a76ec70a84ce37369571c0
-void func_8009E000(?); /* extern */
-void func_8009F5E0(struct_8018D9E0_entry *); /* extern */
-void func_800A9710(struct_8018D9E0_entry *); /* extern */
-void func_800A97BC(struct_8018D9E0_entry *); /* extern */
-void func_800A9A98(struct_8018D9E0_entry *); /* extern */
-void func_800A9B9C(struct_8018D9E0_entry *); /* extern */
-void func_800A9C40(struct_8018D9E0_entry *); /* extern */
-void func_800A9D5C(struct_8018D9E0_entry *); /* extern */
-void func_800A9E58(struct_8018D9E0_entry *); /* extern */
-void func_800AA280(struct_8018D9E0_entry *); /* extern */
-void func_800AA2EC(struct_8018D9E0_entry *); /* extern */
-void func_800AA69C(struct_8018D9E0_entry *); /* extern */
-void func_800AAA9C(struct_8018D9E0_entry *); /* extern */
-void func_800AAB90(struct_8018D9E0_entry *); /* extern */
-void func_800AAC18(struct_8018D9E0_entry *); /* extern */
-void func_800AB020(struct_8018D9E0_entry *); /* extern */
-void func_800AB098(struct_8018D9E0_entry *); /* extern */
-void func_800AB164(struct_8018D9E0_entry *); /* extern */
-void func_800AB260(struct_8018D9E0_entry *); /* extern */
-void func_800AB314(struct_8018D9E0_entry *); /* extern */
-void func_800AB904(struct_8018D9E0_entry *); /* extern */
-void func_800AB9B0(struct_8018D9E0_entry *); /* extern */
-void func_800ABAE8(struct_8018D9E0_entry *); /* extern */
-void func_800ABB24(struct_8018D9E0_entry *); /* extern */
-void func_800ABBCC(struct_8018D9E0_entry *); /* extern */
-void func_800ABC38(struct_8018D9E0_entry *); /* extern */
-void func_800ABEAC(struct_8018D9E0_entry *); /* extern */
-void func_800AC300(struct_8018D9E0_entry *); /* extern */
-void func_800AC324(struct_8018D9E0_entry *); /* extern */
-void func_800AC458(struct_8018D9E0_entry *); /* extern */
-void func_800ACA14(struct_8018D9E0_entry *); /* extern */
-void func_800ACC50(struct_8018D9E0_entry *); /* extern */
-void func_800ACF40(struct_8018D9E0_entry *); /* extern */
-void func_800AD1A4(struct_8018D9E0_entry *); /* extern */
-void func_800AD2E8(struct_8018D9E0_entry *); /* extern */
-void func_800ADF48(struct_8018D9E0_entry *); /* extern */
-void func_800AE218(struct_8018D9E0_entry *); /* extern */
-void func_800AEC54(struct_8018D9E0_entry *); /* extern */
-void func_800AEDBC(struct_8018D9E0_entry *); /* extern */
-void func_800AEE90(struct_8018D9E0_entry *); /* extern */
-void func_800AEEBC(struct_8018D9E0_entry *); /* extern */
-void func_800AEEE8(struct_8018D9E0_entry *); /* extern */
-void func_800AEF14(struct_8018D9E0_entry *); /* extern */
-void func_800AEF74(struct_8018D9E0_entry *); /* extern */
-void func_800AF004(struct_8018D9E0_entry *); /* extern */
-void func_800AF1AC(struct_8018D9E0_entry *); /* extern */
-void func_800AF270(struct_8018D9E0_entry *); /* extern */
-void func_800AF480(struct_8018D9E0_entry *); /* extern */
-void func_800CA388(?); /* extern */
-void play_sound2(?); /* extern */
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+? func_8009E000(?); /* extern */
+? func_8009F5E0(struct_8018D9E0_entry *); /* extern */
+? func_800A9710(struct_8018D9E0_entry *); /* extern */
+? func_800A97BC(struct_8018D9E0_entry *); /* extern */
+? func_800A9A98(struct_8018D9E0_entry *); /* extern */
+? func_800A9B9C(struct_8018D9E0_entry *); /* extern */
+? func_800A9C40(struct_8018D9E0_entry *); /* extern */
+? func_800A9D5C(struct_8018D9E0_entry *); /* extern */
+? func_800A9E58(struct_8018D9E0_entry *); /* extern */
+? func_800AA280(struct_8018D9E0_entry *); /* extern */
+? func_800AA2EC(struct_8018D9E0_entry *); /* extern */
+? func_800AA69C(struct_8018D9E0_entry *); /* extern */
+? func_800AAA9C(struct_8018D9E0_entry *); /* extern */
+? func_800AAB90(struct_8018D9E0_entry *); /* extern */
+? func_800AAC18(struct_8018D9E0_entry *); /* extern */
+? func_800AB020(struct_8018D9E0_entry *); /* extern */
+? func_800AB164(struct_8018D9E0_entry *); /* extern */
+? func_800AB314(struct_8018D9E0_entry *); /* extern */
+? func_800AB904(struct_8018D9E0_entry *); /* extern */
+? func_800AB9B0(struct_8018D9E0_entry *); /* extern */
+? func_800ABAE8(struct_8018D9E0_entry *); /* extern */
+? func_800ABB24(struct_8018D9E0_entry *); /* extern */
+? func_800ABBCC(struct_8018D9E0_entry *); /* extern */
+? func_800ABC38(struct_8018D9E0_entry *); /* extern */
+? func_800ABEAC(struct_8018D9E0_entry *); /* extern */
+? func_800AC300(struct_8018D9E0_entry *); /* extern */
+? func_800AC324(struct_8018D9E0_entry *); /* extern */
+? func_800AC458(struct_8018D9E0_entry *); /* extern */
+? func_800ACA14(struct_8018D9E0_entry *); /* extern */
+? func_800ACC50(struct_8018D9E0_entry *); /* extern */
+? func_800ACF40(struct_8018D9E0_entry *); /* extern */
+? func_800AD1A4(struct_8018D9E0_entry *); /* extern */
+? func_800AD2E8(struct_8018D9E0_entry *); /* extern */
+? func_800ADF48(struct_8018D9E0_entry *); /* extern */
+? func_800AE218(struct_8018D9E0_entry *); /* extern */
+? func_800AEC54(struct_8018D9E0_entry *); /* extern */
+? func_800AEDBC(struct_8018D9E0_entry *); /* extern */
+? func_800AEF14(struct_8018D9E0_entry *); /* extern */
+? func_800AEF74(struct_8018D9E0_entry *); /* extern */
+? func_800AF004(struct_8018D9E0_entry *); /* extern */
+? func_800AF1AC(struct_8018D9E0_entry *); /* extern */
+? func_800AF270(struct_8018D9E0_entry *); /* extern */
+? func_800CA388(?); /* extern */
+? play_sound2(?); /* extern */
extern s32 D_8018ED94;
extern s32 D_8018EDE0;
extern s8 D_8018EDEE;
extern void *gControllerFive;
extern s8 gMainMenuSelectionDepth;
+f32 D_800E8530 = 0.0f;
+f32 D_800E8534 = 3.0f;
void func_800A7A4C(s32 arg0) {
f32 temp_f18;
f64 temp_f0;
- s32 temp_s0;
s32 temp_t2;
s32 temp_t3;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v0_6;
+ s32 var_s0;
+ s32 var_v1_2;
s8 temp_t1;
s8 temp_t9;
s8 temp_v0_4;
s8 temp_v0_5;
- struct_8018D9E0_entry *temp_s1;
- struct_8018D9E0_entry *temp_s1_2;
- struct_8018D9E0_entry *phi_s1;
- u8 phi_v1;
- struct_8018D9E0_entry *phi_s1_2;
- u8 phi_v1_2;
- s32 phi_s0;
+ struct_8018D9E0_entry *var_s1;
+ struct_8018D9E0_entry *var_s1_2;
+ u8 var_v1;
- phi_s1 = D_8018D9E0;
+ var_s1 = D_8018D9E0;
do {
- temp_v0 = phi_s1->type;
- phi_v1 = 0U;
- phi_v1_2 = 0U;
- if ((temp_v0 == 4) || (temp_v0 == 5) || (temp_v0 == 0xC7)) {
+ temp_v0 = var_s1->type;
+ var_v1 = 0;
+ if ((temp_v0 == 4) || (temp_v0 == 5) || (temp_v0 == 0x000000C7)) {
if (arg0 != 0) {
goto block_7;
}
} else if (arg0 == 0) {
block_7:
- phi_v1 = 1U;
+ var_v1 = 1;
}
- if (phi_v1 != 0) {
+ if (var_v1 != 0) {
switch (temp_v0) { /* switch 8; irregular */
case 0xFA: /* switch 8 */
temp_v0_2 = D_8018ED94;
if (temp_v0_2 < 0x50) {
D_800E8534 = 3.0f;
} else if (temp_v0_2 < 0x5A) {
- temp_f0 = (f64) 0.0f;
+ temp_f0 = (f64) D_800E8530;
if (temp_f0 < 1.0) {
D_800E8530 = (f32) (temp_f0 + 0.1);
}
- D_800E8534 = (f32) ((f64) 3.0f + 0.1);
+ D_800E8534 = (f32) ((f64) D_800E8534 + 0.1);
} else if (temp_v0_2 < 0xA0) {
- D_800E8534 = (f32) ((f64) 3.0f + 0.1);
+ D_800E8534 = (f32) ((f64) D_800E8534 + 0.1);
} else if (temp_v0_2 < 0x190) {
- D_800E8534 = (f32) ((f64) 3.0f + 0.3);
+ D_800E8534 = (f32) ((f64) D_800E8534 + 0.3);
}
- temp_f18 = D_8018EDCC - 3.0f;
+ temp_f18 = D_8018EDCC - D_800E8534;
D_8018EDCC = temp_f18;
D_8018ED94 = temp_v0_2 + 1;
if (temp_f18 < -360.0f) {
D_8018EDCC = temp_f18 + 360.0f;
}
- temp_t2 = phi_s1->unk1C + 1;
- phi_s1->unk1C = temp_t2;
- if (temp_t2 == 0xB4) {
+ temp_t2 = var_s1->unk1C + 1;
+ var_s1->unk1C = temp_t2;
+ if (temp_t2 == 0x000000B4) {
func_8009E000(0x28);
func_800CA388(0x64);
D_8018EDE0 = 0;
}
- if ((phi_s1->unk20 != 0) && (phi_s1->unk1C >= 3)) {
- phi_s1->unk20 = 0;
+ if ((var_s1->unk20 != 0) && (var_s1->unk1C >= 3)) {
+ var_s1->unk20 = 0;
play_sound2(0x49018008);
}
break;
case 0xDA: /* switch 8 */
- func_800A954C(phi_s1);
+ func_800A954C(var_s1);
break;
case 0xD6: /* switch 8 */
- func_800A9710(phi_s1);
+ func_800A9710(var_s1);
break;
case 0xD4: /* switch 8 */
- func_800A97BC(phi_s1);
+ func_800A97BC(var_s1);
break;
case 0x5: /* switch 8 */
- temp_v0_3 = phi_s1->unk4;
+ temp_v0_3 = var_s1->unk4;
switch (temp_v0_3) { /* switch 9; irregular */
case 0: /* switch 9 */
- if ((gControllerFive->unk4 & 0x10) != 0) {
- phi_s1->unk4 = (s32) 1U;
+ if (gControllerFive->unk4 & 0x10) {
+ var_s1->unk4 = (s32) 1U;
play_sound2(0x4900801C);
} else {
- phi_s1->visible = 0;
+ var_s1->visible = 0;
}
break;
default: /* switch 9 */
case 1: /* switch 9 */
- phi_s1->visible = 1;
+ var_s1->visible = 1;
break;
}
break;
case 0xA: /* switch 8 */
- func_800AA280(phi_s1);
+ func_800AA280(var_s1);
break;
case 0x10: /* switch 8 */
case 0x11: /* switch 8 */
@@ -12000,20 +11764,20 @@ block_7:
case OPTIONS_SELECTION: /* switch 5 */
case DATA_SELECTION: /* switch 5 */
case PLAYER_NUM_SELECTION: /* switch 5 */
- func_800A9B9C(phi_s1);
+ func_800A9B9C(var_s1);
break;
case GAME_MODE_SELECTION: /* switch 5 */
case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: /* switch 5 */
case CONFIRM_OK_SELECTION: /* switch 5 */
case CONFIRM_OK_SELECTION_FROM_BACK_OUT: /* switch 5 */
case TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT: /* switch 5 */
- func_800A9C40(phi_s1);
+ func_800A9C40(var_s1);
break;
}
break;
case 0xF: /* switch 8 */
- func_800AA280(phi_s1);
- func_800A9A98(phi_s1);
+ func_800AA280(var_s1);
+ func_800A9A98(var_s1);
break;
case 0xB: /* switch 8 */
case 0xC: /* switch 8 */
@@ -12023,17 +11787,17 @@ block_7:
case OPTIONS_SELECTION: /* switch 6 */
case DATA_SELECTION: /* switch 6 */
case PLAYER_NUM_SELECTION: /* switch 6 */
- func_800A9B9C(phi_s1);
+ func_800A9B9C(var_s1);
break;
case GAME_MODE_SELECTION: /* switch 6 */
case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: /* switch 6 */
case CONFIRM_OK_SELECTION: /* switch 6 */
case CONFIRM_OK_SELECTION_FROM_BACK_OUT: /* switch 6 */
case TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT: /* switch 6 */
- func_800A9C40(phi_s1);
+ func_800A9C40(var_s1);
break;
}
- func_800A9D5C(phi_s1);
+ func_800A9D5C(var_s1);
break;
case 0x12: /* switch 8 */
case 0x13: /* switch 8 */
@@ -12043,16 +11807,16 @@ block_7:
case 0x17: /* switch 8 */
case 0x18: /* switch 8 */
case 0x19: /* switch 8 */
- func_800A9E58(phi_s1);
+ func_800A9E58(var_s1);
break;
case 0x1B: /* switch 8 */
- func_800AA2EC(phi_s1);
+ func_800AA2EC(var_s1);
break;
case 0x34: /* switch 8 */
case 0x35: /* switch 8 */
case 0x36: /* switch 8 */
case 0x37: /* switch 8 */
- func_800AADD4(phi_s1);
+ func_800AADD4(var_s1);
break;
case 0x2B: /* switch 8 */
case 0x2C: /* switch 8 */
@@ -12062,8 +11826,8 @@ block_7:
case 0x30: /* switch 8 */
case 0x31: /* switch 8 */
case 0x32: /* switch 8 */
- func_800AAC18(phi_s1);
- temp_t3 = phi_s1->type;
+ func_800AAC18(var_s1);
+ temp_t3 = var_s1->type;
switch (temp_t3) { /* switch 7 */
case 43: /* switch 7 */
case 44: /* switch 7 */
@@ -12073,38 +11837,38 @@ block_7:
case 48: /* switch 7 */
case 49: /* switch 7 */
case 50: /* switch 7 */
- func_800AA69C(phi_s1);
+ func_800AA69C(var_s1);
break;
}
temp_v0_4 = D_8018EDEE;
switch (temp_v0_4) { /* switch 10; irregular */
case 1: /* switch 10 */
- func_800AAB90(phi_s1);
+ func_800AAB90(var_s1);
break;
case 2: /* switch 10 */
case 3: /* switch 10 */
- func_800AAA9C(phi_s1);
+ func_800AAA9C(var_s1);
break;
}
- func_800AAE18(phi_s1);
+ func_800AAE18(var_s1);
break;
case 0x33: /* switch 8 */
case 0x5D: /* switch 8 */
- func_800A9A98(phi_s1);
+ func_800A9A98(var_s1);
break;
case 0x53: /* switch 8 */
case 0x54: /* switch 8 */
case 0x55: /* switch 8 */
case 0x56: /* switch 8 */
- func_800AB164(phi_s1);
+ func_800AB164(var_s1);
temp_v0_5 = D_8018EDEC;
switch (temp_v0_5) { /* switch 11; irregular */
case 1: /* switch 11 */
- func_800AB020(phi_s1);
+ func_800AB020(var_s1);
break;
case 2: /* switch 11 */
case 3: /* switch 11 */
- func_800AB098(phi_s1);
+ func_800AB098(var_s1);
break;
}
break;
@@ -12112,33 +11876,33 @@ block_7:
case 0x59: /* switch 8 */
case 0x5A: /* switch 8 */
case 0x5B: /* switch 8 */
- func_800AB260(phi_s1);
+ func_800AB260(var_s1);
break;
case 0x64: /* switch 8 */
- func_800AB314(phi_s1);
+ func_800AB314(var_s1);
break;
case 0x5F: /* switch 8 */
case 0x60: /* switch 8 */
case 0x61: /* switch 8 */
case 0x62: /* switch 8 */
- func_800AB290(phi_s1);
+ func_800AB290(var_s1);
break;
case 0x65: /* switch 8 */
case 0x66: /* switch 8 */
- func_800AB904(phi_s1);
+ func_800AB904(var_s1);
break;
case 0x67: /* switch 8 */
- func_800AB9B0(phi_s1);
+ func_800AB9B0(var_s1);
break;
case 0x78: /* switch 8 */
case 0x79: /* switch 8 */
case 0x7A: /* switch 8 */
case 0x7B: /* switch 8 */
case 0x8C: /* switch 8 */
- func_800ABAE8(phi_s1);
+ func_800ABAE8(var_s1);
break;
case 0x8D: /* switch 8 */
- func_800ABB24(phi_s1);
+ func_800ABB24(var_s1);
break;
case 0x7C: /* switch 8 */
case 0x7D: /* switch 8 */
@@ -12156,82 +11920,82 @@ block_7:
case 0x89: /* switch 8 */
case 0x8A: /* switch 8 */
case 0x8B: /* switch 8 */
- func_800ABBCC(phi_s1);
+ func_800ABBCC(var_s1);
break;
case 0x96: /* switch 8 */
- func_800ABC38(phi_s1);
+ func_800ABC38(var_s1);
break;
case 0x97: /* switch 8 */
- func_800ABEAC(phi_s1);
+ func_800ABEAC(var_s1);
break;
case 0x5E: /* switch 8 */
- func_800AC300(phi_s1);
+ func_800AC300(var_s1);
break;
case 0xAA: /* switch 8 */
- func_800AC324(phi_s1);
+ func_800AC324(var_s1);
break;
case 0xAB: /* switch 8 */
- func_800AC458(phi_s1);
+ func_800AC458(var_s1);
break;
case 0xAC: /* switch 8 */
- func_800ACA14(phi_s1);
+ func_800ACA14(var_s1);
break;
case 0xAF: /* switch 8 */
- func_800AC978(phi_s1);
+ func_800AC978(var_s1);
break;
case 0xB0: /* switch 8 */
- func_800ACC50(phi_s1);
+ func_800ACC50(var_s1);
break;
case 0xB1: /* switch 8 */
case 0xB2: /* switch 8 */
case 0xB3: /* switch 8 */
case 0xB4: /* switch 8 */
- func_800ACF40(phi_s1);
+ func_800ACF40(var_s1);
break;
case 0xB9: /* switch 8 */
- func_800AD1A4(phi_s1);
+ func_800AD1A4(var_s1);
break;
case 0xBA: /* switch 8 */
- func_800AD2E8(phi_s1);
+ func_800AD2E8(var_s1);
break;
case 0xBC: /* switch 8 */
- func_800AEC54(phi_s1);
+ func_800AEC54(var_s1);
break;
case 0xC7: /* switch 8 */
- func_800ADF48(phi_s1);
+ func_800ADF48(var_s1);
break;
case 0xBD: /* switch 8 */
- func_800AE218(phi_s1);
+ func_800AE218(var_s1);
break;
case 0xE6: /* switch 8 */
- func_800AEDBC(phi_s1);
+ func_800AEDBC(var_s1);
break;
case 0xE8: /* switch 8 */
- func_800AEE90(phi_s1);
+ func_800AEE90(var_s1);
break;
case 0xE9: /* switch 8 */
- func_800AEEBC(phi_s1);
+ func_800AEEBC(var_s1);
break;
case 0xEA: /* switch 8 */
- func_800AEEE8(phi_s1);
+ func_800AEEE8(var_s1);
break;
case 0xBE: /* switch 8 */
- func_800AEF14(phi_s1);
+ func_800AEF14(var_s1);
break;
case 0x10E: /* switch 8 */
- func_800AEF74(phi_s1);
+ func_800AEF74(var_s1);
break;
case 0x12B: /* switch 8 */
- func_800AF004(phi_s1);
+ func_800AF004(var_s1);
break;
case 0x12C: /* switch 8 */
case 0x12D: /* switch 8 */
case 0x12E: /* switch 8 */
case 0x12F: /* switch 8 */
- func_800AF1AC(phi_s1);
+ func_800AF1AC(var_s1);
break;
case 0x130: /* switch 8 */
- func_800AF270(phi_s1);
+ func_800AF270(var_s1);
break;
case 0x190: /* switch 8 */
case 0x191: /* switch 8 */
@@ -12296,37 +12060,35 @@ block_7:
case 0x1CC: /* switch 8 */
case 0x1CD: /* switch 8 */
case 0x1CE: /* switch 8 */
- func_800AF480(phi_s1);
+ func_800AF480(var_s1);
break;
}
}
- temp_s1 = phi_s1 + 0x28;
- phi_s1 = temp_s1;
- } while (temp_s1 != D_8018DEE0);
- phi_s0 = 0;
+ var_s1 += 0x28;
+ } while (var_s1 != D_8018DEE0);
+ var_s0 = 0;
do {
- phi_s1_2 = D_8018D9E0;
+ var_s1_2 = D_8018D9E0;
loop_113:
- temp_v0_6 = phi_s1_2->type;
- if ((temp_v0_6 == 4) || (temp_v0_6 == 5) || (temp_v0_6 == 0xC7)) {
+ temp_v0_6 = var_s1_2->type;
+ var_v1_2 = 0;
+ if ((temp_v0_6 == 4) || (temp_v0_6 == 5) || (temp_v0_6 == 0x000000C7)) {
if (arg0 != 0) {
goto block_119;
}
} else if (arg0 == 0) {
block_119:
- phi_v1_2 = 1U;
+ var_v1_2 = 1;
}
- if ((phi_v1_2 != 0) && (phi_s0 == phi_s1_2->priority)) {
- func_8009F5E0(phi_s1_2);
+ if ((var_v1_2 != 0) && (var_s0 == (s8) var_s1_2->priority)) {
+ func_8009F5E0(var_s1_2);
}
- temp_s1_2 = phi_s1_2 + 0x28;
- phi_s1_2 = temp_s1_2;
- if (temp_s1_2 != D_8018DEE0) {
+ var_s1_2 += 0x28;
+ if (var_s1_2 != D_8018DEE0) {
goto loop_113;
}
- temp_s0 = phi_s0 + 1;
- phi_s0 = temp_s0;
- } while (temp_s0 != 0x10);
+ var_s0 += 1;
+ } while (var_s0 != 0x10);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A7A4C.s")
@@ -12559,16 +12321,16 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A874C.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
void func_800A890C(s32 arg0, struct_8018D9E0_entry *arg1) {
Gfx *temp_v0;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
+ Gfx *var_v0;
s32 temp_a2;
s32 temp_t0;
s32 temp_t1;
s32 temp_t7;
- Gfx *phi_v0;
temp_t1 = arg1->unk1C;
if (temp_t1 < 0x20) {
@@ -12589,14 +12351,14 @@ void func_800A890C(s32 arg0, struct_8018D9E0_entry *arg1) {
temp_v0_3->words.w1 = 0xFFFCF279;
if (arg0 == gCupSelection) {
if (D_8018EDEC == 1) {
- phi_v0 = func_800959A0(gDisplayListHead, temp_t0 + temp_t7, temp_a2, (temp_t0 - temp_t7) + 0x40, temp_a2 + 0x27);
+ var_v0 = func_800959A0(gDisplayListHead, temp_t0 + temp_t7, temp_a2, (temp_t0 - temp_t7) + 0x40, temp_a2 + 0x27);
} else {
- phi_v0 = func_80098C18(gDisplayListHead, temp_t0 + temp_t7, temp_a2, (temp_t0 - temp_t7) + 0x40, temp_a2 + 0x27, 0xFF, 0xF9, 0xDC, 0xFF);
+ var_v0 = func_80098C18(gDisplayListHead, temp_t0 + temp_t7, temp_a2, (temp_t0 - temp_t7) + 0x40, temp_a2 + 0x27, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF);
}
} else {
- phi_v0 = func_80098C18(gDisplayListHead, temp_t0 + temp_t7, temp_a2, (temp_t0 - temp_t7) + 0x40, temp_a2 + 0x27, 1, 1, 1, 0xFF);
+ var_v0 = func_80098C18(gDisplayListHead, temp_t0 + temp_t7, temp_a2, (temp_t0 - temp_t7) + 0x40, temp_a2 + 0x27, 1, 1, 1, 0x000000FF);
}
- gDisplayListHead = phi_v0;
+ gDisplayListHead = var_v0;
}
}
#else
@@ -12604,20 +12366,19 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A890C.s")
#endif
#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-static ? D_800E7208; /* unable to generate initializer; const */
+//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
+static ? D_800E7208; /* unable to generate initializer */
void func_800A8A98(struct_8018D9E0_entry *arg0) {
+ ? *var_s0;
Gfx *temp_v0;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
+ Gfx *var_v0;
s32 temp_s2;
s32 temp_s3;
- s32 temp_s4;
s8 temp_v0_4;
- s32 phi_s4;
- ? *phi_s0;
- Gfx *phi_v0;
+ s8 var_s4;
temp_v0 = gDisplayListHead;
temp_s2 = arg0->column;
@@ -12631,25 +12392,24 @@ void func_800A8A98(struct_8018D9E0_entry *arg0) {
temp_v0_2->words.w1 = 0x0F0A4000;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
+ var_s0 = &D_800E7208;
+ var_s4 = 0;
temp_v0_3->words.w0 = 0xFCFFFFFF;
temp_v0_3->words.w1 = 0xFFFCF279;
- phi_s4 = 0;
- phi_s0 = &D_800E7208;
do {
- if ((phi_s4 == gCupCourseSelection) && (temp_v0_4 = D_8018EDEC, (((s32) temp_v0_4 < 2) == 0)) && (gModeSelection != GRAND_PRIX)) {
+ if ((var_s4 == gCupCourseSelection) && (temp_v0_4 = D_8018EDEC, ((temp_v0_4 < 2) == 0)) && (gModeSelection != GRAND_PRIX)) {
if ((temp_v0_4 == 2) || (temp_v0_4 == 4)) {
- phi_v0 = func_800959A0(gDisplayListHead, phi_s0->unk0 + temp_s2, phi_s0->unk2 + temp_s3, phi_s0->unk8 + temp_s2, phi_s0->unkA + temp_s3);
+ var_v0 = func_800959A0(gDisplayListHead, var_s0->unk0 + temp_s2, var_s0->unk2 + temp_s3, var_s0->unk8 + temp_s2, var_s0->unkA + temp_s3);
} else {
- phi_v0 = func_80098C18(gDisplayListHead, phi_s0->unk0 + temp_s2, phi_s0->unk2 + temp_s3, phi_s0->unk8 + temp_s2, phi_s0->unkA + temp_s3, 0xFF, 0xF9, 0xDC, 0xFF);
+ var_v0 = func_80098C18(gDisplayListHead, var_s0->unk0 + temp_s2, var_s0->unk2 + temp_s3, var_s0->unk8 + temp_s2, var_s0->unkA + temp_s3, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF);
}
} else {
- phi_v0 = func_80098C18(gDisplayListHead, phi_s0->unk0 + temp_s2, phi_s0->unk2 + temp_s3, phi_s0->unk8 + temp_s2, phi_s0->unkA + temp_s3, 1, 1, 1, 0xFF);
+ var_v0 = func_80098C18(gDisplayListHead, var_s0->unk0 + temp_s2, var_s0->unk2 + temp_s3, var_s0->unk8 + temp_s2, var_s0->unkA + temp_s3, 1, 1, 1, 0x000000FF);
}
- gDisplayListHead = phi_v0;
- temp_s4 = phi_s4 + 1;
- phi_s4 = temp_s4;
- phi_s0 += 0x10;
- } while (temp_s4 != 4);
+ gDisplayListHead = var_v0;
+ var_s4 += 1;
+ var_s0 += 0x10;
+ } while (var_s4 != 4);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A8A98.s")
@@ -12966,16 +12726,17 @@ void func_800A954C(struct_8018D9E0_entry *arg0) {
}
}
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
-static MkAnimation *D_800E7D34[6] = { D_0200198C, D_0200199C, D_020019AC, D_020019BC, D_020019CC, D_020019DC }; /* const */
+#ifdef NEEDS_RODATA
+// data_0DD0A0_2_0.s
+// I think this is rodata?
+extern MkAnimation *D_800E7D34[6];// = { D_0200198C, D_0200199C, D_020019AC, D_020019BC, D_020019CC, D_020019DC }; /* const */
+// data_0DD0A0_3_0.s
+// jpt_800F24C8
void func_800A9710(struct_8018D9E0_entry *arg0) {
- s8 temp_t6;
s32 phi_v0;
- temp_t6 = gControllerPakMenuSelection;
- switch (temp_t6) {
+ switch (gControllerPakMenuSelection) {
case CONTROLLER_PAK_MENU_ERASE:
case CONTROLLER_PAK_MENU_QUIT:
phi_v0 = 1;
@@ -12999,7 +12760,6 @@ void func_800A9710(struct_8018D9E0_entry *arg0) {
}
if (phi_v0 != arg0->unk4) {
arg0->unk4 = phi_v0;
- arg0 = arg0;
func_8009A594(arg0->D_8018DEE0_index, 0, segmented_to_virtual_dupe_2(D_800E7D34[phi_v0]));
}
}
@@ -13927,33 +13687,23 @@ block_13:
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AAA9C.s")
#endif
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 054f217e0ef630f2a2a76ec70a84ce37369571c0
+#ifdef NEEDS_RODATA
+// data_0DD0A0_3_0.s
+// jpt_800F25CC
void func_800AAB90(struct_8018D9E0_entry *arg0) {
- s32 temp_t2;
- s32 temp_t6;
- s32 temp_v0;
-
- temp_t6 = arg0->unk4;
- switch (temp_t6) {
+ switch (arg0->unk4) {
case 1:
if (arg0->unk1C > 0) {
arg0->unk4 = 3;
}
break;
- default:
- case 0:
- case 4:
- break;
case 2:
arg0->unk4 = 4;
break;
case 3:
- temp_v0 = arg0->unk1C;
- if (temp_v0 > 0) {
- temp_t2 = (temp_v0 - (temp_v0 / 12)) - 2;
- arg0->unk1C = temp_t2;
- if (temp_t2 < 0) {
+ if (arg0->unk1C > 0) {
+ arg0->unk1C = (arg0->unk1C - (arg0->unk1C / 12)) - 2;
+ if (arg0->unk1C < 0) {
arg0->unk1C = 0;
}
} else {
@@ -13961,6 +13711,10 @@ void func_800AAB90(struct_8018D9E0_entry *arg0) {
arg0->unk4 = 0;
}
break;
+ case 0:
+ case 4:
+ default:
+ break;
}
}
#else
@@ -14183,74 +13937,50 @@ void func_800AAF94(struct_8018D9E0_entry *arg0, s32 arg1) {
arg0->row = temp_v0->row;
}
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
-extern s8 gCharacterGridSelections;
-
s32 func_800AAFCC(s32 arg0) {
- s32 temp_v1;
- s8 *phi_a2;
- s32 phi_v1;
- s32 phi_v0;
- s32 phi_v1_2;
+ s32 someIndex = 0;
+ s32 ret = 0;
- phi_a2 = &gCharacterGridSelections;
- phi_v1 = 0;
- phi_v0 = 0;
-loop_1:
- phi_v1_2 = phi_v1;
- if ((arg0 + 1) == *phi_a2) {
- phi_v0 = 1;
- } else {
- temp_v1 = phi_v1 + 1;
- phi_a2 += 1;
- phi_v1 = temp_v1;
- phi_v1_2 = temp_v1;
- if (temp_v1 != 4) {
- goto loop_1;
+ for (; someIndex < 4; someIndex++) {
+ if ((arg0 + 1) == gCharacterGridSelections[someIndex]) {
+ ret = 1;
+ break;
}
}
- if (phi_v0 != 0) {
- return phi_v1_2;
+
+ if (ret != 0) {
+ return someIndex;
}
+
return -1;
}
-#else
-GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AAFCC.s")
-#endif
-#ifdef MIPS_TO_C
-//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
+#ifdef NEEDS_RODATA
+// data_0DD0A0_3_0.s
+// jpt_800F25F4
void func_800AB020(struct_8018D9E0_entry *arg0) {
- s32 temp_t0;
- s32 temp_t6;
- s32 temp_v0;
-
- temp_t6 = arg0->unk4;
- switch (temp_t6) {
+ switch (arg0->unk4) {
case 1:
arg0->unk4 = 4;
/* fallthrough */
case 4:
- temp_v0 = arg0->unk1C;
- if (temp_v0 > 0) {
- temp_t0 = (temp_v0 - (temp_v0 / 12)) - 2;
- arg0->unk1C = temp_t0;
- if (temp_t0 < 0) {
+ if (arg0->unk1C > 0) {
+ arg0->unk1C = (arg0->unk1C - (arg0->unk1C / 12)) - 2;
+ if (arg0->unk1C < 0) {
arg0->unk1C = 0;
- return;
}
- default:
- case 0:
- case 3:
- return;
+ } else {
+ arg0->unk1C = 0;
+ arg0->unk4 = 0;
}
- arg0->unk1C = 0;
- arg0->unk4 = 0;
- return;
+ break;
case 2:
arg0->unk4 = 3;
break;
+ case 0:
+ case 3:
+ default:
+ break;
}
}
#else
diff --git a/src/code_80091750.h b/src/code_80091750.h
index a3a14e18f..b9958fb6b 100644
--- a/src/code_80091750.h
+++ b/src/code_80091750.h
@@ -127,8 +127,9 @@ void func_8009A640(s32, s32, s32, MkAnimation*);
void func_8009A6D4();
void func_8009A76C(s32, s32, s32, s32);
void func_8009A7EC(s32, s32, s32, s32, s32);
-void func_8009A878(struct_8018DEE0_entry*);
-void func_8009A944(struct_8018DEE0_entry*, s32);
+MkTexture *func_8009A878(struct_8018DEE0_entry*);
+MkTexture *func_8009A944(struct_8018DEE0_entry*, s32);
+s32 func_8009B8C4(u64*);
void func_8009B938();
void func_8009B954(MkTexture*);
void func_8009B998();
@@ -148,6 +149,7 @@ void func_8009E280();
void func_8009E5BC();
void func_8009E620();
void add_8018D9E0_entry(s32, s32, s32, s8);
+void func_800A08D8(u8, s32, s32);
void func_800A0AD0(struct_8018D9E0_entry*);
void func_800A11D0(struct_8018D9E0_entry*, s32, s32);
void func_800A15EC(struct_8018D9E0_entry*);
@@ -186,14 +188,18 @@ void func_800A939C(struct_8018D9E0_entry*, s32);
void func_800A940C(struct_8018D9E0_entry*, s32);
void func_800A94C8(struct_8018D9E0_entry*, s32, s32);
void func_800A954C(struct_8018D9E0_entry*);
+void func_800A9710(struct_8018D9E0_entry*);
+void func_800AAB90(struct_8018D9E0_entry*);
void func_800AADD4(struct_8018D9E0_entry*);
void func_800AAE18(struct_8018D9E0_entry*);
struct_8018D9E0_entry *func_800AAE68();
struct_8018D9E0_entry *func_800AAEB4(s32);
struct_8018D9E0_entry *find_8018D9E0_entry_dupe(s32);
struct_8018D9E0_entry *find_8018D9E0_entry(s32);
-s32 func_800AAF70(s32);
+s32 func_800AAF70(s32);
void func_800AAF94(struct_8018D9E0_entry*, s32);
+s32 func_800AAFCC(s32);
+void func_800AB020(struct_8018D9E0_entry*);
void func_800AB098(struct_8018D9E0_entry*);
void func_800AB260(struct_8018D9E0_entry*);
void func_800AB290(struct_8018D9E0_entry*);
@@ -264,6 +270,7 @@ extern f32 D_800F24B4;
extern f32 D_800F24B8;
extern f64 D_800F24C0;
extern s32 D_80165754;
+extern s32 D_8018D9B0;
extern s8 D_8018D9D9;
extern struct_8018D9E0_entry D_8018D9E0[D_8018D9E0_SIZE]; // D_8018D9E0
extern struct_8018DEE0_entry D_8018DEE0[D_8018DEE0_SIZE]; // D_8018DEE0