From be3d3d131d07cefab2b1bc3c88937de39073cdbd Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 14 Oct 2023 06:11:49 -0300 Subject: [PATCH] Decompile func_8002C6B8 --- src/libultra/2C700.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/libultra/2C700.c b/src/libultra/2C700.c index 1e0de319..d111ffd4 100644 --- a/src/libultra/2C700.c +++ b/src/libultra/2C700.c @@ -1,5 +1,9 @@ #include "common.h" +// OPTFLAGS := -O1 -g0 + +s32 func_8002DE78(s32, s32, s32); + #pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/2C700/func_8002BB00.s") #pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/2C700/func_8002BB7C.s") @@ -22,4 +26,26 @@ #pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/2C700/func_8002C698.s") -#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/2C700/func_8002C6B8.s") +typedef struct { + /* 0x00 */ char pad_0[0x4]; + /* 0x04 */ u8 unk4; +} Unkstruct_func_8002C6B8_1; + +typedef struct { + /* 0x00 */ char pad_0[0x4]; + /* 0x04 */ s8 unk4; + /* 0x05 */ char pad_5; + /* 0x06 */ s16 unk6; + /* 0x08 */ char pad_[0x4]; + /* 0x12 */ s32 unk12; +} Unkstruct_func_8002C6B8_2; + +s32 func_8002C6B8(Unkstruct_func_8002C6B8_1* arg0) { + Unkstruct_func_8002C6B8_2 temp; + + temp.unk4 = arg0->unk4; + temp.unk12 = 0; + temp.unk6 = 0; + func_8002DE78(&temp, 16, 1); + return 0; +}