diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2022-07-11 01:02:41 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-11 00:02:41 -0700 |
| commit | fd7941e84162c26b3f3f879bf4aaa6120f5b17db (patch) | |
| tree | f2f4c65c6ff664af7fe1eef9c829236dc148f1ed /src/code_80086E70.c | |
| parent | a8e984d2fd99150f5c9fe08af67f17edc6d8a0d3 (diff) | |
Split out some unused asm and documented main.c (#242)
* Splitting out unused asm
* Documented main.c
Diffstat (limited to 'src/code_80086E70.c')
| -rw-r--r-- | src/code_80086E70.c | 225 |
1 files changed, 203 insertions, 22 deletions
diff --git a/src/code_80086E70.c b/src/code_80086E70.c index 7ff30fd0b..bb261d2d5 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -1668,6 +1668,29 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008A1D0.s") #endif #ifdef MIPS_TO_C +void func_8008A2CC(s32 arg0, s32 arg1, u16 arg2) { + Camera sp1C; + u16 var_a2; + // camera1[arg1]? m2c said this, but makes no sense. camera1->unk000 = arg1? would make sense. + sp1C = cameras[arg1]; + func_800721E8(0x40000); + if (sp18 < 0x2711U) { + var_a2 = 0x5555; + } else { + var_a2 = arg2; + if (sp18 < 0x9C41U) { + var_a2 = 0x4000; + } + } + if (func_8008A140(arg0, sp1C, var_a2) != 0) { + func_800721C0(arg0, 0x40000); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008A2CC.s") +#endif + +#ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800721C0(s32, ?); // extern ? func_800721E8(?); // extern @@ -1775,6 +1798,28 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008A4CC.s") #endif #ifdef MIPS_TO_C +void func_8008A610(s32 arg0) { + s32 var_s0; + s32 var_s1; + + func_800721E8(0x40000); + var_s0 = camera1; + var_s1 = 0; + if (gPlayerCountSelection1 > 0) { + do { + if ((((arg0 * 0xE0) + &D_80165C18)->unkA6 != 0) && (func_8008A140(arg0, var_s0, 0x2AAB) != 0)) { + func_800721C0(arg0, 0x40000); + } + var_s1 += 1; + var_s0 += 0xB8; + } while (var_s1 < gPlayerCountSelection1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008A610.s") +#endif + +#ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800721C0(s32, ?); // extern ? func_800721E8(?); // extern @@ -1815,6 +1860,27 @@ void func_8008A6DC(s32 arg0, f32 arg1) { #else GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008A6DC.s") #endif +void func_8008A6DC(s32, f32); +UNUSED void func_8008A810(s32 arg0) { + func_8008A6DC(arg0, 500.0f); +} + +UNUSED void func_8008A830(s32 arg0) { + func_8008A6DC(arg0, 1000.0f); +} + +UNUSED void func_8008A850(s32 arg0) { + func_8008A6DC(arg0, 2000.0f); +} + +struct struct_8008A870 { + s8 unk0[0x119]; + u16 unk11A; +}; + +UNUSED s32 func_8008A870(struct struct_8008A870 *arg0) { + return func_802ABD40(arg0->unk11A); +} s32 func_8008A890(struct UnkStruct8008A890 *arg0) { return func_802ABD40(arg0->value); @@ -1949,6 +2015,55 @@ void func_8008AB10(s32 arg0) { GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008AB10.s") #endif +extern struct struct_E0 D_80165CC6[]; +UNUSED void func_8008ABC0(s32 arg0) { + switch (D_80165CC6[arg0].unk00.s16) { + case 1: + func_8008AA3C(); + break; + case 2: + func_8008AB10(); + break; + case 3: + func_80086F60(arg0); + /* fallthrough */ + case 0: + break; + } +} + +UNUSED void func_8008AC40(s32 arg0) { + switch (D_80165CC6[arg0].unk00.s16) { + case 1: + func_8008AA3C(); + break; + case 2: + func_8008AB10(); + break; + case 3: + func_8008701C(arg0, 1); + /* fallthrough */ + case 0: + break; + } +} + +UNUSED void func_8008ACC0(void) { + +} + +UNUSED void func_8008ACC8(void) { + +} + +UNUSED void func_8008ACD0(void) { + +} + +UNUSED void func_8008ACD8(void) { + +} + #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern f64 D_800EF4F8; @@ -1975,6 +2090,14 @@ void func_8008ACE0(void *arg0, f32 arg1) { GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008ACE0.s") #endif +UNUSED void func_8008ADC0(void) { + +} + +UNUSED void func_8008ADC8(void) { + +} + #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_8008ADD0(void *arg0, f32 arg1) { @@ -1996,6 +2119,14 @@ void func_8008ADD0(void *arg0, f32 arg1) { GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008ADD0.s") #endif +UNUSED void func_8008AE8C(void) { + +} + +UNUSED void func_8008AE94(void) { + +} + #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern ? D_80165760; @@ -2024,19 +2155,28 @@ void func_8008AE9C(s32 arg0) { GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008AE9C.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_8008ADD0(?, ? *, ?); // extern -? func_8008AE9C(s32); // extern -extern ? D_80183DC8; - -void func_8008AFE0(s32 arg0, ? arg1) { - func_8008ADD0(arg1, &D_80183DC8, arg1); +extern s32 D_80183DC8; +void func_8008ADD0(s32, f32); +void func_8008AFE0(s32 arg0, f32 arg1) { + func_8008ADD0(&D_80183DC8, arg1); func_8008AE9C(arg0); } -#else -GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008AFE0.s") -#endif + +UNUSED void func_8008B018(void) { + +} + +UNUSED void func_8008B020(void) { + +} + +UNUSED void func_8008B028(void) { + +} + +UNUSED void func_8008B030(void) { + +} #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -2066,19 +2206,28 @@ void func_8008B038(s32 arg0) { GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008B038.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_8008ACE0(?, ? *, ?); // extern -? func_8008B038(s32); // extern -extern ? D_80183DA8; - -void func_8008B17C(s32 arg0, ? arg1) { - func_8008ACE0(arg1, &D_80183DA8, arg1); +extern s32 D_80183DA8; +void func_8008ACE0(s32,f32); +void func_8008B17C(s32 arg0, f32 arg1) { + func_8008ACE0(&D_80183DA8, arg1); func_8008B038(arg0); } -#else -GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008B17C.s") -#endif + +UNUSED void func_8008B1B4(void) { + +} + +UNUSED void func_8008B1BC(void) { + +} + +UNUSED void func_8008B1C4(void) { + +} + +UNUSED void func_8008B1CC(void) { + +} #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -2454,6 +2603,38 @@ void func_8008BAB4(s32 arg0, s16 arg1, u16 arg2) { GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008BAB4.s") #endif +/* +UNUSED void func_8008BB28(s32 arg0, s16 arg1, u16 arg2) { + *(&D_80165C30 + (arg0 * 0xE0)) = (f32) (arg1 + (s16) (random_int(arg2) - ((s32) arg2 / 2))); +} + +UNUSED void func_8008BB9C(s32 arg0, s16 arg1, s16 arg2, u16 arg3, u16 arg4) { + s16 sp1E; + s32 temp_v0; + void *temp_v1; + + sp1E = random_int(arg3) - ((s32) arg3 / 2); + temp_v0 = random_int(arg4); + temp_v1 = (arg0 * 0xE0) + &D_80165C18; + temp_v1->unk10 = (f32) (arg1 + sp1E); + temp_v1->unk14 = (f32) (arg2 + (s16) (temp_v0 - ((s32) arg4 / 2))); +} + +UNUSED void func_8008BC58(s32 arg0, s16 arg1, s16 arg2, u16 arg3, u16 arg4) { + s16 sp1E; + s32 temp_v0; + void *temp_v1; + + sp1E = random_int(arg3) - ((s32) arg3 / 2); + temp_v0 = random_int(arg4); + temp_v1 = (arg0 * 0xE0) + &D_80165C18; + temp_v1->unk10 = (f32) (arg1 + sp1E); + temp_v1->unk18 = (f32) (arg2 + (s16) (temp_v0 - ((s32) arg4 / 2))); +} +*/ +GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008BB28.s") + + #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern ? D_80165C18; |
