From eb696bf35d06018900337dab0810f5842e46112f Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Wed, 1 Jul 2026 08:45:39 -0600 Subject: [PATCH] =?UTF-8?q?feat(decomp):=20bulk=5Fharvest=20=E2=80=94=20+4?= =?UTF-8?q?9=20fns=20across=2041=20binaries,=200=20propagated=20(fleet=206?= =?UTF-8?q?4.48%)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ov_SC02_005/ov_SC02_005.c | 7 ++++++- src/ov_SC02_011/ov_SC02_011.c | 6 +++++- src/ov_SC03_001/ov_SC03_001.c | 16 ++++++++++++++-- src/ov_SC03_002/ov_SC03_002.c | 16 ++++++++++++++-- src/ov_SC03_006/ov_SC03_006.c | 16 ++++++++++++++-- src/ov_SC03_024/ov_SC03_024.c | 15 +++++++++++++-- src/ov_SC03_028/ov_SC03_028.c | 9 ++++++++- src/ov_SC03_089/ov_SC03_089.c | 7 ++++++- src/ov_SC03_090/ov_SC03_090.c | 9 ++++++++- src/ov_SC03_091/ov_SC03_091.c | 9 ++++++++- src/ov_SC03_092/ov_SC03_092.c | 6 +++++- src/ov_SC03_094/ov_SC03_094.c | 10 +++++++++- src/ov_SC03_104/ov_SC03_104.c | 7 ++++++- src/ov_SC03_105/ov_SC03_105.c | 6 +++++- src/ov_SC03_112/ov_SC03_112.c | 7 ++++++- src/ov_SC03_118/ov_SC03_118.c | 7 ++++++- src/ov_SC03_124/ov_SC03_124.c | 6 +++++- src/ov_SC04_000/ov_SC04_000.c | 8 +++++++- src/ov_SC04_002/ov_SC04_002.c | 8 +++++++- src/ov_SC04_004/ov_SC04_004.c | 10 +++++++++- src/ov_SC04_005/ov_SC04_005.c | 8 +++++++- src/ov_SC04_007/ov_SC04_007.c | 8 +++++++- src/ov_SC04_009/ov_SC04_009.c | 8 +++++++- src/ov_SC04_015/ov_SC04_015.c | 6 +++++- src/ov_SC04_018/ov_SC04_018.c | 8 +++++++- src/ov_SC04_019/ov_SC04_019.c | 6 +++++- src/ov_SC05_001/ov_SC05_001.c | 8 +++++++- src/ov_SC05_005/ov_SC05_005.c | 18 ++++++++++++++++-- src/ov_SC05_007/ov_SC05_007.c | 7 ++++++- src/ov_SC05_008/ov_SC05_008.c | 14 ++++++++++++-- src/ov_SC05_010/ov_SC05_010.c | 7 ++++++- src/ov_SC05_017/ov_SC05_017.c | 11 +++++++++-- src/ov_SC05_018/ov_SC05_018.c | 6 +++++- src/ov_SC06_000/ov_SC06_000.c | 12 ++++++++++-- src/ov_SC06_006/ov_SC06_006.c | 7 ++++++- src/ov_SC06_010/ov_SC06_010.c | 8 +++++++- src/ov_SC06_018/ov_SC06_018.c | 8 +++++++- src/ov_SC06_025/ov_SC06_025.c | 6 +++++- src/ov_SC06_029/ov_SC06_029.c | 6 +++++- src/ov_SC06_032/ov_SC06_032.c | 10 +++++++++- src/ov_SC07_002/ov_SC07_002.c | 6 +++++- 41 files changed, 314 insertions(+), 49 deletions(-) diff --git a/src/ov_SC02_005/ov_SC02_005.c b/src/ov_SC02_005/ov_SC02_005.c index e6ce47441..a362ae21d 100644 --- a/src/ov_SC02_005/ov_SC02_005.c +++ b/src/ov_SC02_005/ov_SC02_005.c @@ -5936,7 +5936,12 @@ INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005", func_8018F564); INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005", func_8018F594); -INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005", func_8018F5C4); +extern void func_8013C360(void *a0); + extern s32 D_801D91D4; + void func_8018F5C4(void) { + func_8013C360(&D_801D91D4); + } + extern void func_8013C360(void *a0); extern s32 D_801DA5FC; diff --git a/src/ov_SC02_011/ov_SC02_011.c b/src/ov_SC02_011/ov_SC02_011.c index c698436ed..d776d3724 100644 --- a/src/ov_SC02_011/ov_SC02_011.c +++ b/src/ov_SC02_011/ov_SC02_011.c @@ -5201,7 +5201,11 @@ extern void func_80184918(s32 arg0, s32 arg1); } -INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011", func_80184858); +extern void func_80029124(s32 arg0, s32 arg1); + void func_80184858(void) { + func_80029124(0x9E, 1); + } + INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011", func_8018487C); diff --git a/src/ov_SC03_001/ov_SC03_001.c b/src/ov_SC03_001/ov_SC03_001.c index 5f2db79aa..d73ddf39a 100644 --- a/src/ov_SC03_001/ov_SC03_001.c +++ b/src/ov_SC03_001/ov_SC03_001.c @@ -5107,7 +5107,13 @@ INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_80181200); INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_8018126C); -INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_80181298); +extern void func_80187778(s32 *a0, s32 a1); + extern short D_80191B3C; + void func_80181298(short *param_1) { + *(short *)((char *)param_1 + 0x2) = 0x3; + func_80187778(param_1, &D_80191B3C); + } + INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_801812C4); @@ -5607,7 +5613,13 @@ INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_80185FF0); INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_80186064); -INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_801860A0); +extern void func_80178CBC(s32 *a0, s32 a1); + extern short D_80192888; + void func_801860A0(short *param_1) { + param_1[1] = 0x1d; + ((void (*)(s32, s32))func_80178CBC)((int)param_1, (int)&D_80192888); + } + INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_801860CC); diff --git a/src/ov_SC03_002/ov_SC03_002.c b/src/ov_SC03_002/ov_SC03_002.c index 46185a3e0..201653a1c 100644 --- a/src/ov_SC03_002/ov_SC03_002.c +++ b/src/ov_SC03_002/ov_SC03_002.c @@ -4986,7 +4986,13 @@ INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_801808F8); INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_801809C8); -INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_80180A04); +extern void func_80180AC0(s32 a0, s32 a1); + extern void func_80180C00(s32 arg0); + void func_80180A04(s32 param_1) { + func_80180AC0(param_1, param_1 + 0xa0); + ((void (*)(s32))func_80180C00)(param_1); + } + INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_80180A38); @@ -5149,7 +5155,13 @@ INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_80182E88); INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_80182F0C); -INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_8018303C); +extern s32 func_80182F0C(s32 arg); + extern void func_80183070(void *a0); + void func_8018303C(u8 *a0) { + *(s32 *)(a0 + 0xe0) = func_80182F0C((s32)a0); + func_80183070(a0); + } + INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_80183070); diff --git a/src/ov_SC03_006/ov_SC03_006.c b/src/ov_SC03_006/ov_SC03_006.c index a9d89a0ee..4b0cb4953 100644 --- a/src/ov_SC03_006/ov_SC03_006.c +++ b/src/ov_SC03_006/ov_SC03_006.c @@ -4942,7 +4942,13 @@ INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_80180FE0); INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_8018101C); -INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_801810B4); +extern void func_8016EE40(s32 a0, s32 a1, s32 a2); +extern M2C_UNK D_801907EC; + +void func_801810B4(void) { + ((void (*)(void *, s32))func_8016EE40)(&D_801907EC, 0x1000000); +} + extern void func_8016EE40(s32 a0, s32 a1, s32 a2); extern M2C_UNK D_801907F8; @@ -5348,7 +5354,13 @@ INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_80188528); INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_801886C0); -INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_80188710); +extern void func_8013240C(s32 a0); +extern s32 D_801F7730; + +void func_80188710(void) { + ((void (*)(void *))func_8013240C)(&D_801F7730); +} + INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_80188738); diff --git a/src/ov_SC03_024/ov_SC03_024.c b/src/ov_SC03_024/ov_SC03_024.c index f65453df9..7fe6ee2d6 100644 --- a/src/ov_SC03_024/ov_SC03_024.c +++ b/src/ov_SC03_024/ov_SC03_024.c @@ -4919,7 +4919,13 @@ INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_801802EC); INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80180328); -INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80180368); +extern void func_8016EE40(s32 a0, s32 a1, s32 a2); +extern s32 D_8018AFE0; + +void func_80180368(void) { + ((void (*)(void *, s32))func_8016EE40)(&D_8018AFE0, 0x1000000); +} + extern void func_8016EE40(s32 a0, s32 a1, s32 a2); extern s32 D_8018AFF0; @@ -4973,7 +4979,12 @@ INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_801808E4); void func_80180914(void) { } -INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_8018091C); +extern void func_80174684(void *); + extern s32 func_80180944; + void func_8018091C(void) { + func_80174684(&func_80180944); + } + INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80180944); diff --git a/src/ov_SC03_028/ov_SC03_028.c b/src/ov_SC03_028/ov_SC03_028.c index 1e69027ac..3603bf4bd 100644 --- a/src/ov_SC03_028/ov_SC03_028.c +++ b/src/ov_SC03_028/ov_SC03_028.c @@ -5253,7 +5253,14 @@ INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_80188FF0); INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_80189094); -INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_801890E4); +extern void func_8012CBCC(s32 a0); + extern void func_8012C218(void *a0); + void func_801890E4(s32 param_1) { + if (((int (*)(void))func_8012CBCC)() != 0) { + ((void (*)(int))func_8012C218)(param_1); + } + } + INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_8018911C); diff --git a/src/ov_SC03_089/ov_SC03_089.c b/src/ov_SC03_089/ov_SC03_089.c index b438639c6..10c61c496 100644 --- a/src/ov_SC03_089/ov_SC03_089.c +++ b/src/ov_SC03_089/ov_SC03_089.c @@ -4949,7 +4949,12 @@ INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089", func_80182D28); INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089", func_801830D8); -INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089", func_801831C4); +extern void (*D_801A1B1C[])(void); + +void func_801831C4(void *a0) { + D_801A1B1C[*(u16 *)((s32)a0 + 0x2)](); +} + INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089", func_80183200); diff --git a/src/ov_SC03_090/ov_SC03_090.c b/src/ov_SC03_090/ov_SC03_090.c index 8b6a18232..8c27c021e 100644 --- a/src/ov_SC03_090/ov_SC03_090.c +++ b/src/ov_SC03_090/ov_SC03_090.c @@ -5148,7 +5148,14 @@ INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090", func_80186E24); INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090", func_80186E78); -INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090", func_80186F84); +extern void func_801292C8(u8 *a0); + s32 func_80186F84(s32 arg0) { + *(s32 *)(arg0 + 0x1c) -= 1; + if (*(s32 *)(arg0 + 0x1c) == 0) { + ((void (*)(void))func_801292C8)(); + } + } + INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090", func_80186FB8); diff --git a/src/ov_SC03_091/ov_SC03_091.c b/src/ov_SC03_091/ov_SC03_091.c index 06d8f2de1..f4edc1a9f 100644 --- a/src/ov_SC03_091/ov_SC03_091.c +++ b/src/ov_SC03_091/ov_SC03_091.c @@ -5166,7 +5166,14 @@ INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_80187CCC); INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_80187D20); -INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_80187E2C); +extern void func_801292C8(u8 *a0); + s32 func_80187E2C(s32 arg0) { + *(s32 *)(arg0 + 0x1c) -= 1; + if (*(s32 *)(arg0 + 0x1c) == 0) { + ((void (*)(void))func_801292C8)(); + } + } + INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_80187E60); diff --git a/src/ov_SC03_092/ov_SC03_092.c b/src/ov_SC03_092/ov_SC03_092.c index 09943c280..e107d0fa6 100644 --- a/src/ov_SC03_092/ov_SC03_092.c +++ b/src/ov_SC03_092/ov_SC03_092.c @@ -4959,7 +4959,11 @@ INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017FF90); INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017FFA0); -INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017FFB4); +extern void func_80029124(s32 arg0, s32 arg1); + void func_8017FFB4(void) { + func_80029124(0x100, 1); + } + INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017FFD8); diff --git a/src/ov_SC03_094/ov_SC03_094.c b/src/ov_SC03_094/ov_SC03_094.c index 20a40397e..0b8eb71e9 100644 --- a/src/ov_SC03_094/ov_SC03_094.c +++ b/src/ov_SC03_094/ov_SC03_094.c @@ -5131,7 +5131,15 @@ INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094", func_80186628); INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094", func_80186700); -INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094", func_80186768); +extern s32 func_80153BD8(s32 arg); + extern s32 func_80153BF0(s32 a0); + void func_80186768(u8 *a0) { + *(s16 *)(a0 + 0xfe) = 0; + if (func_80153BD8((s32)a0)) { + ((void (*)(void *))func_80153BF0)(a0); + } + } + INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094", func_801867A4); diff --git a/src/ov_SC03_104/ov_SC03_104.c b/src/ov_SC03_104/ov_SC03_104.c index d828239f6..816c36a1c 100644 --- a/src/ov_SC03_104/ov_SC03_104.c +++ b/src/ov_SC03_104/ov_SC03_104.c @@ -4834,7 +4834,12 @@ extern s32 func_800D1EBC(void); } -INCLUDE_ASM("asm/ov_SC03_104/nonmatchings/ov_SC03_104", func_80181188); +extern void func_8016EE40(s32 a0, s32 a1, s32 a2); + extern s32 D_8018E7D4; + void func_80181188(void) { + ((void (*)(void *, s32))func_8016EE40)(&D_8018E7D4, 0x1000000); + } + INCLUDE_ASM("asm/ov_SC03_104/nonmatchings/ov_SC03_104", func_801811B0); diff --git a/src/ov_SC03_105/ov_SC03_105.c b/src/ov_SC03_105/ov_SC03_105.c index 177824407..e6868e84f 100644 --- a/src/ov_SC03_105/ov_SC03_105.c +++ b/src/ov_SC03_105/ov_SC03_105.c @@ -5098,7 +5098,11 @@ extern void func_80189718(void); } -INCLUDE_ASM("asm/ov_SC03_105/nonmatchings/ov_SC03_105", func_80187080); +extern s32 func_8012C588(s32 a0, s32 a1); + void func_80187080(void *a0) { + *(s32 *)((u8 *)a0 + 0xd0) = ((s32 (*)(s32, void *))func_8012C588)(0x217, a0); + } + INCLUDE_ASM("asm/ov_SC03_105/nonmatchings/ov_SC03_105", func_801870B4); diff --git a/src/ov_SC03_112/ov_SC03_112.c b/src/ov_SC03_112/ov_SC03_112.c index 0b2c473fa..e0a4851b1 100644 --- a/src/ov_SC03_112/ov_SC03_112.c +++ b/src/ov_SC03_112/ov_SC03_112.c @@ -5016,7 +5016,12 @@ INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112", func_801840E4); INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112", func_80184194); -INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112", func_80184278); +extern void (*D_801A8BF4[])(void); + +void func_80184278(void *a0) { + D_801A8BF4[*(u16 *)((s32)a0 + 0x2)](); +} + INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112", func_801842B4); diff --git a/src/ov_SC03_118/ov_SC03_118.c b/src/ov_SC03_118/ov_SC03_118.c index f125b9d82..2ee54491f 100644 --- a/src/ov_SC03_118/ov_SC03_118.c +++ b/src/ov_SC03_118/ov_SC03_118.c @@ -5385,7 +5385,12 @@ INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118", func_8018927C); INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118", func_801893C8); -INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118", func_801894E8); +extern void func_8012C218(void *a0); + s32 func_801894E8(void * arg0) { + *(s16 *)((char *)arg0 + 0x2) = 2; + ((void (*)(s32 *))func_8012C218)(*(s32 **)((char *)arg0 + 0xcc)); + } + INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118", func_80189514); diff --git a/src/ov_SC03_124/ov_SC03_124.c b/src/ov_SC03_124/ov_SC03_124.c index b9756326a..f50a3cead 100644 --- a/src/ov_SC03_124/ov_SC03_124.c +++ b/src/ov_SC03_124/ov_SC03_124.c @@ -4795,7 +4795,11 @@ INCLUDE_ASM("asm/ov_SC03_124/nonmatchings/ov_SC03_124", func_8017D904); INCLUDE_ASM("asm/ov_SC03_124/nonmatchings/ov_SC03_124", func_8017D940); -INCLUDE_ASM("asm/ov_SC03_124/nonmatchings/ov_SC03_124", func_8017D97C); +extern s32 D_80127050; + void func_8017D97C(void) { + D_80127050 = 0x1; + } + INCLUDE_ASM("asm/ov_SC03_124/nonmatchings/ov_SC03_124", func_8017D990); diff --git a/src/ov_SC04_000/ov_SC04_000.c b/src/ov_SC04_000/ov_SC04_000.c index 89bf6d6d9..2fb883758 100644 --- a/src/ov_SC04_000/ov_SC04_000.c +++ b/src/ov_SC04_000/ov_SC04_000.c @@ -5098,7 +5098,13 @@ INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000", func_80182EC0); void func_80182EE8(void) { } -INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000", func_80182EF0); +extern void func_80178CBC(s32 *a0, s32 a1); + extern short D_801A6FBC; + void func_80182EF0(void *a0) { + *(short *)((char *)a0 + 0x2) = 0x4; + func_80178CBC(a0, &D_801A6FBC); + } + INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000", func_80182F1C); diff --git a/src/ov_SC04_002/ov_SC04_002.c b/src/ov_SC04_002/ov_SC04_002.c index 9c71c7b2b..7e1252f09 100644 --- a/src/ov_SC04_002/ov_SC04_002.c +++ b/src/ov_SC04_002/ov_SC04_002.c @@ -5244,7 +5244,13 @@ INCLUDE_ASM("asm/ov_SC04_002/nonmatchings/ov_SC04_002", func_80186078); INCLUDE_ASM("asm/ov_SC04_002/nonmatchings/ov_SC04_002", func_801860F8); -INCLUDE_ASM("asm/ov_SC04_002/nonmatchings/ov_SC04_002", func_8018612C); +extern void func_8002A04C(s32 a0); + extern void func_8012C098(void); + void func_8018612C(s32 a0) { + ((void (*)(s32 *))func_8002A04C)((s32 *)a0); + ((s32 (*)(s32))func_8012C098)(a0); + } + INCLUDE_ASM("asm/ov_SC04_002/nonmatchings/ov_SC04_002", func_8018615C); diff --git a/src/ov_SC04_004/ov_SC04_004.c b/src/ov_SC04_004/ov_SC04_004.c index f479d1b58..cfe2fec57 100644 --- a/src/ov_SC04_004/ov_SC04_004.c +++ b/src/ov_SC04_004/ov_SC04_004.c @@ -4953,7 +4953,15 @@ INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_8018070C); INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_80180750); -INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_80180878); +extern void func_8012A8B0(u8 *a0, s32 a1); +extern void func_8012AD44(s32 *a0, s16 a1); +extern s32 D_801999AC; + +void func_80180878(s32 arg0) { + ((void (*)(s32, s32))func_8012A8B0)(arg0, &D_801999AC); + ((void (*)(s32, s32))func_8012AD44)(arg0, 0xA); +} + INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_801808B4); diff --git a/src/ov_SC04_005/ov_SC04_005.c b/src/ov_SC04_005/ov_SC04_005.c index c6b6f65dc..050037788 100644 --- a/src/ov_SC04_005/ov_SC04_005.c +++ b/src/ov_SC04_005/ov_SC04_005.c @@ -5019,7 +5019,13 @@ INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_80182190); INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_801821C8); -INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_80182270); +extern void func_8002D4C8(s32 arg0, s32 arg1); + extern void func_8002AC00(s32 arg0); + void func_80182270(void) { + func_8002D4C8(0xA9E, 0); + func_8002AC00(0x14); + } + INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_8018229C); diff --git a/src/ov_SC04_007/ov_SC04_007.c b/src/ov_SC04_007/ov_SC04_007.c index 950ac5b11..bee49ac86 100644 --- a/src/ov_SC04_007/ov_SC04_007.c +++ b/src/ov_SC04_007/ov_SC04_007.c @@ -4973,7 +4973,13 @@ INCLUDE_ASM("asm/ov_SC04_007/nonmatchings/ov_SC04_007", func_80181AB4); INCLUDE_ASM("asm/ov_SC04_007/nonmatchings/ov_SC04_007", func_80181B34); -INCLUDE_ASM("asm/ov_SC04_007/nonmatchings/ov_SC04_007", func_80181B68); +extern void func_8002A04C(s32 arg0); + extern void func_8012C098(void); + void func_80181B68(s32 param_1) { + func_8002A04C(param_1); + ((void (*)(s32))func_8012C098)(param_1); + } + INCLUDE_ASM("asm/ov_SC04_007/nonmatchings/ov_SC04_007", func_80181B98); diff --git a/src/ov_SC04_009/ov_SC04_009.c b/src/ov_SC04_009/ov_SC04_009.c index bfea03ad7..048330957 100644 --- a/src/ov_SC04_009/ov_SC04_009.c +++ b/src/ov_SC04_009/ov_SC04_009.c @@ -4831,7 +4831,13 @@ s32 func_8017D90C(void) { INCLUDE_ASM("asm/ov_SC04_009/nonmatchings/ov_SC04_009", func_8017D914); -INCLUDE_ASM("asm/ov_SC04_009/nonmatchings/ov_SC04_009", func_8017D950); +extern void func_8012BF4C(s32 *a0, s16 a1); + extern s32 func_8012AD50(void *a0); + void func_8017D950(s32 *a0) { + func_8012BF4C(a0, 0); + ((void (*)(void *))func_8012AD50)((void *)a0); + } + INCLUDE_ASM("asm/ov_SC04_009/nonmatchings/ov_SC04_009", func_8017D984); diff --git a/src/ov_SC04_015/ov_SC04_015.c b/src/ov_SC04_015/ov_SC04_015.c index d6624f99a..d1629f2b8 100644 --- a/src/ov_SC04_015/ov_SC04_015.c +++ b/src/ov_SC04_015/ov_SC04_015.c @@ -5170,7 +5170,11 @@ INCLUDE_ASM("asm/ov_SC04_015/nonmatchings/ov_SC04_015", func_80182AA8); INCLUDE_ASM("asm/ov_SC04_015/nonmatchings/ov_SC04_015", func_80182B18); -INCLUDE_ASM("asm/ov_SC04_015/nonmatchings/ov_SC04_015", func_80182B30); +extern void func_8002D4C8(s32 arg0, s32 arg1); + void func_80182B30(void) { + func_8002D4C8(0x7E0, 0); + } + INCLUDE_ASM("asm/ov_SC04_015/nonmatchings/ov_SC04_015", func_80182B54); diff --git a/src/ov_SC04_018/ov_SC04_018.c b/src/ov_SC04_018/ov_SC04_018.c index aabbcac9d..f1d985168 100644 --- a/src/ov_SC04_018/ov_SC04_018.c +++ b/src/ov_SC04_018/ov_SC04_018.c @@ -5132,7 +5132,13 @@ INCLUDE_ASM("asm/ov_SC04_018/nonmatchings/ov_SC04_018", func_8018203C); INCLUDE_ASM("asm/ov_SC04_018/nonmatchings/ov_SC04_018", func_80182120); -INCLUDE_ASM("asm/ov_SC04_018/nonmatchings/ov_SC04_018", func_801821A8); +extern void func_80184CB8(s32 *a0, s32 a1); + extern short D_80191C08; + void func_801821A8(short *a0) { + *(short *)((char *)a0 + 0x2) = 0x5; + func_80184CB8((s32 *)a0, (s32)&D_80191C08); + } + INCLUDE_ASM("asm/ov_SC04_018/nonmatchings/ov_SC04_018", func_801821D4); diff --git a/src/ov_SC04_019/ov_SC04_019.c b/src/ov_SC04_019/ov_SC04_019.c index 206b1fe37..2a357986f 100644 --- a/src/ov_SC04_019/ov_SC04_019.c +++ b/src/ov_SC04_019/ov_SC04_019.c @@ -5346,7 +5346,11 @@ INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_80184A90); INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_80184AC4); -INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_80184B04); +extern short D_800BA2BA; + s32 func_80184B04(s32 arg0) { + return *(short *)((char *)&D_800BA2BA + (*(short *)(*(s32 *)(arg0 + 0xd0) + 0x10) << 2)); + } + INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_80184B2C); diff --git a/src/ov_SC05_001/ov_SC05_001.c b/src/ov_SC05_001/ov_SC05_001.c index 6b52669c2..a9a64bac1 100644 --- a/src/ov_SC05_001/ov_SC05_001.c +++ b/src/ov_SC05_001/ov_SC05_001.c @@ -5080,7 +5080,13 @@ INCLUDE_ASM("asm/ov_SC05_001/nonmatchings/ov_SC05_001", func_80183C9C); INCLUDE_ASM("asm/ov_SC05_001/nonmatchings/ov_SC05_001", func_80183FAC); -INCLUDE_ASM("asm/ov_SC05_001/nonmatchings/ov_SC05_001", func_80183FF8); +extern void func_80184430(s32 *a0); + extern s32 func_8018466C(s32 a0); + void func_80183FF8(s32 *a0) { + func_80184430(a0); + func_8018466C((s32)a0); + } + INCLUDE_ASM("asm/ov_SC05_001/nonmatchings/ov_SC05_001", func_80184028); diff --git a/src/ov_SC05_005/ov_SC05_005.c b/src/ov_SC05_005/ov_SC05_005.c index 6d9693c8e..97cd32822 100644 --- a/src/ov_SC05_005/ov_SC05_005.c +++ b/src/ov_SC05_005/ov_SC05_005.c @@ -4923,7 +4923,16 @@ INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_801806EC); INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_801808A4); -INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_80180900); +extern void func_8002AC00(s32 arg); +extern void func_8002A04C(s32 a0); +extern void func_8012C098(void); + +void func_80180900(u8 *a0) { + func_8002AC00(0x19); + ((s32 (*)(u8 *))func_8002A04C)(a0); + ((void (*)(u8 *))func_8012C098)(a0); +} + INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_8018093C); @@ -4990,7 +4999,12 @@ INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_80181D08); INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_80181DE4); -INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_80181F48); +extern void (*D_801ABAB4[])(void); + +void func_80181F48(void *a0) { + D_801ABAB4[*(u16 *)((s32)a0 + 0x2)](); +} + INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005", func_80181F84); diff --git a/src/ov_SC05_007/ov_SC05_007.c b/src/ov_SC05_007/ov_SC05_007.c index fca109d80..190639c92 100644 --- a/src/ov_SC05_007/ov_SC05_007.c +++ b/src/ov_SC05_007/ov_SC05_007.c @@ -4841,7 +4841,12 @@ INCLUDE_ASM("asm/ov_SC05_007/nonmatchings/ov_SC05_007", func_8017DAE4); INCLUDE_ASM("asm/ov_SC05_007/nonmatchings/ov_SC05_007", func_8017DB58); -INCLUDE_ASM("asm/ov_SC05_007/nonmatchings/ov_SC05_007", func_8017DB98); +extern void (*D_80190994[])(void); + +void func_8017DB98(void *a0) { + D_80190994[*(u16 *)((s32)a0 + 0x2)](); +} + INCLUDE_ASM("asm/ov_SC05_007/nonmatchings/ov_SC05_007", func_8017DBD4); diff --git a/src/ov_SC05_008/ov_SC05_008.c b/src/ov_SC05_008/ov_SC05_008.c index 962ab8faf..ca7c9f55c 100644 --- a/src/ov_SC05_008/ov_SC05_008.c +++ b/src/ov_SC05_008/ov_SC05_008.c @@ -4994,7 +4994,12 @@ INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_801809DC); INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_80180A14); -INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_80180AC0); +extern s32 func_8012AD50(void *a0); + void func_80180AC0(s32 *a0) { + *(s16 *)((s32)a0 + 0xFC) = 0; + ((void (*)(void))func_8012AD50)(); + } + INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_80180AE0); @@ -5038,7 +5043,12 @@ INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_801813D4); INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_801814D4); -INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_80181580); +extern s32 func_8012AD50(void *a0); + void func_80181580(s32 *a0) { + *(s16 *)((s32)a0 + 0xFC) = 0; + ((void (*)(void))func_8012AD50)(); + } + INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_801815A0); diff --git a/src/ov_SC05_010/ov_SC05_010.c b/src/ov_SC05_010/ov_SC05_010.c index 22c14e8cc..1aa4b3676 100644 --- a/src/ov_SC05_010/ov_SC05_010.c +++ b/src/ov_SC05_010/ov_SC05_010.c @@ -4958,7 +4958,12 @@ INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_801841A8); INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_801841E4); -INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_80184214); +extern void func_8012AD44(s32 *a0, s16 a1); + void func_80184214(void *a0) { + *(s8 *)((s32)a0 + 0xFC) = 0x8; + ((void (*)(s32, s32))func_8012AD44)((s32)a0, 0x2); + } + INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_8018423C); diff --git a/src/ov_SC05_017/ov_SC05_017.c b/src/ov_SC05_017/ov_SC05_017.c index 9f39656d6..77785c794 100644 --- a/src/ov_SC05_017/ov_SC05_017.c +++ b/src/ov_SC05_017/ov_SC05_017.c @@ -4817,11 +4817,18 @@ INCLUDE_ASM("asm/ov_SC05_017/nonmatchings/ov_SC05_017", func_8017DFC4); INCLUDE_ASM("asm/ov_SC05_017/nonmatchings/ov_SC05_017", func_8017E000); -INCLUDE_ASM("asm/ov_SC05_017/nonmatchings/ov_SC05_017", func_8017E03C); +extern s32 D_80127050; + void func_8017E03C(void) { + D_80127050 = 1; + } + INCLUDE_ASM("asm/ov_SC05_017/nonmatchings/ov_SC05_017", func_8017E050); -INCLUDE_ASM("asm/ov_SC05_017/nonmatchings/ov_SC05_017", func_8017E08C); +void func_8017E08C(u8 *a0) { + *(s8 *)(a0 + 0x214) = *(u8 *)(a0 + 0x214) + 1; + } + INCLUDE_ASM("asm/ov_SC05_017/nonmatchings/ov_SC05_017", func_8017E0A0); diff --git a/src/ov_SC05_018/ov_SC05_018.c b/src/ov_SC05_018/ov_SC05_018.c index 9826ae2a3..1788a0733 100644 --- a/src/ov_SC05_018/ov_SC05_018.c +++ b/src/ov_SC05_018/ov_SC05_018.c @@ -5025,7 +5025,11 @@ INCLUDE_ASM("asm/ov_SC05_018/nonmatchings/ov_SC05_018", func_80181570); INCLUDE_ASM("asm/ov_SC05_018/nonmatchings/ov_SC05_018", func_801815AC); -INCLUDE_ASM("asm/ov_SC05_018/nonmatchings/ov_SC05_018", func_80181648); +extern void func_80184590(s32 arg0, s32 arg1); + void func_80181648(void) { + func_80184590(0x7, 0x16); + } + INCLUDE_ASM("asm/ov_SC05_018/nonmatchings/ov_SC05_018", func_8018166C); diff --git a/src/ov_SC06_000/ov_SC06_000.c b/src/ov_SC06_000/ov_SC06_000.c index 706577f4d..fc42b419e 100644 --- a/src/ov_SC06_000/ov_SC06_000.c +++ b/src/ov_SC06_000/ov_SC06_000.c @@ -4974,7 +4974,11 @@ INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_8018103C); INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_80181074); -INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_801810B0); +extern s32 func_80171990(u8 *a0); + void func_801810B0(void) { + ((s32 (*)(void))func_80171990)(); + } + INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_801810D0); @@ -5091,7 +5095,11 @@ INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_80182A90); INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_80182AD0); -INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_80182AF0); +extern void func_80181774(void); + void func_80182AF0(void) { + func_80181774(); + } + INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_80182B10); diff --git a/src/ov_SC06_006/ov_SC06_006.c b/src/ov_SC06_006/ov_SC06_006.c index 81ae87bca..bfa42e6a0 100644 --- a/src/ov_SC06_006/ov_SC06_006.c +++ b/src/ov_SC06_006/ov_SC06_006.c @@ -4999,7 +4999,12 @@ INCLUDE_ASM("asm/ov_SC06_006/nonmatchings/ov_SC06_006", func_80180D9C); INCLUDE_ASM("asm/ov_SC06_006/nonmatchings/ov_SC06_006", func_80180DB0); -INCLUDE_ASM("asm/ov_SC06_006/nonmatchings/ov_SC06_006", func_80180E4C); +void func_80180E4C(void *a0) { + *(s16 *)((char *)a0 + 0x34) = 0; + *(s32 *)((char *)a0 + 0x1c) = 0x10; + *(u16 *)((char *)a0 + 0x2) += 1; + } + INCLUDE_ASM("asm/ov_SC06_006/nonmatchings/ov_SC06_006", func_80180E68); diff --git a/src/ov_SC06_010/ov_SC06_010.c b/src/ov_SC06_010/ov_SC06_010.c index 1852dac2f..470fb78d7 100644 --- a/src/ov_SC06_010/ov_SC06_010.c +++ b/src/ov_SC06_010/ov_SC06_010.c @@ -4818,7 +4818,13 @@ INCLUDE_ASM("asm/ov_SC06_010/nonmatchings/ov_SC06_010", func_8017E388); INCLUDE_ASM("asm/ov_SC06_010/nonmatchings/ov_SC06_010", func_8017E404); -INCLUDE_ASM("asm/ov_SC06_010/nonmatchings/ov_SC06_010", func_8017E424); +extern void func_8016EE40(s32 a0, s32 a1, s32 a2); +extern char D_8018A560; + +void func_8017E424(void) { + ((void (*)(void *, s32))func_8016EE40)(&D_8018A560, 0x1000000); +} + INCLUDE_ASM("asm/ov_SC06_010/nonmatchings/ov_SC06_010", func_8017E44C); diff --git a/src/ov_SC06_018/ov_SC06_018.c b/src/ov_SC06_018/ov_SC06_018.c index 3dec7996f..a6f2c5f8e 100644 --- a/src/ov_SC06_018/ov_SC06_018.c +++ b/src/ov_SC06_018/ov_SC06_018.c @@ -4912,7 +4912,13 @@ INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018", func_8017FC34); INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018", func_8017FD20); -INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018", func_8017FD54); +extern void func_8017EB8C(s32 arg0); + void func_8017FD54(u8 *param_1) { + param_1[0xC1] = 0xC; + *(s32 *)(param_1 + 0x1C) = 0x3C; + ((void (*)(void))func_8017EB8C)(); + } + INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018", func_8017FD80); diff --git a/src/ov_SC06_025/ov_SC06_025.c b/src/ov_SC06_025/ov_SC06_025.c index aa65d1dfd..00ab8290a 100644 --- a/src/ov_SC06_025/ov_SC06_025.c +++ b/src/ov_SC06_025/ov_SC06_025.c @@ -5042,7 +5042,11 @@ INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_80182D4C); INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_80182E14); -INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_80182EFC); +extern void func_8002D4C8(s32 arg0, s32 arg1); + void func_80182EFC(void) { + func_8002D4C8(0xC0E, 0); + } + INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_80182F20); diff --git a/src/ov_SC06_029/ov_SC06_029.c b/src/ov_SC06_029/ov_SC06_029.c index 3bc32b0f1..18398e6f2 100644 --- a/src/ov_SC06_029/ov_SC06_029.c +++ b/src/ov_SC06_029/ov_SC06_029.c @@ -5158,7 +5158,11 @@ INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_80187230); INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_801872C4); -INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_801872E4); +extern s32 func_8001AAA0(s32 arg); + s32 func_801872E4(void) { + return func_8001AAA0(0x95) != 0; + } + INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_80187304); diff --git a/src/ov_SC06_032/ov_SC06_032.c b/src/ov_SC06_032/ov_SC06_032.c index d14328bbe..6493695dc 100644 --- a/src/ov_SC06_032/ov_SC06_032.c +++ b/src/ov_SC06_032/ov_SC06_032.c @@ -5267,7 +5267,15 @@ INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032", func_8018C920); INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032", func_8018CA0C); -INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032", func_8018CA40); +extern void func_8018B878(void); + void func_8018CA40(s32 a0) { + s32 v0; + v0 = 0xC; + *(s8 *)(a0 + 0xC1) = v0; + *(s32 *)(a0 + 0x1C) = 0x3C; + ((void (*)(void))func_8018B878)(); + } + INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032", func_8018CA6C); diff --git a/src/ov_SC07_002/ov_SC07_002.c b/src/ov_SC07_002/ov_SC07_002.c index 8a727f939..037b1b6f3 100644 --- a/src/ov_SC07_002/ov_SC07_002.c +++ b/src/ov_SC07_002/ov_SC07_002.c @@ -4872,7 +4872,11 @@ INCLUDE_ASM("asm/ov_SC07_002/nonmatchings/ov_SC07_002", func_8017F5C4); INCLUDE_ASM("asm/ov_SC07_002/nonmatchings/ov_SC07_002", func_8017F680); -INCLUDE_ASM("asm/ov_SC07_002/nonmatchings/ov_SC07_002", func_8017F730); +extern void func_8017F750(void); + void func_8017F730(void) { + func_8017F750(); + } + INCLUDE_ASM("asm/ov_SC07_002/nonmatchings/ov_SC07_002", func_8017F750);