mirror of
https://github.com/n64decomp/mk64
synced 2026-06-27 09:23:22 -04:00
Match func_802B0570 and fix BananaActor (#204)
I misunderstood how unions worked. In order to accomplish the original goal, the 3 named s16's need to be in a struct instead of just floating around. Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
+21
-28
@@ -130,38 +130,31 @@ void func_802B04E8(s32 arg0, s16 arg1) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B04E8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800C9060(s32, ?); // extern
|
||||
? func_802B0464(s16); // extern
|
||||
? func_802B04E8(void *, s16); // extern
|
||||
extern ? gActorList;
|
||||
extern ? gPlayers;
|
||||
extern void func_800C9060(s32, s32); /* extern */
|
||||
extern void func_802B0464(s16); /* extern */
|
||||
extern void func_802B04E8(struct BananaActor *, s16); /* extern */
|
||||
|
||||
void func_802B0570(void *arg0) {
|
||||
s16 temp_v0;
|
||||
void *temp_v0_2;
|
||||
extern Player gPlayers[];
|
||||
|
||||
func_802B0464(arg0->unk14);
|
||||
func_802B04E8(arg0, arg0->unk12);
|
||||
temp_v0 = arg0->rot;
|
||||
if ((*(&gPlayers + (temp_v0 * 0xDD8)) & 0x4000) != 0) {
|
||||
func_800C9060(temp_v0 & 0xFF, 0x19019053);
|
||||
void func_802B0570(struct BananaActor *banana) {
|
||||
struct BananaBunchParent *temp_v0_2;
|
||||
|
||||
func_802B0464(banana->youngerIndex);
|
||||
func_802B04E8(banana, banana->elderIndex);
|
||||
if ((gPlayers[banana->playerId].unk_000 & 0x4000) != 0) {
|
||||
func_800C9060(banana->playerId & 0xFF, 0x19019053);
|
||||
}
|
||||
arg0->unk2 = -0x8000;
|
||||
arg0->unk_04 = 0x3C;
|
||||
arg0->unk6 = 5;
|
||||
temp_v0_2 = (arg0->unk_08 * 0x70) + &gActorList;
|
||||
arg0->unk28 = 3.0f;
|
||||
temp_v0_2->unk12 = -1;
|
||||
temp_v0_2->unk14 = -1;
|
||||
temp_v0_2->unk16 = -1;
|
||||
temp_v0_2->pos = -1;
|
||||
temp_v0_2->unk1A = -1;
|
||||
banana->flags = -0x8000;
|
||||
banana->unk_04 = 0x003C;
|
||||
banana->state = 5;
|
||||
banana->velocity[1] = 3.0f;
|
||||
temp_v0_2 = &gActorList[banana->parentIndex];
|
||||
temp_v0_2->bananaIndices[0] = -1;
|
||||
temp_v0_2->bananaIndices[1] = -1;
|
||||
temp_v0_2->bananaIndices[2] = -1;
|
||||
temp_v0_2->bananaIndices[3] = -1;
|
||||
temp_v0_2->bananaIndices[4] = -1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B0570.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
|
||||
|
||||
Reference in New Issue
Block a user