#include #include #include #include extern Player *gPlayerOne; extern Player *gPlayerTwo; extern Player *gPlayerThree; extern Player *gPlayerFour; extern s16 D_802876D2; s32 func_802832C4(void (*)(s32), s32, s16, s16); void func_80281FA0(Vec3f arg0, f32 arg1, f32 arg2, f32 arg3) { arg0[0] = arg1; arg0[1] = arg2; arg0[2] = arg3; } void func_80281FC0(Vec3s arg0, s16 arg1, s16 arg2, s16 arg3) { arg0[0] = arg1; arg0[1] = arg2; arg0[2] = arg3; } void func_80281FDC(Vec3f arg0) { arg0[2] = 0.0f; arg0[1] = 0.0f; arg0[0] = 0.0f; } void func_80281FF4(Vec3s arg0) { arg0[2] = 0; arg0[1] = arg0[2]; arg0[0] = arg0[2]; } void func_80282008(Vec3f arg0, Vec3f arg1) { arg0[0] = arg1[0]; arg0[1] = arg1[1]; arg0[2] = arg1[2]; } void func_80282024(Vec3s arg0, Vec3s arg1) { arg0[0] = arg1[0]; arg0[1] = arg1[1]; arg0[2] = arg1[2]; } void func_80282040(void) { } void func_80282048(void) { } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282008(f32 *); // extern f32 sins(u16); // extern f32 coss(s32); // extern void func_80282050(Vec3f arg0, UNUSED f32 arg1, u16 arg2) { f32 sp2C; f32 sp28; func_80282008(&sp2C); sp28 = sins(arg2); arg0[0] = (coss(arg2 & 0xFFFF) * sp2C) + (sp34 * sp28); arg0[1] = sp30; sp28 = coss(arg2 & 0xFFFF); arg0[2] = (sp34 * sp28) - (sins(arg2 & 0xFFFF) * sp2C); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282050.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282008(f32 *); // extern f32 sins(s32); // extern f32 coss(u16); // extern void func_802820F8(void *arg0, u16 arg2) { f32 sp2C; f32 sp28; func_80282008(&sp2C); sp28 = coss(arg2); arg0->unk8 = (sp34 * sp28) - (sins(arg2 & 0xFFFF) * sp30); sp28 = sins(arg2 & 0xFFFF); arg0->unk4 = (coss(arg2 & 0xFFFF) * sp30) + (sp34 * sp28); arg0->unk0 = sp2C; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802820F8.s") #endif s32 func_802821A0(f32* arg0, f32 arg1, f32 arg2) { if (arg2 > 1.0f) { arg2 = 1.0f; } *arg0 = *arg0 + ((arg1 - *arg0) * arg2); if (arg1 == *arg0) { return 0; } return 1; } s32 func_80282200(s16* arg0, s16 arg1, s16 arg2) { s16 temp_v0 = *arg0; if (arg2 == 0) { *arg0 = arg1; } else { temp_v0 -= arg1; temp_v0 -= (temp_v0 / arg2); temp_v0 += arg1; *arg0 = temp_v0; } if (arg1 == *arg0) { return 0; } return 1; } s32 func_802822AC(f32* arg0, f32 arg1, f32 arg2) { f32 temp_f0 = arg1 - *arg0; if (arg2 < 0.0f) { arg2 = -1.0f * arg2; } if (temp_f0 > 0.0f) { temp_f0 -= arg2; if (temp_f0 > 0.0f) { *arg0 = arg1 - temp_f0; } else { *arg0 = arg1; } } else { temp_f0 += arg2; if (temp_f0 < 0.0f) { *arg0 = arg1 - temp_f0; } else { *arg0 = arg1; } } if (arg1 == *arg0) { return 0; } return 1; } s32 func_80282364(s16* arg0, s16 arg1, s16 arg2) { s16 temp_v0 = arg1 - *arg0; if (arg2 < 0) { arg2 = arg2 * -1; } if ( temp_v0 > 0) { temp_v0 -= arg2; if (temp_v0 >= 0) { *arg0 = arg1 - temp_v0; } else { *arg0 = arg1; } } else { temp_v0 += arg2; if (temp_v0 <= 0) { *arg0 = arg1 - temp_v0; } else { *arg0 = arg1; } } if (arg1 == *arg0) { return 0; } return 1; } extern f32 D_80287B18; extern s16 D_80287B1C; extern s16 D_80287B1E; extern s8 D_80287B20; void func_8028240C(void) { D_80287B1C = 0; D_80287B18 = 0.0f; D_80287B1E = 0; D_80287B20 = 0; } extern void func_8028240C(); // extern void func_80282434(s32 arg0) { func_8028240C(); } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s16 func_802B7830(f32, f32); // extern void func_80282454(void *arg0, void *arg1, f32 *arg2, s16 *arg3, s16 *arg4) { f32 sp2C; f32 sp28; f32 sp24; f32 sp1C; f32 sp18; f32 temp_f0; f32 temp_f14; f32 temp_f16; f32 temp_f18; f32 temp_f2; temp_f0 = arg1->unk0 - arg0->unk0; temp_f2 = arg1->unk4 - arg0->unk4; temp_f16 = temp_f0 * temp_f0; sp2C = temp_f0; temp_f14 = arg1->unk8 - arg0->unk8; sp28 = temp_f2; temp_f18 = temp_f14 * temp_f14; sp24 = temp_f14; sp1C = temp_f16; sp18 = temp_f18; *arg2 = sqrtf(temp_f16 + (temp_f2 * temp_f2) + temp_f18); *arg3 = func_802B7830(sp28, sqrtf(temp_f16 + temp_f18)); *arg4 = func_802B7830(sp2C, temp_f14); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282454.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 f32 sins(u16); // extern f32 coss(s32); // extern void func_80282504(void *arg0, void *arg1, f32 arg2, s32 arg3, u16 arg4) { f32 sp24; s32 sp20; s32 sp1C; s32 temp_a0; temp_a0 = arg3 & 0xFFFF; sp20 = temp_a0; sp24 = coss(temp_a0); sp1C = arg4; arg1->unk0 = (sins(arg4) * (arg2 * sp24)) + arg0->unk0; arg1->unk4 = (sins(sp22) * arg2) + arg0->unk4; sp24 = coss(sp22); arg1->unk8 = (coss(sp1E) * (arg2 * sp24)) + arg0->unk8; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282504.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282008(? *); // extern f32 sins(u16); // extern f32 coss(u16); // extern void func_802825C8(void *arg0, void *arg1, void *arg2, void *arg3) { ? sp3C; f32 sp38; f32 sp34; f32 sp30; f32 temp_f20; f32 temp_f20_2; f32 temp_f20_3; f32 temp_f20_4; func_80282008(&sp3C); temp_f20 = coss(arg3->unk0); sp38 = -((arg2->unk8 * temp_f20) - (sins(arg3->unk0) * arg2->unk4)); temp_f20_2 = sins(arg3->unk0); sp34 = (coss(arg3->unk0) * arg2->unk4) + (arg2->unk8 * temp_f20_2); sp30 = arg2->unk0; temp_f20_3 = sins(arg3->unk2); arg0->unk0 = (coss(arg3->unk2) * sp30) + (arg1->unk0 + (sp38 * temp_f20_3)); arg0->unk4 = sp34 + arg1->unk4; temp_f20_4 = coss(arg3->unk2); arg0->unk8 = (arg1->unk8 + (sp38 * temp_f20_4)) - (sins(arg3->unk2) * sp30); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802825C8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern f32 D_80287470; extern f32 D_80287474; void func_80282700(f32 arg0, void *arg1, f32 *arg2, void *arg3, void *arg4, void *arg5, void *arg6) { f32 spC; f32 sp8; f32 sp4; f32 sp0; f32 temp_f0; f32 temp_f10; f32 temp_f14; f32 temp_f2; f32 temp_f4; f32 temp_f6; f32 temp_f8; f32 phi_f12; phi_f12 = arg0; if (arg0 > 1.0f) { phi_f12 = 1.0f; } temp_f0 = 1.0f - phi_f12; temp_f2 = phi_f12 * phi_f12; temp_f8 = (temp_f0 * temp_f0 * temp_f0) / 6.0f; temp_f14 = temp_f2 * phi_f12; sp0 = temp_f8; temp_f4 = ((temp_f14 * 0.5f) - temp_f2) + D_80287470; sp4 = temp_f4; temp_f6 = (-phi_f12 * phi_f12 * phi_f12 * 0.5f) + (temp_f2 * 0.5f) + (phi_f12 * 0.5f) + D_80287474; temp_f10 = temp_f14 / 6.0f; sp8 = temp_f6; spC = temp_f10; arg1->unk0 = (arg6->unk0 * temp_f10) + ((temp_f8 * arg3->unk0) + (temp_f4 * arg4->unk0) + (temp_f6 * arg5->unk0)); arg1->unk4 = (arg6->unk4 * spC) + ((sp0 * arg3->unk4) + (sp4 * arg4->unk4) + (sp8 * arg5->unk4)); arg1->unk8 = (arg6->unk8 * spC) + ((temp_f8 * arg3->unk8) + (sp4 * arg4->unk8) + (sp8 * arg5->unk8)); *arg2 = (arg6->unkC * temp_f10) + ((sp0 * arg3->unkC) + (sp4 * arg4->unkC) + (temp_f6 * arg5->unkC)); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282700.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282700(f32, f32, s32, s32, f32 *, f32 *, f32 *, f32 *); // extern s32 func_802828C8(s32 arg0, s32 arg1, s32 arg2, s16 *arg3, f32 *arg4) { s32 sp94; f32 sp90; f32 sp8C; f32 sp88; f32 sp84; f32 sp80; f32 sp7C; f32 sp78; f32 sp74; f32 sp70; f32 sp6C; f32 sp68; f32 sp64; f32 sp60; f32 sp5C; f32 sp58; f32 sp54; f32 sp44; f32 sp40; f32 *temp_a3; f32 *temp_t9; f32 temp_f0; s16 temp_v1; u16 temp_v1_2; u16 temp_v1_3; void *temp_v0; void *temp_v0_2; void *temp_v0_3; f32 phi_f12; f32 phi_f16; f32 phi_f14; s32 phi_t1; temp_v1 = *arg3; phi_f12 = *arg4; phi_f16 = 0.0f; phi_f14 = 0.0f; phi_t1 = 0; phi_t1 = 0; if (temp_v1 < 0) { phi_f12 = 0.0f; } temp_v0 = arg2 + (temp_v1 * 0xC); if ((temp_v0->unk0 == -1) || (temp_v0->unkC == -1) || (temp_v0->unk18 == -1)) { return 1; } temp_v0_2 = arg2 + (temp_v1 * 0xC); temp_a3 = &sp54; sp54 = temp_v0_2->unk6; sp58 = temp_v0_2->unk8; sp5C = temp_v0_2->unkA; sp60 = temp_v0_2->unk4 * 256.0f; sp64 = temp_v0_2->unk12; sp68 = temp_v0_2->unk14; sp6C = temp_v0_2->unk16; sp70 = temp_v0_2->unk10 * 256.0f; sp74 = temp_v0_2->unk1E; sp78 = temp_v0_2->unk20; sp7C = temp_v0_2->unk22; temp_t9 = &sp84; sp80 = temp_v0_2->unk1C * 256.0f; sp84 = temp_v0_2->unk2A; sp88 = temp_v0_2->unk2C; sp8C = temp_v0_2->unk2E; sp40 = 0.0f; sp44 = 0.0f; sp94 = 0; sp90 = temp_v0_2->unk28 * 256.0f; func_80282700(phi_f12, 0.0f, arg0, arg1, temp_a3, &sp64, &sp74, temp_t9); temp_v0_3 = arg2 + (*arg3 * 0xC); temp_v1_2 = temp_v0_3->unkE; if (temp_v1_2 != 0) { phi_f14 = 1.0f / temp_v1_2; } temp_v1_3 = temp_v0_3->unk1A; if (temp_v1_3 != 0) { phi_f16 = 1.0f / temp_v1_3; } temp_f0 = *arg4; *arg4 = temp_f0 + ((temp_f0 * (phi_f16 - phi_f14)) + phi_f14); if (*arg4 >= 1.0f) { *arg3 = *arg3 + 1; if ((arg2 + (*arg3 * 0xC))->unk24 == -1) { *arg3 = 0; phi_t1 = 1; } *arg4 = *arg4 - 1.0f; } return phi_t1; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802828C8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80282BE4(void *arg0, s8 arg1, s32 arg2, s8 arg3, s16 *arg4, s32 arg5) { arg0->unk0 = arg1; arg0->unk2 = arg2 & 0xFF; arg0->unk4 = arg3; if (arg5 != 0) { arg0->unk6 = -*arg4; } else { arg0->unk6 = *arg4; } arg0->unk8 = arg4->unk2; arg0->unkA = arg4->unk4; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282BE4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282BE4(s8, u8, s8, void *, void *, void *); // extern void func_80282C40(s32 arg0, void *arg1, void *arg2) { s32 temp_s1; s8 temp_s2; s8 temp_s3; void *temp_s0; void *temp_s4; s8 phi_s3; s8 phi_s2; void *phi_s0; void *phi_s4; s32 phi_s1; func_80282BE4(arg1->unk0, arg1->unk3, arg1->unk4, arg1 + 6, arg2); phi_s3 = arg0 + 0xC; phi_s2 = arg1->unk0; phi_s0 = arg1; phi_s4 = arg1 + 6; phi_s1 = 1; do { loop_1: func_80282BE4(phi_s3, phi_s2, phi_s0->unk3, phi_s0->unk4, phi_s4, arg2); temp_s2 = phi_s0->unkC; temp_s1 = phi_s1 + 1; temp_s3 = phi_s3 + 0xC; temp_s0 = phi_s0 + 0xC; temp_s4 = phi_s4 + 0xC; phi_s3 = temp_s3; phi_s2 = temp_s2; phi_s0 = temp_s0; phi_s4 = temp_s4; phi_s1 = temp_s1; if (temp_s2 != -1) { goto loop_1; } } while ((temp_s1 + 3) >= 0x1F); func_80282BE4(temp_s3, arg1->unk0, temp_s0->unk3, temp_s0->unk4, temp_s4, arg2); func_80282BE4(temp_s3 + 0xC, arg1->unk0, 0, temp_s0->unk4, temp_s4, arg2); func_80282BE4(temp_s3 + 0x18, arg1->unk0, 0, temp_s0->unk4, temp_s4, arg2); func_80282BE4(temp_s3 + 0x24, -1, 0, temp_s0->unk4, temp_s4, arg2); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282C40.s") #endif extern s32 D_80287818; extern s32 D_80287998; s32 func_80282D90(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { s32 res; func_802832C4(&func_80282434, arg0, 0, 0); func_80282C40(&D_80287818, arg1, arg3); func_80282C40(&D_80287998, arg2, arg3); if (0) {}; // debug stub? res = func_802828C8(arg0 + 0xC, arg0 + 0x18, &D_80287818, &D_80287B1C, &D_80287B18) | func_802828C8(arg0, arg0 + 0x18, &D_80287998, &D_80287B1C, &D_80287B18); return res; } void func_80282E58(s32 arg0, s32 arg1, s32 arg2) { func_80282C40(&D_80287818, arg1, arg2); func_802828C8(arg0 + 0xC, arg0 + 0x18, &D_80287818, &D_80287B1C, &D_80287B18); } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80282EAC(s32 arg0, s32 arg1, s16 arg2, s16 arg3, s16 arg4) { void *temp_v0; if ((arg0 >= 0) && (arg0 < 3)) { temp_v0 = arg1 + (arg0 * 2); if (temp_v0->unk48 < arg2) { temp_v0->unk48 = arg2; temp_v0->unk5A = arg3; temp_v0->unk54 = arg4; } } } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282EAC.s") #endif void func_80282F00(s16 *arg0, s16 arg1) { if (arg1 == -0x8000) { *arg0 = (*arg0 & 0x8000) + 0xC000; return; } *arg0 += arg1; } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80281FA0(?32 *, ?32, ?32, ?32); // extern s32 func_80282364(void *, ?, s16); // extern ? func_80282454(?32 *, ?32 *, s32 *, s16 *, s16 *); // extern ? func_80282504(?32 *, ?32 *, s32, s16, s32); // extern ? func_80282F00(void *, s16); // extern f32 sins(u16); // extern void func_80282F44(s32 arg0, void *arg1, void *arg2) { s32 sp5C; s16 sp52; s16 sp50; ?32 sp44; ?32 sp38; s32 sp30; s16 *temp_v0; s32 temp_t9; void *temp_s0; func_80281FA0(&sp44, arg2->unk0, arg2->unk4, arg2->unk8); func_80281FA0(&sp38, arg2->unkC, arg2->unk10, arg2->unk14); if ((arg0 == 0) || (arg0 == 1)) { if ((arg1->unk48 != 0) || (arg1->unk4A != 0)) { func_80282454(&sp44, &sp38, &sp5C, &sp50, &sp52); temp_t9 = arg0 * 2; temp_s0 = arg1 + temp_t9; sp30 = temp_t9; temp_v0 = sp30 + &sp50; *temp_v0 = *temp_v0 + (temp_s0->unk48 * sins(temp_s0->unk4E)); if ((sp50 < 0x3800) && (sp50 >= -0x37FF)) { func_80282504(&sp44, &sp38, sp5C, sp50, sp52); } func_80282F00(temp_s0 + 0x4E, temp_s0->unk54); if (func_80282364(temp_s0 + 0x48, 0, temp_s0->unk5A) == 0) { temp_s0->unk4E = 0; } } arg2->unkC = sp38; arg2->unk10 = sp3C; arg2->unk14 = sp40; } } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282F44.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_802830B4(void *arg0, s16 arg1, s16 arg2, s16 arg3) { if (arg0->unk60 < arg1) { arg0->unk60 = arg1; arg0->unk6C = arg2; arg0->unk68 = arg3; } } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802830B4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282364(void *, ?, s16, void *); // extern f32 coss(s32, void *); // extern void func_80283100(void *arg0, f32 *arg1) { f32 temp_f4; s32 temp_a0; void *temp_a3; void *phi_a3; temp_a3 = arg0; phi_a3 = temp_a3; if (arg0->unk60 != 0) { temp_a0 = arg0->unk64 & 0xFFFF; arg0 = temp_a3; temp_f4 = (coss(temp_a0, temp_a3) * arg0->unk60) / 256.0f; arg0->unk64 = arg0->unk64 + arg0->unk68; arg0->unk6E = temp_f4; func_80282364(arg0 + 0x60, 0, arg0->unk6C, arg0); phi_a3 = arg0; } else { temp_a3->unk64 = 0.0f; } *arg1 = phi_a3->unk20 + phi_a3->unk6E; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283100.s") #endif extern s32 D_802876E0; void func_80283240(s16 arg0) { if (arg0 == 1) { func_80282EAC(0, &D_802876E0, 0x100, 0x10, 0x4000); func_80282EAC(1, &D_802876E0, 0x80, 0x20, 0x2000); func_802830B4(&D_802876E0, 0x300, 0x20, 0x4000); } } s32 func_802832C4(void (*func_ptr)(s32), s32 arg1, s16 arg2, s16 arg3) { if ((D_802876D2 >= arg2) && ((arg3 == -1) || (arg3 >= D_802876D2))) { func_ptr(arg1); } return 0; } extern s16 D_802876D0; extern s16 D_802876D2; extern s32 D_802876D4; extern s32 D_802876D8; s32 func_80283330(s32 arg0) { if (arg0 != D_802876D8) { D_802876D8 = arg0; D_802876D0 = 0; D_802876D2 = 0; D_802876D4 = 0; } return D_802876D8; } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80283330(?, s32 *); // extern extern ? D_802856D4; extern s8 D_802874F5; extern s32 D_802876D8; s32 func_8028336C(s32 arg0, ? arg1) { ? sp20; s32 temp_v1; s32 temp_v1_2; temp_v1 = D_802876D8; sp20.unk0 = D_802856D4.unk0; sp20.unk4 = D_802856D4.unk4; if (temp_v1 != 0) { return temp_v1; } temp_v1_2 = D_800DC50C; if (temp_v1_2 != 5) { if (temp_v1_2 != 9) { } else { D_802876D8 = 6; } } else { D_802876D8 = *(&sp20 + D_802874F5); } if (temp_v1_2 == 9) { func_80283330(6, &D_802876D8); } return D_802876D8; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_8028336C.s") #endif s32 func_80283428(void) { return 0; } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80281FA0(? *, f32, f32, f32); // extern ? func_80281FDC(? *); // extern ? func_80281FF4(? *); // extern ? func_8028240C(); // extern extern u16 D_800DC5E4; extern f32 D_802856B0; extern f32 D_802856B4; extern f32 D_802856B8; extern f32 D_802856C0; extern s32 D_802856C4; extern s16 D_802876D0; extern s16 D_802876D2; extern s32 D_802876D4; extern s32 D_802876D8; extern ? D_802876E0; extern ? D_802876EC; extern f32 D_802876F8; extern f32 D_80287700; extern ? D_80287704; extern ? D_80287710; extern ? D_8028771C; extern ? D_80287728; extern ? D_8028772E; extern ? D_80287734; extern ? D_8028773A; extern s16 D_80287740; extern f32 D_8028774E; extern ? D_80287750; extern ? D_8028775C; extern ? D_80287818; extern ? D_80287824; extern ? D_80287998; extern ? D_80287B18; void func_80283430(void) { ? *temp_a0; ? *temp_s0; u32 temp_v0; ? *phi_a0; ? *phi_v0; ? *phi_s1; ? *phi_s0; D_802876D8 = 0; D_802876E0.unk1C = 0; D_802856C4 = D_800DC5E4; func_80281FDC(&D_802876EC); func_80281FA0(&D_802876E0, 0.0f, 0.0f, 500.0f); func_80281FDC(&D_80287710); func_80281FA0(&D_80287704, 0.0f, 0.0f, 500.0f); func_80281FA0(&D_8028771C, 0.0f, 1.0f, 0.0f); D_802876F8 = 0.0f; func_80281FF4(&D_80287728); func_80281FF4(&D_8028772E); func_80281FF4(&D_80287734); func_80281FF4(&D_8028773A); D_80287740 = 0; D_80287740 = 0.0f; D_8028774E = 0.0f; D_8028774E = 0; D_8028774E = 0; D_80287700 = D_80150130; D_802876D0 = 0; D_802876D2 = 0; D_802876D4 = 0; func_8028240C(); phi_a0 = &D_80287818; phi_v0 = &D_80287998; do { temp_v0 = phi_v0 + 0xC; temp_a0 = phi_a0 + 0xC; temp_a0->unk-C = -1; temp_v0->unk-C = -1; phi_a0 = temp_a0; phi_v0 = temp_v0; } while (temp_v0 < &D_80287B18); phi_s1 = &D_80287750; phi_s0 = &D_8028775C; do { func_80281FDC(phi_s1); func_80281FF4(phi_s0); temp_s0 = phi_s0 + 0x14; phi_s1 += 0x14; phi_s0 = temp_s0; } while (temp_s0 != &D_80287824); D_802856C0 = 0.0f; if (D_800DC50C == ENDING_SEQUENCE) { D_802856B0 = 120.0f; D_802856B4 = 12.0f; D_802856B8 = 120.0f; return; } D_802856B0 = 98.0f; D_802856B4 = 12.0f; D_802856B8 = 52.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283430.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282008(? *, ? *); // extern ? func_80282454(? *, ? *, s32 *, s16 *, s16 *); // extern ? func_80282504(? *, ? *, s32, s16, s32); // extern ? func_80282F44(?, ? *, ? *); // extern ? func_80283100(? *, f32 *); // extern s32 func_8028336C(? *, ? *); // extern ? func_80283428(); // extern ? func_80284AE8(? *); // extern f32 sins(f32, s32); // extern f32 coss(u16); // extern extern s32 D_802876D8; extern ? D_802876E0; extern ? D_802876EC; extern f32 D_802876F8; extern s8 D_802876FC; extern ? D_80287704; extern ? D_80287710; extern ? D_8028771C; s32 func_80283648(? *arg0) { s16 sp6E; s16 sp6C; s32 sp64; ? sp58; ? sp4C; ? sp40; f32 sp38; ? *sp34; ? *sp30; s32 sp2C; ? *temp_a1; ? *temp_a1_2; f32 temp_f2; s32 temp_t9; s8 temp_v1; s32 phi_a3; s16 phi_a3_2; f32 phi_f2; f32 phi_f2_2; f32 phi_f0; func_80283428(); func_80282008(&sp58, arg0); temp_a1 = arg0 + 0xC; sp34 = temp_a1; func_80282008(&sp4C, temp_a1); temp_a1_2 = arg0 + 0x18; sp30 = temp_a1_2; func_80282008(&sp40, temp_a1_2); temp_v1 = func_8028336C(&D_802876E0, arg0) & 0xFF; D_802876FC = temp_v1; if (temp_v1 != 0) { func_80282008(&D_802876EC, arg0); func_80282008(&D_802876E0, sp34); func_80284AE8(&D_802876E0); func_80282454(&D_802876EC, &D_802876E0, &sp64, &sp6E, &sp6C); phi_a3 = sp6E; if (sp6E >= 0x3800) { phi_a3 = 0x3800; } phi_a3_2 = phi_a3; if (phi_a3 < -0x37FF) { phi_a3_2 = -0x3800; } if ((phi_a3_2 == 0x3800) || (sp6E = phi_a3_2, (phi_a3_2 == -0x3800))) { sp6E = phi_a3_2; func_80282504(&D_802876EC, &D_802876E0, sp64, phi_a3_2, sp6C); } temp_f2 = D_802876F8; phi_f2 = temp_f2; if (temp_f2 > 65536.0f) { phi_f2 = temp_f2 - 65536.0f; } phi_f2_2 = phi_f2; if (phi_f2 < -65536.0f) { phi_f2_2 = phi_f2 + 65536.0f; } D_802876F8 = phi_f2_2; phi_f0 = phi_f2_2; if (phi_f2_2 < 0.0f) { phi_f0 = 65536.0f + phi_f2_2; } temp_t9 = phi_f0 & 0xFFFF; sp2C = temp_t9; sp38 = sins(65536.0f, temp_t9); arg0->unk18 = coss(sp6C) * sp38; arg0->unk1C = coss(sp2E); sp38 = sins((bitwise f32) sp2E); arg0->unk20 = sins((bitwise f32) sp6C) * -sp38; func_80282008(arg0, &D_802876EC); func_80282008(sp34, &D_802876E0); if ((D_800DC50C == CREDITS_SEQUENCE) && (gIsMirrorMode != 0)) { arg0->unk0 = -arg0->unk0; arg0->unkC = -arg0->unkC; } } func_80282F44(0, &D_802876E0, arg0); func_80282F44(1, &D_802876E0, arg0); func_80283100(&D_802876E0, &D_80150130); func_80282008(&D_80287710, arg0); func_80282008(&D_80287704, sp34); func_80282008(&D_8028771C, sp30); return D_802876D8; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283648.s") #endif void func_80283968(s32 arg0) { func_8028100C(-0xC6C, 0xD2, -0x1EF); } void func_80283994(s32 arg0) { func_80280FFC(); } extern f32 D_802856B8; void func_802839B4(s32 arg0) { D_802856B8 = 52.0f; } extern f32 D_802856B8; void func_802839CC(s32 arg0) { D_802856B8 = 0.0f; } void func_802839E0(s32 arg0) { func_80092C80(); } extern u16 D_800DC5E4; void func_80283A00(s32 arg0) { if (D_800DC5E4 == 0) { play_sound2(0x49009009); } } void func_80283A34(s32 arg0) { func_800CA0CC(); } void func_80283A54(s32 arg0) { play_sound2(0x49009014); } void func_80283A7C(s32 arg0) { play_sound2(0x4900801E); } void func_80283AA4(s32 arg0) { play_sound2(0x4900801F); } void func_80283ACC(s32 arg0) { play_sound2(0x49008020); } void func_80283AF4(s32 arg0) { play_sound2(0x49008021); } void func_80283B1C(s32 arg0) { play_sound2(0x49008022); } void func_80283B44(s32 arg0) { play_sound2(0x49008023); } void func_80283B6C(s32 arg0) { func_800CA0B8(); func_800C9060(0, 0x19009005); func_800CA0A0(); } void func_80283BA4(s32 arg0) { func_800CA0B8(); func_800C90F4(0, (gPlayerFour->characterId * 0x10) + 0x29008004); func_800CA0A0(); } void func_80283BF0(s32 arg0) { func_800C8EF8(0x1A); } void func_80283C14(s32 arg0) { func_800C8EF8(0x1B); } void func_80283C38(s32 arg0) { func_800CB134(); } void func_80283C58(s32 arg0) { func_800CB14C(); } extern u16 D_800DC5E4; void func_80283C78(s32 arg0) { if (D_800DC5E4 == 0) { func_800C8EF8(0x1C); } } void func_80283CA8(s32 arg0) { func_800CA008(0, 3); } extern u16 D_800DC5E4; void func_80283CD0(s32 arg0) { if (D_800DC5E4 == 0) { func_800CA008(0, 2); } } void func_80283D04(s32 arg0) { play_sound2(0x49008026); } extern f32 D_802856B8; extern s32 D_802856DC; extern s32 D_80285718; extern s16 D_80285D14; void func_80283D2C(s32 arg0) { D_802856B8 = 120.0f; func_802832C4(&func_80283CA8, arg0, 0, 0); func_802832C4(&func_80283A34, arg0, 1, 1); func_802832C4(&func_80283BF0, arg0, 0, 0); func_802832C4(&func_80283A7C, arg0, 0x2D, 0x2D); func_802832C4(&func_80283A7C, arg0, 0x41, 0x41); func_802832C4(&func_80283A7C, arg0, 0x46, 0x46); func_802832C4(&func_80283A7C, arg0, 0x5E, 0x5E); func_802832C4(&func_80283A7C, arg0, 0x6E, 0x6E); func_802832C4(&func_80283A7C, arg0, 0x82, 0x82); func_802832C4(&func_80283A7C, arg0, 0x98, 0x98); func_802832C4(&func_80283A7C, arg0, 0xA0, 0xA0); func_802832C4(&func_80283994, arg0, D_80285D14 - 0x3C, D_80285D14 - 0x3C); func_80282D90(arg0, &D_802856DC, &D_80285718, 0); } extern s32 D_80285754; extern s32 D_80285784; void func_80283EA0(s32 arg0) { func_80282D90(arg0, &D_80285754, &D_80285784, 0); } void func_80283ED0(Vec3f arg0) { func_80282008(arg0, &gPlayerTwo->posX); } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_802821A0(f32, f32, ?); // extern void func_80283EF8(s32 arg0) { func_802821A0(gPlayerTwo->posX, 0.12f); func_802821A0((bitwise f32) (arg0 + 4), gPlayerTwo->posY, 0x3DF5C28F); func_802821A0((bitwise f32) (arg0 + 8), gPlayerTwo->posZ, 0x3DF5C28F); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283EF8.s") #endif extern s32 D_802857B4; extern void func_80283EF8(); void func_80283F6C(s32 arg0) { func_802832C4(&func_80283ED0, arg0, 0, 0); func_802832C4(&func_80283EF8, arg0, 0, -1); func_80282E58(arg0, &D_802857B4, 0); } void func_80283FCC(Vec3f arg0) { func_80282008(arg0, &gPlayerThree->posX); } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 //? func_802821A0(f32, f32, ?); // extern void func_80283FF4(f32 arg0) { func_802821A0(gPlayerThree->posX, 0.12f); func_802821A0(arg0 + 4, gPlayerThree->posY, 0x3DF5C28F); func_802821A0(arg0 + 8, gPlayerThree->posZ, 0x3DF5C28F); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283FF4.s") #endif extern s32 D_80283FCC; extern s32 D_80283FF4; extern s32 D_802857CC; extern void func_80283FF4(); void func_80284068(s32 arg0) { func_802832C4(&func_80283FCC, arg0, 0, 0); func_802832C4(&func_80283FF4, arg0, 0, -1); func_80282E58(arg0, &D_802857CC, 0); } extern s32 D_802876D8; void func_802840C8(s32 arg0) { func_802832C4(&func_80283C14, arg0, 5, 5); switch(D_802876D8) { case 2: func_80283EA0(arg0); break; case 3: func_80283F6C(arg0); break; case 4: func_80284068(arg0); break; } } extern s32 D_80285910; extern s32 D_80285928; void func_80284154(s32 arg0) { func_80282D90(arg0, &D_80285910, &D_80285928, 0); } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 //? func_802821A0(void *, f32, ?); // extern extern s32 D_80165C20; extern s32 D_80183EAC; extern f32 D_80287478; void func_80284184(s32 *arg0) { f32 temp_f0; temp_f0 = arg0->unk10; func_802821A0(arg0 + 4, temp_f0 + ((*(&D_80165C20 + (D_80183EAC * 0xE0)) - temp_f0) * D_80287478), 0x3F000000); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80284184.s") #endif extern s32 D_80285940; void func_802841E8(Vec3f arg0) { func_80282E58(arg0, &D_80285940, 0); func_80281FA0(arg0, -3202.0f, 90.0f, -478.0f); } extern void func_802841E8(); extern void func_80284184(); void func_8028422C(s32 arg0) { func_802832C4(&func_80283AF4, arg0, 6, 6); func_802832C4(&func_80283B44, arg0, 0x1E, 0x1E); func_802832C4(&func_802841E8, arg0, 0, 0); func_802832C4(&func_80284184, arg0, 6, -1); } extern s32 D_802858B0; extern s32 D_802858C8; void func_802842A8(s32 arg0) { func_80282D90(arg0, &D_802858B0, &D_802858C8, 0); } extern s32 D_802857F0; extern s32 D_80285850; void func_802842D8(s32 arg0) { func_80282D90(arg0, &D_802857F0, &D_80285850, 0); } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80282D90(void *, ? *, ? *, ?); // extern ? func_802832C4(? *, void *, ?, ?); // extern extern ? D_802858E0; extern ? D_802858F8; extern ? D_80285A00; extern s8 D_802874F5; void func_80284308(void *arg0) { s32 sp30; Player *player = &gPlayerOne; f32 temp_f0; f32 temp_f12; f32 temp_f2; void *temp_v0; sp30.unk0 = D_80285A00.unk0; sp30.unk4 = D_80285A00.unk4; sp30.unkC = D_80285A00.unkC; sp30.unk8 = D_80285A00.unk8; func_802832C4(&func_80283A54, arg0, 0x8C, 0x8C); func_80282D90(arg0, &D_802858E0, &D_802858F8, 0); temp_v0 = *(sp30 + (D_802874F5 * 4)); //player = gPlayerOne; temp_f0 = temp_v0->unk14 - player->posX; temp_f12 = temp_v0->unk1C - player->posZ; temp_f2 = temp_v0->unk18 - player->posY; arg0->unkC = arg0->unkC + temp_f0; arg0->unk0 = arg0->unk0 + temp_f0; arg0->unk14 = arg0->unk14 + temp_f12; arg0->unk8 = arg0->unk8 + temp_f12; arg0->unk4 = arg0->unk4 + temp_f2; arg0->unk10 = arg0->unk10 + temp_f2; } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80284308.s") #endif extern s32 D_80285A10; extern s32 D_80285A4C; void func_80284418(s32 arg0) { func_802832C4(&func_80283B1C, arg0, 0x52, 0x52); func_802832C4(&func_80283B1C, arg0, 0x48, 0x48); func_802832C4(&func_80283B1C, arg0, 0x3D, 0x3D); func_80282D90(arg0, &D_80285A10, &D_80285A4C, 0); } extern s32 D_80285A88; extern s32 D_80285AB8; void func_80284494(s32 arg0) { func_802832C4(&func_80283ACC, arg0, 0x1E, 0x1E); func_802832C4(&func_80283968, arg0, 0, 0); func_80282D90(arg0, &D_80285A88, &D_80285AB8, 0); } extern s32 D_80285AE8; extern s32 D_80285B00; void func_802844FC(s32 arg0) { func_802832C4(&func_80283AA4, arg0, 0x3B, 0x3B); func_80282D90(arg0, &D_80285AE8, &D_80285B00, 0); } extern s32 D_80285B18; extern s32 D_80285B54; void func_8028454C(s32 arg0) { func_802832C4(&func_80283CA8, arg0, 0, 0); func_802832C4(&func_80283A34, arg0, 1, 1); func_802832C4(&func_80283C38, arg0, 0, 0); func_802832C4(&func_80283994, arg0, 0x3C, 0x3C); func_80282D90(arg0, &D_80285B18, &D_80285B54, 0); } extern s32 D_80285B90; extern s32 D_80285BA8; void func_802845EC(s32 arg0) { func_80282D90(arg0, &D_80285B90, &D_80285BA8, 0); } void func_8028461C(s32 arg0) { func_80283240(1); func_80283B6C(arg0); } void func_80284648(s32 arg0) { func_802832C4(&func_802845EC, arg0, 0, 0); func_802832C4(&func_8028461C, arg0, 0x110, 0x110); func_802832C4(&func_80283BA4, arg0, 0x115, 0x115); } UNUSED void func_802846AC(void) { } extern s32 D_80285C38; extern s32 D_80285C74; void func_802846B4(s32 arg0) { func_80282D90(arg0, &D_80285C38, &D_80285C74, 0); } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 //? func_80282D90(? *, ? *, ?); // extern extern s32 D_80285CB0; extern s32 D_80285CE0; extern f32 D_8028747C; void func_802846E4(void *arg0) { f32 temp_f0; func_80282D90(arg0, &D_80285CB0, &D_80285CE0, 0); temp_f0 = D_8028747C; arg0->unkC = arg0->unkC + (gPlayerFour->posX - temp_f0); arg0->unk10 = arg0->unk10 + (gPlayerFour->posY - -29.0f); arg0->unk14 = arg0->unk14 + (gPlayerFour->posZ - -97.0f); arg0->unk0 = arg0->unk0 + (gPlayerFour->posX - temp_f0); arg0->unk4 = arg0->unk4 + (gPlayerFour->posY - -29.0f); arg0->unk8 = arg0->unk8 + (gPlayerFour->posZ - -97.0f); } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802846E4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80280268(u8); // extern ? func_80282D90(s32, s32, s32, ?); // extern ? func_802832C4(? *, s32, s16, s16); // extern extern u16 D_800DC5E4; extern f32 D_802856B4; extern ? D_80286A04; extern ? D_80286A10; extern ? D_80286B34; extern s16 D_802876D2; void func_802847CC(s32 arg0) { u16 sp2E; u16 sp2C; s32 sp24; f32 temp_f4; s16 temp_a2; s16 temp_a2_2; s32 temp_f6; u16 temp_v0; u16 temp_v0_5; u8 temp_v0_2; void *temp_v0_3; void *temp_v0_4; s32 phi_t9; temp_f4 = D_802856B4; temp_f6 = temp_f4; temp_v0 = *(&D_80286A10 + (D_800DC5E4 * 0x10)); if ((MIPS2C_ERROR(cfc1) & 0x78) != 0) { if ((MIPS2C_ERROR(cfc1) & 0x78) == 0) { phi_t9 = (temp_f4 - 2.1474836e9f) | 0x80000000; } else { goto block_3; } } else { phi_t9 = temp_f6; if (temp_f6 < 0) { block_3: phi_t9 = -1; } } sp2E = (temp_v0 - phi_t9) - 0xA; sp2C = temp_v0; func_802832C4(&func_80283CD0, arg0, 0, 0); func_802832C4(&func_80283A00, arg0, 8, 8); func_802832C4(&func_80283C78, arg0, 0x95, 0x95); func_802832C4(&func_80282434, arg0, 0, 0); temp_v0_2 = *(&D_80286A04 + (D_800DC5E4 * 0x10)); if (temp_v0_2 != 1) { if (temp_v0_2 != 2) { func_802832C4(&func_802839E0, arg0, 0, 0); sp24 = sp2E; func_802832C4(&func_802839CC, arg0, sp2E, sp2E); temp_a2 = sp2E - 0x14; func_802832C4(&func_802839E0, arg0, temp_a2, temp_a2); temp_v0_3 = (D_800DC5E4 * 0x10) + &D_80286A04; func_80282D90(arg0, temp_v0_3->unk4, temp_v0_3->unk8, 0); } else { func_802832C4(&func_802839E0, arg0, 0, 0); func_802832C4(&func_80283D04, arg0, 0xF7, 0xF7); temp_v0_4 = (D_800DC5E4 * 0x10) + &D_80286A04; func_80282D90(arg0, temp_v0_4->unk4, temp_v0_4->unk8, 0); } } else { func_802832C4(&func_802839CC, arg0, 0, -1); temp_a2_2 = sp2E - 0x14; func_802832C4(&func_802839E0, arg0, temp_a2_2, temp_a2_2); } if (gCCSelection == CC_EXTRA) { sp2C = *(&D_80286B34 + (D_800DC5E4 * 2)); } if (sp2C == D_802876D2) { temp_v0_5 = D_800DC5E4; if (*((temp_v0_5 * 0x10) + &D_80286A04) != 2) { func_80280268(((temp_v0_5 * 0x10) + &D_80286A04)->unk11); } } } #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802847CC.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 /* Failed to decompile function func_80284AE8: Unable to determine jump table for jr instruction at func_80284AE8.s line 13. There must be a read of a variable in the same block as the instruction, which has a name starting with "jtbl"/"jpt_". */ #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80284AE8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 /* Failed to decompile function func_80284CC0: Last instruction is missing a delay slot: jr $ra */ #else GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80284CC0.s") #endif