Match all but one function in code_802B0210.c (#217)

Required getting the .rodata for that file correct too.

Matched a couple other funtions here and there as well.

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-06-11 17:55:45 -04:00
committed by GitHub
parent 56120481f9
commit 0923e94420
36 changed files with 740 additions and 5803 deletions
+11 -10
View File
@@ -8,9 +8,10 @@ extern void func_800C8F44(u16 arg0);
extern u16 D_800DC5A8;
struct UnkStruct80164490 {
s16 unk0;
s16 unk2;
s16 unk4;
s16 wayPointX;
s16 wayPointY;
s16 wayPointZ;
s16 wayPointSegment;
};
extern struct UnkStruct80164490 *D_80164490;
@@ -162,18 +163,18 @@ void func_80002A18(void) {
func_8029E158();
if (gModeSelection != BATTLE) {
D_8015F8D0.unk4 = (f32) (D_80164490->unk2 - 15);;
D_8015F8D0.unk8 = D_80164490->unk4;
D_8015F8D0.unk4 = (f32) (D_80164490->wayPointY - 15);;
D_8015F8D0.unk8 = D_80164490->wayPointZ;
if (gCurrentCourseId == COURSE_TOADS_TURNPIKE) {
D_8015F8D0.unk0 = (gIsMirrorMode != 0) ?
D_80164490->unk0 + 138.0f :
D_80164490->unk0 - 138.0f;
D_80164490->wayPointX + 138.0f :
D_80164490->wayPointX - 138.0f;
} else if (gCurrentCourseId == COURSE_WARIO_STADIUM) {
D_8015F8D0.unk0 = (gIsMirrorMode != 0) ?
D_80164490->unk0 + 12.0f :
D_80164490->unk0 - 12.0f;
D_80164490->wayPointX + 12.0f :
D_80164490->wayPointX - 12.0f;
} else {
D_8015F8D0.unk0 = D_80164490->unk0;
D_8015F8D0.unk0 = D_80164490->wayPointX;
}
}
if (D_800DC51C == 0) {
+1
View File
@@ -137,6 +137,7 @@ void func_8009C918();
void func_8009E1C0();
void func_8009E208();
void func_8009E258();
void func_8009E5BC();
void func_8009E620();
void add_8018D9E0_entry(s32, s32, s32, s8);
void func_800A0AD0(struct_8018D9E0_entry*);
+590 -909
View File
File diff suppressed because it is too large Load Diff
+41 -7
View File
@@ -6,9 +6,12 @@
void func_802B0210(UnkActorInner*, UnkActorInner*);
void func_802B02B4(struct ShellActor*, s32);
void func_802B039C(struct BananaActor*);
void func_802B0464(s16);
void func_802B04E8(struct BananaActor*, s16);
void func_802B0570(struct BananaActor*);
void func_802B0648(struct BananaBunchParent*);
void func_802B0788(s16, struct BananaBunchParent*, Player*);
s32 func_802B09C0(s16);
void update_obj_banana_bunch(struct BananaBunchParent*);
s32 func_802B0E14(s16);
@@ -16,10 +19,9 @@ void update_obj_triple_shell(struct TripleShellParent*, s16);
s32 func_802B17F4(Player*);
s32 func_802B18E4(Player*, s16);
s32 func_802B19EC(struct TripleShellParent*, Player*, s16, u16);
s32 func_802B1C9C(Player*);
s32 func_802B1E48(Player*);
void func_802B1FFC(Player*);
void update_obj_green_shell(struct ShellActor*);
void update_obj_red_blue_shell(struct ShellActor*);
void update_obj_banana(struct BananaActor*);
void func_802B2914(struct BananaBunchParent*, Player*, s16);
s32 func_802B2C40(Player*);
@@ -27,18 +29,40 @@ s32 func_802B2D70(Player*);
void func_802B2EBC(Player*);
void func_802B2FA0(Player*);
void func_802B30EC();
void update_obj_green_shell(struct ShellActor*);
void func_802B3B44(struct ShellActor*);
void func_802B3E7C(struct ShellActor*, Player*);
s16 func_802B3FD0(Player*, struct ShellActor*);
void func_802B4104(struct ShellActor*);
void update_obj_red_blue_shell(struct ShellActor*);
void func_802B4E30(struct Actor*);
// src/code_80091750.c
void func_8009E5BC();
// audio/external.c
extern void func_800C9060(u8, s32);
extern void func_800C90F4(u8, u32);
extern void func_800CAB4C(u8);
// code_80005FD0.c
s32 func_8000ED80(s32);
s32 func_8000EDC8(s32);
s32 func_8000EE10(s32);
/*******************************************/
// These are also defined and used in code_800029B0.c
// They'll have to be unified sometime in the future
extern u16 D_80164430;
struct UnkStruct80164490 {
s16 wayPointX;
s16 wayPointY;
s16 wayPointZ;
s16 wayPointSegment;
};
extern struct UnkStruct80164490 *D_80164490;
/*******************************************/
extern f32 D_802B9F68;
extern s16 gPlayerBalloonCount[];
@@ -49,8 +73,18 @@ extern Player *gPlayerOne;
extern Player *gPlayerTwo;
extern Player *gPlayerThree;
extern struct Controller gControllers[];
extern struct Controller *gControllerEight;
extern struct Controller *gControllerSeven;
extern struct Controller *gControllerOne;
extern struct Controller *gControllerSix;
extern struct Controller *gControllerSeven;
extern struct Controller *gControllerEight;
extern u16 D_800DC51C;
extern s16 D_8015F6E8;
extern s16 D_8015F6EA;
extern s16 D_8015F6F0;
extern s16 D_8015F6F2;
extern u16 D_80164430;
extern u16 D_80164438[];
extern s16 gPlayerPositionLUT[];
#endif
+2 -2
View File
@@ -1628,8 +1628,8 @@ u16 random_u16(void) {
return gRandomSeed16;
}
s32 random_int(u16 arg0) {
return (u16) (arg0 * (( (f32) random_u16() ) / 65535.0));
u16 random_int(u16 arg0) {
return arg0 * (( (f32) random_u16() ) / 65535.0);
}
s16 func_802B7F34(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
return atan2s(arg2 - arg0, arg3 - arg1);
+3 -1
View File
@@ -32,6 +32,8 @@ void func_802B59DC(Mat4, s32);
void func_802B5F74(Mat4, Vec3f, Vec3s);
f32 func_802B80D0(Vec3f, Vec3f, u16, f32, f32, f32);
void func_802B5F00(Mat4, f32);
void func_802B63B8(Vec3f, f32*);
void func_802B64C4(Vec3f, s16);
void func_802B71CC(Mat4, Mat4, Mat4);
void func_802B75F8(Mtx*, Mat4);
u16 atan2_lookup(f32, f32);
@@ -45,7 +47,7 @@ s16 func_802B7CA8(f32);
void func_802B7CE8(f32);
s16 func_802B7D28(f32);
u16 random_u16();
s32 random_int(u16);
u16 random_int(u16);
s16 func_802B7F34(f32, f32, f32, f32);
f32 sins(u16);
f32 coss(u16);
+15 -26
View File
@@ -2293,8 +2293,8 @@ f32 func_802ABEAC(UnkActorInner *arg0, Vec3f arg1) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void process_shell_collision(void *arg0, ? arg1, void *arg2, ? arg3) {
//generated by m2c commit b04a67bbeb29101ca8f4ea8a24a81fe594677b33
void process_shell_collision(f32 *arg0, f32 arg1, f32 *velocity, f32 arg3) {
f32 sp40;
f32 sp3C;
f32 sp38;
@@ -2320,11 +2320,11 @@ void process_shell_collision(void *arg0, ? arg1, void *arg2, ? arg3) {
f32 temp_f8;
f64 temp_f16;
temp_f2 = arg2->unk0;
temp_f12 = arg2->unk4;
temp_f14 = arg2->unk8;
temp_f2 = velocity->unk0;
temp_f12 = velocity->unk4;
temp_f14 = velocity->unk8;
temp_f0 = sqrtf((temp_f2 * temp_f2) + (temp_f12 * temp_f12) + (temp_f14 * temp_f14));
temp_f16 = temp_f0;
temp_f16 = (f64) temp_f0;
sp24 = temp_f0;
if ((temp_f16 > 4.5) || (temp_f16 < 3.5)) {
sp24 = 4.0f;
@@ -2347,34 +2347,23 @@ void process_shell_collision(void *arg0, ? arg1, void *arg2, ? arg3) {
temp_f16_3 = (1.0f / sqrtf((temp_f2_2 * temp_f2_2) + (temp_f12_2 * temp_f12_2) + (temp_f14_2 * temp_f14_2))) * sp24;
temp_f10_2 = temp_f12_2 * temp_f16_3;
temp_f8 = temp_f14_2 * temp_f16_3;
arg2->unk0 = temp_f2_2 * temp_f16_3;
arg2->unk4 = temp_f10_2;
arg2->unk8 = temp_f8;
velocity->unk0 = temp_f2_2 * temp_f16_3;
velocity->unk4 = temp_f10_2;
velocity->unk8 = temp_f8;
}
#else
GLOBAL_ASM("asm/non_matchings/memory/process_shell_collision.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? process_shell_collision(void *, f32, s32, ?); // extern
void func_802AC098(void *arg0, s32 arg1) {
f32 temp_f0;
f32 temp_f0_2;
temp_f0 = arg0->unkC;
if (temp_f0 < 0.0f) {
process_shell_collision(arg0 + 0x18, temp_f0, arg1, 0x40000000);
void func_802AC098(UnkActorInner *arg0, f32 *velocity) {
if (arg0->unk3C < 0.0f) {
process_shell_collision(arg0->unk48, arg0->unk3C, velocity, 2.0f);
}
temp_f0_2 = arg0->unk10;
if (temp_f0_2 < 0.0f) {
process_shell_collision(arg0 + 0x24, temp_f0_2, arg1, 0x40000000);
if (arg0->unk40 < 0.0f) {
process_shell_collision(arg0->unk54, arg0->unk40, velocity, 2.0f);
}
}
#else
GLOBAL_ASM("asm/non_matchings/memory/func_802AC098.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
+2
View File
@@ -91,6 +91,8 @@ s16 func_802ABDB8(u16);
s16 func_802ABDF4(u16);
f32 func_802ABE30(f32, f32, f32, u16);
f32 func_802ABEAC(UnkActorInner*, Vec3f);
void process_shell_collision(Vec3f, f32, Vec3f, f32);
void func_802AC098(UnkActorInner*, Vec3f);
void func_802AD950(UnkActorInner*, f32, f32, f32, f32, f32, f32, f32);
void func_802ADDC8(UnkActorInner*, f32, f32, f32, f32);
f32 func_802AE1C0(f32, f32, f32);