From cc8b39a13289e0dd82f6b7fdf7915492d8c36fae Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 25 Jul 2021 13:41:05 -0700 Subject: [PATCH] Decompiled non-matching func_8003DFCC. --- src/unknown_00BC20.c | 4 ---- src/unknown_00BC20.h | 2 +- src/unknown_0348C0.c | 53 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/src/unknown_00BC20.c b/src/unknown_00BC20.c index a930c31b..f88ceae4 100644 --- a/src/unknown_00BC20.c +++ b/src/unknown_00BC20.c @@ -1441,11 +1441,7 @@ void func_800235D0(s32 arg0) { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800235DC.s") -<<<<<<< HEAD -void func_800238BC(Object *arg0) { -======= void func_800238BC(Object *arg0, void *arg1) { ->>>>>>> Added 2nd argument to func_800238BC. arg0->unk48 = arg0->descriptor_ptr->unk54; switch (arg0->unk48 - 1) { case 0x00: diff --git a/src/unknown_00BC20.h b/src/unknown_00BC20.h index 571e2833..833fb3bf 100644 --- a/src/unknown_00BC20.h +++ b/src/unknown_00BC20.h @@ -211,7 +211,7 @@ s8 func_8002341C(void); s32 func_80023568(void); s8 func_800235C0(void); void func_800235D0(s32 arg0); -void func_800238BC(Object *arg0); +void func_800238BC(Object *arg0, void *arg1); void run_object_loop_func(Object *obj, s32 arg1); void func_8002458C(s32 arg0); s16 *func_80024594(s32 *arg0, s32 *arg1); diff --git a/src/unknown_0348C0.c b/src/unknown_0348C0.c index a906c5e0..d5eca7eb 100644 --- a/src/unknown_0348C0.c +++ b/src/unknown_0348C0.c @@ -1184,7 +1184,60 @@ void obj_loop_world_key(Object *worldKeyObj, s32 speed) { worldKeyObj->y_rotation += speed * 256; } +#ifdef NON_MATCHING +typedef struct unknown_struct_8003DFCC { + u8 pad0[8]; + u8 unk8; + u8 unk9; + u8 unkA; +} unknown_struct_8003DFCC; + +void func_8003DFCC(Object *arg0, unknown_struct_8003DFCC *arg1) { + f32 temp_f0; + s32 temp_v0; + Object_64 *temp_v0_2; + f32 phi_f0; + + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 4; + arg0->unk4C->unk10 = 0x14; + temp_v0 = get_filtered_cheats(); + if (temp_v0 & 0x20000) { + arg1->unk9 = 0U; + } else if (temp_v0 & 0x08000) { + arg1->unk9 = 1U; + } else if (temp_v0 & 0x10000) { + arg1->unk9 = 2U; + } else if (temp_v0 & 0x40000) { + arg1->unk9 = 3U; + } else if (temp_v0 & 0x80000) { + arg1->unk9 = 4U; + } + if ((s32) arg1->unk8 >= 6) { + arg1->unk8 = 0U; + } + if ((s32) arg0->unk3A >= (s32) arg0->descriptor_ptr->unk55) { + arg0->unk3A = 0; + } + arg0->unk3A = (s8) arg1->unk9; + arg0->unk78 = (s32) arg0->unk3A; + phi_f0 = arg1->unkA; + if (arg1->unkA < 10.0f) { + phi_f0 = 10.0f; + } + temp_f0 = phi_f0 / 64.0f; + arg0->scale = (f32) (arg0->descriptor_ptr->unkC * temp_f0); + arg0->unk64->unk4 = 0; + arg0->unk64->unk0_a.unk0 = arg0->scale; + arg0->unk7C.word = 0; + if ((get_filtered_cheats() & 0x800) != 0) { + gParticlePtrList_addObject(arg0); + } +} +#else GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DFCC.s") +#endif + GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E140.s") void func_8003E5B0(s32 arg0, s32 arg1) {