diff options
| author | Maciek Baron <maciej@goodpraxis.uk> | 2022-08-03 02:44:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-02 18:44:33 -0700 |
| commit | 2fe6c6a2f9cf10478f4d7981040a5d858c899fa6 (patch) | |
| tree | 2da34543494071cc2b1f709b1741c5f839efd169 /src/code_80086E70.c | |
| parent | e9383d1b7af77b6ef030935d758617c263f7ce7c (diff) | |
Match a few small functions (#249)
* Match func_8000B820
* Match func_80011AB8
* Match a few small functions
Diffstat (limited to 'src/code_80086E70.c')
| -rw-r--r-- | src/code_80086E70.c | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/src/code_80086E70.c b/src/code_80086E70.c index bb261d2d5..2ba66aa24 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -17,6 +17,9 @@ struct struct_E0 { }; // Size 0xE0 extern struct struct_E0 D_80165CC6[]; +extern s16 D_8018CF68[]; +extern s32 gPlayerCountSelection1; + void func_800721E8(s32, s32); // extern void func_80086E70(s32 arg0) { D_80165CC6[arg0].unk00.s16 = 1;// * 0xE0)) = 1; @@ -1886,38 +1889,19 @@ s32 func_8008A890(struct UnkStruct8008A890 *arg0) { return func_802ABD40(arg0->value); } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern s16 D_8018CF68; - -? func_8008A8B0(s16 arg0, s16 arg1) { - s16 *temp_v0; - s16 temp_a0; - s32 temp_a2; - s16 *phi_v0; - ? phi_v1; - ? phi_v1_2; - - temp_a2 = gPlayerCountSelection1; - phi_v1 = 0; - phi_v1_2 = 0; - if (temp_a2 > 0) { - phi_v0 = &D_8018CF68; - do { - temp_a0 = *phi_v0; - temp_v0 = phi_v0 + 2; - phi_v0 = temp_v0; - if ((temp_a0 >= arg0) && (arg1 >= temp_a0)) { - phi_v1_2 = 1; - } - phi_v1 = phi_v1_2; - } while (temp_v0 < ((temp_a2 * 2) + &D_8018CF68)); +s32 func_8008A8B0(s16 arg0, s16 arg1) { + s32 var_v1; + s16* var_v0; + s32 i; + var_v1 = 0; + for (i = 0; i < gPlayerCountSelection1; i++) { + var_v0 = &D_8018CF68[i]; + if ((*var_v0 >= arg0) && (arg1 >= *var_v0)) { + var_v1 = 1; + } } - return phi_v1; + return var_v1; } -#else -GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008A8B0.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 |
