From 7e9dd8f03ae2da91efc2f08ef303614126213de3 Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Wed, 1 Jul 2026 06:05:00 -0600 Subject: [PATCH] =?UTF-8?q?feat(decomp):=20bulk=5Fharvest=20=E2=80=94=20+5?= =?UTF-8?q?3=20fns=20across=2048=20binaries,=202=20propagated=20(fleet=206?= =?UTF-8?q?4.42%)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/dedup.us.yaml | 14 ++++++++++++++ src/ov_SC02_005/ov_SC02_005.c | 9 ++++++++- src/ov_SC02_011/ov_SC02_011.c | 6 +++++- src/ov_SC02_017/ov_SC02_017.c | 15 +++++++++++++-- src/ov_SC02_028/ov_SC02_028.c | 8 +++++++- src/ov_SC02_041/ov_SC02_041.c | 8 +++++++- src/ov_SC03_001/ov_SC03_001.c | 8 +++++++- src/ov_SC03_002/ov_SC03_002.c | 8 +++++++- src/ov_SC03_006/ov_SC03_006.c | 6 +++++- src/ov_SC03_011/ov_SC03_011.c | 20 ++++++++++++++++++-- src/ov_SC03_014/ov_SC03_014.c | 5 +++-- src/ov_SC03_015/ov_SC03_015.c | 13 ++++++++++--- src/ov_SC03_024/ov_SC03_024.c | 12 ++++++++++-- src/ov_SC03_028/ov_SC03_028.c | 6 +++++- src/ov_SC03_091/ov_SC03_091.c | 8 +++++++- src/ov_SC03_092/ov_SC03_092.c | 6 +++++- src/ov_SC03_093/ov_SC03_093.c | 9 ++++++++- src/ov_SC03_096/ov_SC03_096.c | 7 ++++++- src/ov_SC03_097/ov_SC03_097.c | 7 ++++++- src/ov_SC03_098/ov_SC03_098.c | 8 +++++++- src/ov_SC03_099/ov_SC03_099.c | 17 +++++++++++++++-- src/ov_SC03_100/ov_SC03_100.c | 8 +++++++- src/ov_SC03_101/ov_SC03_101.c | 7 ++++++- src/ov_SC03_102/ov_SC03_102.c | 9 ++++++++- src/ov_SC03_105/ov_SC03_105.c | 6 +++++- src/ov_SC03_111/ov_SC03_111.c | 7 ++++++- src/ov_SC03_112/ov_SC03_112.c | 9 ++++++++- src/ov_SC03_118/ov_SC03_118.c | 6 +++++- src/ov_SC04_000/ov_SC04_000.c | 6 +++++- src/ov_SC04_003/ov_SC04_003.c | 8 +++++++- src/ov_SC04_004/ov_SC04_004.c | 8 +++++++- src/ov_SC04_005/ov_SC04_005.c | 6 +++++- src/ov_SC04_011/ov_SC04_011.c | 6 +++++- src/ov_SC04_012/ov_SC04_012.c | 8 +++++++- src/ov_SC04_019/ov_SC04_019.c | 6 +++++- src/ov_SC04_020/ov_SC04_020.c | 6 +++++- src/ov_SC05_003/ov_SC05_003.c | 7 ++++++- src/ov_SC05_008/ov_SC05_008.c | 7 ++++++- src/ov_SC05_010/ov_SC05_010.c | 6 +++++- src/ov_SC06_000/ov_SC06_000.c | 8 +++++++- src/ov_SC06_008/ov_SC06_008.c | 6 +++++- src/ov_SC06_020/ov_SC06_020.c | 8 +++++++- src/ov_SC06_022/ov_SC06_022.c | 6 +++++- src/ov_SC06_024/ov_SC06_024.c | 6 +++++- src/ov_SC06_025/ov_SC06_025.c | 6 +++++- src/ov_SC06_029/ov_SC06_029.c | 6 +++++- src/ov_SC06_030/ov_SC06_030.c | 8 +++++++- src/ov_SC07_000/ov_SC07_000.c | 9 ++++++++- src/ov_SC07_009/ov_SC07_009.c | 7 ++++++- src/shared/engine_core.h | 14 ++++++++++++++ 50 files changed, 355 insertions(+), 55 deletions(-) diff --git a/config/dedup.us.yaml b/config/dedup.us.yaml index 5cbdf7758..4ec218a50 100644 --- a/config/dedup.us.yaml +++ b/config/dedup.us.yaml @@ -12378,3 +12378,17 @@ groups: func: DEFINE_func_801819B0 vram: 0x801819B0 binaries: [ov_SC04_018, ov_SC04_019] + - id: E_func_8018071C + tier: h_exact + hash: a19e9b10804ad4ac30a539acb9239626d246bed4 + source: src/shared/engine_core.h + func: DEFINE_func_8018071C + vram: 0x8018071C + binaries: [ov_SC03_014, ov_SC03_015] + - id: E_func_80183930 + tier: h_exact + hash: 20a4f42e7ee4feefc7372f548704b8b805017119 + source: src/shared/engine_core.h + func: DEFINE_func_80183930 + vram: 0x80183930 + binaries: [ov_SC03_014, ov_SC03_015] diff --git a/src/ov_SC02_005/ov_SC02_005.c b/src/ov_SC02_005/ov_SC02_005.c index 8c0f08147..249c7c051 100644 --- a/src/ov_SC02_005/ov_SC02_005.c +++ b/src/ov_SC02_005/ov_SC02_005.c @@ -5830,7 +5830,14 @@ void func_8018DAD8(void) { INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005", func_8018DAE0); -INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005", func_8018DB1C); +extern s32 D_80196C14; + +void func_8018DB1C(s32 arg0) { + *(s32 *)(arg0 + 0x58) = &D_80196C14; + *(s32 *)(arg0 + 0x1C) = 0x18; + *(s16 *)(arg0 + 0x2) += 1; +} + INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005", func_8018DB40); diff --git a/src/ov_SC02_011/ov_SC02_011.c b/src/ov_SC02_011/ov_SC02_011.c index 8346d6283..1eaacac81 100644 --- a/src/ov_SC02_011/ov_SC02_011.c +++ b/src/ov_SC02_011/ov_SC02_011.c @@ -5346,7 +5346,11 @@ INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011", func_801865E4); INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011", func_80186680); -INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011", func_801866E8); +extern s32 func_8017E358(void); + void func_801866E8(void) { + func_8017E358(); + } + extern void func_8017E43C(void); void func_80186708(void) { diff --git a/src/ov_SC02_017/ov_SC02_017.c b/src/ov_SC02_017/ov_SC02_017.c index 9a6f35998..7167fcbb2 100644 --- a/src/ov_SC02_017/ov_SC02_017.c +++ b/src/ov_SC02_017/ov_SC02_017.c @@ -5185,7 +5185,12 @@ INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80182EB0); INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80182F58); -INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80182FA4); +extern s32 func_8012AD50(void *a0); + void func_80182FA4(s32 *param) { + *(u16 *)((char *)param + 0x72) |= 0x1000; + ((void (*)(void))func_8012AD50)(); + } + INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80182FD0); @@ -5545,7 +5550,13 @@ INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80188CB4); INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80188E00); -INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80188F20); +extern void func_8012C218(void *a0); + s32 func_80188F20(void * arg0) + { + *(short *)((char *)arg0 + 0x2) = 2; + ((void (*)(s32 *))func_8012C218)(*(s32 **)((char *)arg0 + 0xcc)); + } + INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017", func_80188F4C); diff --git a/src/ov_SC02_028/ov_SC02_028.c b/src/ov_SC02_028/ov_SC02_028.c index 51864ff72..e32e9a84e 100644 --- a/src/ov_SC02_028/ov_SC02_028.c +++ b/src/ov_SC02_028/ov_SC02_028.c @@ -5120,7 +5120,13 @@ extern void func_8012AD44(s32 *a0, s16 a1); } -INCLUDE_ASM("asm/ov_SC02_028/nonmatchings/ov_SC02_028", func_80181788); +extern void func_8012AD44(s32 *a0, s16 a1); + void func_80181788(s32 *a0) { + *(s32 *)((char *)a0 + 0x14) = 0x80000; + *(s32 *)((char *)a0 + 0x1C) = 0x50; + ((void (*)(s32 *, s32))func_8012AD44)(a0, 2); + } + INCLUDE_ASM("asm/ov_SC02_028/nonmatchings/ov_SC02_028", func_801817B8); diff --git a/src/ov_SC02_041/ov_SC02_041.c b/src/ov_SC02_041/ov_SC02_041.c index 871af15d6..a24245372 100644 --- a/src/ov_SC02_041/ov_SC02_041.c +++ b/src/ov_SC02_041/ov_SC02_041.c @@ -4853,7 +4853,13 @@ INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041", func_8017E5DC); INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041", func_8017E5E4); -INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041", func_8017E620); +extern void func_8012BF4C(s32 *a0, s16 a1); + extern s32 func_8012AD50(void *a0); + void func_8017E620(s32 *a0) { + func_8012BF4C(a0, 0); + ((s32 (*)(s32))func_8012AD50)((s32)a0); + } + INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041", func_8017E654); diff --git a/src/ov_SC03_001/ov_SC03_001.c b/src/ov_SC03_001/ov_SC03_001.c index 2711c4b28..1c679e04d 100644 --- a/src/ov_SC03_001/ov_SC03_001.c +++ b/src/ov_SC03_001/ov_SC03_001.c @@ -5521,7 +5521,13 @@ extern void func_80187778(s32 *a0, s32 a1); } -INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_801858CC); +extern void func_80187778(s32 *a0, s32 a1); + extern short D_80192864; + void func_801858CC(short *param_1) { + *(short *)((char *)param_1 + 2) = 0x12; + func_80187778((s32 *)param_1, (int)&D_80192864); + } + INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001", func_801858F8); diff --git a/src/ov_SC03_002/ov_SC03_002.c b/src/ov_SC03_002/ov_SC03_002.c index c07e288e3..873777c75 100644 --- a/src/ov_SC03_002/ov_SC03_002.c +++ b/src/ov_SC03_002/ov_SC03_002.c @@ -5020,7 +5020,13 @@ INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_8018137C); INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_801813E4); -INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_801814F0); +extern void func_80183264(void *a0, s32 a1); + extern short D_80189928; + void func_801814F0(s32 a0) { + *(short *)(a0 + 0x2) = 2; + func_80183264((void *)a0, &D_80189928); + } + INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002", func_8018151C); diff --git a/src/ov_SC03_006/ov_SC03_006.c b/src/ov_SC03_006/ov_SC03_006.c index b64ddaa07..c76489621 100644 --- a/src/ov_SC03_006/ov_SC03_006.c +++ b/src/ov_SC03_006/ov_SC03_006.c @@ -5545,7 +5545,11 @@ INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_8018B7F8); INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_8018B868); -INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_8018B9F8); +extern void func_80029124(s32 arg0, s32 arg1); + void func_8018B9F8(void) { + func_80029124(0xF0, 1); + } + INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006", func_8018BA1C); diff --git a/src/ov_SC03_011/ov_SC03_011.c b/src/ov_SC03_011/ov_SC03_011.c index b74c2be09..6ad3eb398 100644 --- a/src/ov_SC03_011/ov_SC03_011.c +++ b/src/ov_SC03_011/ov_SC03_011.c @@ -4872,13 +4872,29 @@ INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011", func_8017E13C); INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011", func_8017E170); -INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011", func_8017E214); +extern s32 D_80197608; +extern s32 D_80126950; +extern void func_80174E9C(s32); + +void func_8017E214(void) { + D_80126950 = 0x1F4; + func_80174E9C((s32)&D_80197608); +} + INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011", func_8017E248); INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011", func_8017E2F0); -INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011", func_8017E328); +extern s32 D_80197608; +extern s32 D_80126950; +extern void func_80174EF0(s32 a0, s16 a1); + +void func_8017E328(void) { + D_80126950 = 0x1F4; + ((void (*)(s32, s32))func_80174EF0)((s32)&D_80197608, 0xC7); +} + INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011", func_8017E35C); diff --git a/src/ov_SC03_014/ov_SC03_014.c b/src/ov_SC03_014/ov_SC03_014.c index 14d0606b5..acc3eb980 100644 --- a/src/ov_SC03_014/ov_SC03_014.c +++ b/src/ov_SC03_014/ov_SC03_014.c @@ -4890,7 +4890,8 @@ INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014", func_801806B4); DEFINE_func_80180714() /* dedup: shared engine-core @0x80180714 (src/shared) */ -INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014", func_8018071C); +DEFINE_func_8018071C() /* dedup: shared engine-core @0x8018071C (src/shared) */ + INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014", func_80180744); @@ -5040,7 +5041,7 @@ INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014", func_8018385C); INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014", func_80183898); -INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014", func_80183930); +DEFINE_func_80183930() /* dedup: shared engine-core @0x80183930 (src/shared) */ DEFINE_func_80183958() /* dedup: shared engine-core @0x80183958 (src/shared) */ diff --git a/src/ov_SC03_015/ov_SC03_015.c b/src/ov_SC03_015/ov_SC03_015.c index 402183ceb..142c49b77 100644 --- a/src/ov_SC03_015/ov_SC03_015.c +++ b/src/ov_SC03_015/ov_SC03_015.c @@ -4759,7 +4759,13 @@ INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_8017BF58); DEFINE_func_8017BF98() /* dedup: shared engine-core @0x8017BF98 (src/shared) */ -INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_8017BFA0); +extern void func_80174684(void *); + extern s32 func_8017BFC8; + s32 func_8017BFA0(void) +{ + func_80174684(&func_8017BFC8); + } + INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_8017BFC8); @@ -4881,7 +4887,7 @@ INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_801806B4); DEFINE_func_80180714() /* dedup: shared engine-core @0x80180714 (src/shared) */ -INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_8018071C); +DEFINE_func_8018071C() /* dedup: shared engine-core @0x8018071C (src/shared) */ INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_80180744); @@ -5039,7 +5045,8 @@ INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_8018385C); INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_80183898); -INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015", func_80183930); +DEFINE_func_80183930() /* dedup: shared engine-core @0x80183930 (src/shared) */ + DEFINE_func_80183958() /* dedup: shared engine-core @0x80183958 (src/shared) */ diff --git a/src/ov_SC03_024/ov_SC03_024.c b/src/ov_SC03_024/ov_SC03_024.c index d0ae8fcc5..e20f94198 100644 --- a/src/ov_SC03_024/ov_SC03_024.c +++ b/src/ov_SC03_024/ov_SC03_024.c @@ -5165,7 +5165,11 @@ INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80182DA4); INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80182E60); -INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80182EC8); +extern s32 func_80182844(void); + void func_80182EC8(void) { + func_80182844(); + } + INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80182EE8); @@ -5209,7 +5213,11 @@ extern s32 func_80180838(void); } -INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80184668); +extern void func_8018091C(void); + void func_80184668(void) { + func_8018091C(); + } + INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024", func_80184688); diff --git a/src/ov_SC03_028/ov_SC03_028.c b/src/ov_SC03_028/ov_SC03_028.c index fa1fdae88..b69b6a6fa 100644 --- a/src/ov_SC03_028/ov_SC03_028.c +++ b/src/ov_SC03_028/ov_SC03_028.c @@ -4809,7 +4809,11 @@ INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_8017DF2C); INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_8017DF98); -INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_8017EE64); +extern s32 func_80146994(s32 a0, s32 a1, s32 a2, s32 a3); + void func_8017EE64(void *arg0) { + ((void (*)(s32, s32, s32, s32))func_80146994)(0x49, (s32)arg0, 0, 0); + } + INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028", func_8017EE90); diff --git a/src/ov_SC03_091/ov_SC03_091.c b/src/ov_SC03_091/ov_SC03_091.c index e7c4ac7cd..61048815a 100644 --- a/src/ov_SC03_091/ov_SC03_091.c +++ b/src/ov_SC03_091/ov_SC03_091.c @@ -4896,7 +4896,13 @@ INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_801821E8); INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_8018222C); -INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_80182268); +extern void func_8016EE40(s32 a0, s32 a1, s32 a2); +extern s32 D_801906D4; + +void func_80182268(void) { + ((void (*)(void *, s32))func_8016EE40)(&D_801906D4, 0x1000000); +} + INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091", func_80182290); diff --git a/src/ov_SC03_092/ov_SC03_092.c b/src/ov_SC03_092/ov_SC03_092.c index c5901b2d1..1157d1fee 100644 --- a/src/ov_SC03_092/ov_SC03_092.c +++ b/src/ov_SC03_092/ov_SC03_092.c @@ -4815,7 +4815,11 @@ INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017DB2C); INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017DB6C); -INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017DBE8); +extern void func_800D1EBC(void); + void func_8017DBE8(void) { + func_800D1EBC(); + } + INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092", func_8017DC08); diff --git a/src/ov_SC03_093/ov_SC03_093.c b/src/ov_SC03_093/ov_SC03_093.c index 413e9cce3..4eec3e134 100644 --- a/src/ov_SC03_093/ov_SC03_093.c +++ b/src/ov_SC03_093/ov_SC03_093.c @@ -5156,7 +5156,14 @@ INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093", func_80185720); INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093", func_8018575C); -INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093", func_80185804); +void func_80185804(void *a0) { + *(u16 *)((char *)a0 + 0xdc) -= 1; + if (*(s16 *)((char *)a0 + 0xdc) == 0) { + *(u16 *)((char *)a0 + 0xdc) = 0x1e; + *(u16 *)((char *)a0 + 0x2) = 2; + } + } + INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093", func_80185834); diff --git a/src/ov_SC03_096/ov_SC03_096.c b/src/ov_SC03_096/ov_SC03_096.c index 8cf28f484..5beb743d0 100644 --- a/src/ov_SC03_096/ov_SC03_096.c +++ b/src/ov_SC03_096/ov_SC03_096.c @@ -4883,7 +4883,12 @@ void func_8017F1F0(void) { } -INCLUDE_ASM("asm/ov_SC03_096/nonmatchings/ov_SC03_096", func_8017F200); +extern void (*D_80192A4C[])(void); + +void func_8017F200(void *a0) { + D_80192A4C[*(u16 *)((s32)a0 + 0x2)](); +} + INCLUDE_ASM("asm/ov_SC03_096/nonmatchings/ov_SC03_096", func_8017F23C); diff --git a/src/ov_SC03_097/ov_SC03_097.c b/src/ov_SC03_097/ov_SC03_097.c index 1c59f6fbf..4c570582c 100644 --- a/src/ov_SC03_097/ov_SC03_097.c +++ b/src/ov_SC03_097/ov_SC03_097.c @@ -4927,7 +4927,12 @@ INCLUDE_ASM("asm/ov_SC03_097/nonmatchings/ov_SC03_097", func_8017F704); INCLUDE_ASM("asm/ov_SC03_097/nonmatchings/ov_SC03_097", func_8017F724); -INCLUDE_ASM("asm/ov_SC03_097/nonmatchings/ov_SC03_097", func_8017F7C0); +extern void func_8012AD44(s32 *a0, s16 a1); + void func_8017F7C0(s32 a0) { + *(s16 *)(a0 + 0xFC) = 0; + ((void (*)(void *, s32))func_8012AD44)((void *)a0, 0x1); + } + INCLUDE_ASM("asm/ov_SC03_097/nonmatchings/ov_SC03_097", func_8017F7E4); diff --git a/src/ov_SC03_098/ov_SC03_098.c b/src/ov_SC03_098/ov_SC03_098.c index 795c90eb6..f1b2f4909 100644 --- a/src/ov_SC03_098/ov_SC03_098.c +++ b/src/ov_SC03_098/ov_SC03_098.c @@ -5095,7 +5095,13 @@ INCLUDE_ASM("asm/ov_SC03_098/nonmatchings/ov_SC03_098", func_80184BB4); INCLUDE_ASM("asm/ov_SC03_098/nonmatchings/ov_SC03_098", func_80184C38); -INCLUDE_ASM("asm/ov_SC03_098/nonmatchings/ov_SC03_098", func_80184D44); +extern void func_8012CBCC(s32 a0); + void func_80184D44(void *a0) { + if ((((s32 (*)(s32))func_8012CBCC)((s32)a0) & 0x2000) != 0) { + *(s16 *)((u8 *)a0 + 2) = 2; + } + } + INCLUDE_ASM("asm/ov_SC03_098/nonmatchings/ov_SC03_098", func_80184D7C); diff --git a/src/ov_SC03_099/ov_SC03_099.c b/src/ov_SC03_099/ov_SC03_099.c index 462ef3621..00e967e28 100644 --- a/src/ov_SC03_099/ov_SC03_099.c +++ b/src/ov_SC03_099/ov_SC03_099.c @@ -4813,7 +4813,12 @@ INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_8017E168); INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_8017E518); -INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_8017E604); +extern void (*D_801989D8[])(void); + +void func_8017E604(void *a0) { + D_801989D8[*(u16 *)((s32)a0 + 0x2)](); +} + INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_8017E640); @@ -4944,7 +4949,15 @@ INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_80181AC0); INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_80181B98); -INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_80181C00); +extern s32 func_80153BD8(s32 arg); + extern s32 func_80153BF0(s32 a0); + void func_80181C00(u8 *a0) { + *(s16 *)(a0 + 0xfe) = 0; + if (func_80153BD8((s32)a0)) { + ((void (*)(void *))func_80153BF0)(a0); + } + } + INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099", func_80181C3C); diff --git a/src/ov_SC03_100/ov_SC03_100.c b/src/ov_SC03_100/ov_SC03_100.c index 49c6eaccd..13f696008 100644 --- a/src/ov_SC03_100/ov_SC03_100.c +++ b/src/ov_SC03_100/ov_SC03_100.c @@ -5032,7 +5032,13 @@ INCLUDE_ASM("asm/ov_SC03_100/nonmatchings/ov_SC03_100", func_801832EC); INCLUDE_ASM("asm/ov_SC03_100/nonmatchings/ov_SC03_100", func_80183370); -INCLUDE_ASM("asm/ov_SC03_100/nonmatchings/ov_SC03_100", func_8018347C); +extern void func_8012CBCC(s32 a0); + void func_8018347C(s32 arg0) { + if ((((s32 (*)(void))func_8012CBCC)() & 0x2000) != 0) { + *(s16*)(arg0 + 0x2) = 0x2; + } + } + INCLUDE_ASM("asm/ov_SC03_100/nonmatchings/ov_SC03_100", func_801834B4); diff --git a/src/ov_SC03_101/ov_SC03_101.c b/src/ov_SC03_101/ov_SC03_101.c index e2503a615..634ce815b 100644 --- a/src/ov_SC03_101/ov_SC03_101.c +++ b/src/ov_SC03_101/ov_SC03_101.c @@ -4955,7 +4955,12 @@ INCLUDE_ASM("asm/ov_SC03_101/nonmatchings/ov_SC03_101", func_801806B8); INCLUDE_ASM("asm/ov_SC03_101/nonmatchings/ov_SC03_101", func_80180754); -INCLUDE_ASM("asm/ov_SC03_101/nonmatchings/ov_SC03_101", func_80180790); +extern void func_8012AD44(s32 *a0, s16 a1); + void func_80180790(void *arg0) { + *(s32 *)((char *)arg0 + 0x1c) = 0x20; + ((void (*)(s32, s32))func_8012AD44)((s32)arg0, 0x4); + } + INCLUDE_ASM("asm/ov_SC03_101/nonmatchings/ov_SC03_101", func_801807B8); diff --git a/src/ov_SC03_102/ov_SC03_102.c b/src/ov_SC03_102/ov_SC03_102.c index f51a6f82b..4a8cc7d3e 100644 --- a/src/ov_SC03_102/ov_SC03_102.c +++ b/src/ov_SC03_102/ov_SC03_102.c @@ -4955,7 +4955,14 @@ INCLUDE_ASM("asm/ov_SC03_102/nonmatchings/ov_SC03_102", func_80184B00); INCLUDE_ASM("asm/ov_SC03_102/nonmatchings/ov_SC03_102", func_80184B34); -INCLUDE_ASM("asm/ov_SC03_102/nonmatchings/ov_SC03_102", func_80184B90); +extern s32 func_80153BD8(s32 arg); + extern s32 func_80153BF0(s32 a0); + void func_80184B90(s32 arg0) { + if (func_80153BD8(arg0)) { + ((void (*)(s32))func_80153BF0)(arg0); + } + } + INCLUDE_ASM("asm/ov_SC03_102/nonmatchings/ov_SC03_102", func_80184BC8); diff --git a/src/ov_SC03_105/ov_SC03_105.c b/src/ov_SC03_105/ov_SC03_105.c index 1d4bbde55..429ccfeca 100644 --- a/src/ov_SC03_105/ov_SC03_105.c +++ b/src/ov_SC03_105/ov_SC03_105.c @@ -4968,7 +4968,11 @@ INCLUDE_ASM("asm/ov_SC03_105/nonmatchings/ov_SC03_105", func_80183D38); INCLUDE_ASM("asm/ov_SC03_105/nonmatchings/ov_SC03_105", func_80183DA0); -INCLUDE_ASM("asm/ov_SC03_105/nonmatchings/ov_SC03_105", func_80183EE8); +extern void func_8002D4C8(s32 arg0, s32 arg1); + void func_80183EE8(void) { + func_8002D4C8(0x4, 0x730); + } + INCLUDE_ASM("asm/ov_SC03_105/nonmatchings/ov_SC03_105", func_80183F0C); diff --git a/src/ov_SC03_111/ov_SC03_111.c b/src/ov_SC03_111/ov_SC03_111.c index 63954da55..5869166dd 100644 --- a/src/ov_SC03_111/ov_SC03_111.c +++ b/src/ov_SC03_111/ov_SC03_111.c @@ -5033,7 +5033,12 @@ INCLUDE_ASM("asm/ov_SC03_111/nonmatchings/ov_SC03_111", func_80184234); INCLUDE_ASM("asm/ov_SC03_111/nonmatchings/ov_SC03_111", func_80184380); -INCLUDE_ASM("asm/ov_SC03_111/nonmatchings/ov_SC03_111", func_801844A0); +extern void func_8012C218(void *a0); + s32 func_801844A0(void *arg0) { + *(s16 *)((char *)arg0 + 0x2) = 2; + ((void (*)(s32 *))func_8012C218)(*(s32 **)((char *)arg0 + 0xcc)); + } + INCLUDE_ASM("asm/ov_SC03_111/nonmatchings/ov_SC03_111", func_801844CC); diff --git a/src/ov_SC03_112/ov_SC03_112.c b/src/ov_SC03_112/ov_SC03_112.c index 455ecbc4e..34c4df802 100644 --- a/src/ov_SC03_112/ov_SC03_112.c +++ b/src/ov_SC03_112/ov_SC03_112.c @@ -4843,7 +4843,14 @@ INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112", func_8017F3F4); void func_8017F458(void) { } -INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112", func_8017F460); +extern void func_80178CBC(s32 a0, s32 a1); +extern M2C_UNK D_801896F0; + +void func_8017F460(void * arg0) { + ((void (*)(void *, void *))func_80178CBC)(arg0, &D_801896F0); + *(s16 *)((char *)arg0 + 0x2) = 0x3; +} + INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112", func_8017F498); diff --git a/src/ov_SC03_118/ov_SC03_118.c b/src/ov_SC03_118/ov_SC03_118.c index 1e1101a51..60e20d6f0 100644 --- a/src/ov_SC03_118/ov_SC03_118.c +++ b/src/ov_SC03_118/ov_SC03_118.c @@ -5021,7 +5021,11 @@ extern void func_8012AD44(s32 *a0, s16 a1); INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118", func_80182570); -INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118", func_80182590); +extern void func_8013CAE8(void); + void func_80182590(void) { + func_8013CAE8(); + } + INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118", func_801825B0); diff --git a/src/ov_SC04_000/ov_SC04_000.c b/src/ov_SC04_000/ov_SC04_000.c index f6595dd9a..8870d107e 100644 --- a/src/ov_SC04_000/ov_SC04_000.c +++ b/src/ov_SC04_000/ov_SC04_000.c @@ -5108,6 +5108,10 @@ INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000", func_80183098); INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000", func_801830A8); -INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000", func_801830C0); +extern void func_800296F8(void *a0); + s32 func_801830C0(s32 arg0) { + return ((s32 (*)(void *))func_800296F8)(*(s32 *)(arg0 + 0xdc)); + } + INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000", func_801830E4); diff --git a/src/ov_SC04_003/ov_SC04_003.c b/src/ov_SC04_003/ov_SC04_003.c index 92cf67f38..464fc2c8b 100644 --- a/src/ov_SC04_003/ov_SC04_003.c +++ b/src/ov_SC04_003/ov_SC04_003.c @@ -4951,7 +4951,13 @@ INCLUDE_ASM("asm/ov_SC04_003/nonmatchings/ov_SC04_003", func_801809C4); INCLUDE_ASM("asm/ov_SC04_003/nonmatchings/ov_SC04_003", func_80180A78); -INCLUDE_ASM("asm/ov_SC04_003/nonmatchings/ov_SC04_003", func_80180B10); +extern void func_8012B23C(s32 arg); + extern void func_8012AD44(s32 *a0, s16 a1); + void func_80180B10(s32 param_1) { + func_8012B23C(param_1); + ((s32 (*)(s32, s32))func_8012AD44)(param_1, 1); + } + INCLUDE_ASM("asm/ov_SC04_003/nonmatchings/ov_SC04_003", func_80180B44); diff --git a/src/ov_SC04_004/ov_SC04_004.c b/src/ov_SC04_004/ov_SC04_004.c index 54538b2f0..13fd459fa 100644 --- a/src/ov_SC04_004/ov_SC04_004.c +++ b/src/ov_SC04_004/ov_SC04_004.c @@ -5014,7 +5014,13 @@ INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_80181AD4); INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_80181B6C); -INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_80181BA0); +extern void func_8012B21C(void *a0); + extern void func_8012AD44(s32 *a0, s16 a1); + void func_80181BA0(s32 param_1) { + ((void (*)(s32))func_8012B21C)(param_1); + ((void (*)(s32, s32))func_8012AD44)(param_1, 2); + } + INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004", func_80181BD4); diff --git a/src/ov_SC04_005/ov_SC04_005.c b/src/ov_SC04_005/ov_SC04_005.c index 7575cedce..8cbc9e05a 100644 --- a/src/ov_SC04_005/ov_SC04_005.c +++ b/src/ov_SC04_005/ov_SC04_005.c @@ -4839,7 +4839,11 @@ INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_8017EC18); INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_8017EC58); -INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_8017ECD4); +extern void func_800D1EBC(void); + void func_8017ECD4(void) { + func_800D1EBC(); + } + INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005", func_8017ECF4); diff --git a/src/ov_SC04_011/ov_SC04_011.c b/src/ov_SC04_011/ov_SC04_011.c index 7b7ec495c..a414bc83b 100644 --- a/src/ov_SC04_011/ov_SC04_011.c +++ b/src/ov_SC04_011/ov_SC04_011.c @@ -4922,7 +4922,11 @@ INCLUDE_ASM("asm/ov_SC04_011/nonmatchings/ov_SC04_011", func_80180050); INCLUDE_ASM("asm/ov_SC04_011/nonmatchings/ov_SC04_011", func_8018008C); -INCLUDE_ASM("asm/ov_SC04_011/nonmatchings/ov_SC04_011", func_80180200); +extern s32 D_801151D4; + void func_80180200(void) { + *(s32 *)(D_801151D4 + 0x14) = 0x2EE; + } + INCLUDE_ASM("asm/ov_SC04_011/nonmatchings/ov_SC04_011", func_80180214); diff --git a/src/ov_SC04_012/ov_SC04_012.c b/src/ov_SC04_012/ov_SC04_012.c index 4dd4d75fc..75693456d 100644 --- a/src/ov_SC04_012/ov_SC04_012.c +++ b/src/ov_SC04_012/ov_SC04_012.c @@ -4841,7 +4841,13 @@ INCLUDE_ASM("asm/ov_SC04_012/nonmatchings/ov_SC04_012", func_8017E060); INCLUDE_ASM("asm/ov_SC04_012/nonmatchings/ov_SC04_012", func_8017E090); -INCLUDE_ASM("asm/ov_SC04_012/nonmatchings/ov_SC04_012", func_8017E0CC); +extern void func_8012BF4C(s32 *a0, s16 a1); + extern s32 func_8012AD50(void *a0); + void func_8017E0CC(s32 *a0) { + func_8012BF4C(a0, 0); + ((void (*)(void *))func_8012AD50)((void *)a0); + } + INCLUDE_ASM("asm/ov_SC04_012/nonmatchings/ov_SC04_012", func_8017E100); diff --git a/src/ov_SC04_019/ov_SC04_019.c b/src/ov_SC04_019/ov_SC04_019.c index 758b5be73..2676c89c2 100644 --- a/src/ov_SC04_019/ov_SC04_019.c +++ b/src/ov_SC04_019/ov_SC04_019.c @@ -5647,7 +5647,11 @@ INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_8018BE38); INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_8018BE74); -INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_8018BEE8); +extern s32 func_8014CB1C(void); + s32 func_8018BEE8(void) { + return func_8014CB1C() != 0; + } + INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019", func_8018BF08); diff --git a/src/ov_SC04_020/ov_SC04_020.c b/src/ov_SC04_020/ov_SC04_020.c index dc366f1ca..1c1ef9304 100644 --- a/src/ov_SC04_020/ov_SC04_020.c +++ b/src/ov_SC04_020/ov_SC04_020.c @@ -5081,7 +5081,11 @@ INCLUDE_ASM("asm/ov_SC04_020/nonmatchings/ov_SC04_020", func_80181E40); INCLUDE_ASM("asm/ov_SC04_020/nonmatchings/ov_SC04_020", func_80181EBC); -INCLUDE_ASM("asm/ov_SC04_020/nonmatchings/ov_SC04_020", func_80181F88); +extern s32 func_801826C8(void); + void func_80181F88(void) { + func_801826C8(); + } + INCLUDE_ASM("asm/ov_SC04_020/nonmatchings/ov_SC04_020", func_80181FA8); diff --git a/src/ov_SC05_003/ov_SC05_003.c b/src/ov_SC05_003/ov_SC05_003.c index 06fbf51d9..3fae6eaa2 100644 --- a/src/ov_SC05_003/ov_SC05_003.c +++ b/src/ov_SC05_003/ov_SC05_003.c @@ -4969,7 +4969,12 @@ INCLUDE_ASM("asm/ov_SC05_003/nonmatchings/ov_SC05_003", func_80181C00); INCLUDE_ASM("asm/ov_SC05_003/nonmatchings/ov_SC05_003", func_80181CDC); -INCLUDE_ASM("asm/ov_SC05_003/nonmatchings/ov_SC05_003", func_80181E40); +extern void (*D_801A9F5C[])(void); + +void func_80181E40(void *a0) { + D_801A9F5C[*(u16 *)((s32)a0 + 0x2)](); +} + INCLUDE_ASM("asm/ov_SC05_003/nonmatchings/ov_SC05_003", func_80181E7C); diff --git a/src/ov_SC05_008/ov_SC05_008.c b/src/ov_SC05_008/ov_SC05_008.c index 3062e0ff1..ac703ac88 100644 --- a/src/ov_SC05_008/ov_SC05_008.c +++ b/src/ov_SC05_008/ov_SC05_008.c @@ -4934,7 +4934,12 @@ INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_8018012C); INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_80180164); -INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_80180210); +extern s32 func_8012AD50(void *a0); + void func_80180210(s32 *a0) { + *(s16 *)((s32)a0 + 0xFC) = 0; + ((void (*)(void))func_8012AD50)(); + } + INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008", func_80180230); diff --git a/src/ov_SC05_010/ov_SC05_010.c b/src/ov_SC05_010/ov_SC05_010.c index 3804abd0c..afeef3315 100644 --- a/src/ov_SC05_010/ov_SC05_010.c +++ b/src/ov_SC05_010/ov_SC05_010.c @@ -4844,7 +4844,11 @@ INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_8017E874); INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_8017E910); -INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_8017E9B4); +extern void func_8012A100(s8 a0); + void func_8017E9B4(void) { + ((s32 (*)(s32))func_8012A100)(0); + } + INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010", func_8017E9D4); diff --git a/src/ov_SC06_000/ov_SC06_000.c b/src/ov_SC06_000/ov_SC06_000.c index 994f95abc..6f55d4d7b 100644 --- a/src/ov_SC06_000/ov_SC06_000.c +++ b/src/ov_SC06_000/ov_SC06_000.c @@ -5343,7 +5343,13 @@ INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_8018681C); INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_8018684C); -INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_801868C4); +extern s16 D_801B1EFA; + +void func_801868C4(u16 a0) { + s16 *p = &D_801B1EFA; + *(u16 *)((char *)p + 0x0) += a0; +} + INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000", func_801868E0); diff --git a/src/ov_SC06_008/ov_SC06_008.c b/src/ov_SC06_008/ov_SC06_008.c index 3103c90ed..4d6b1910f 100644 --- a/src/ov_SC06_008/ov_SC06_008.c +++ b/src/ov_SC06_008/ov_SC06_008.c @@ -4970,7 +4970,11 @@ INCLUDE_ASM("asm/ov_SC06_008/nonmatchings/ov_SC06_008", func_80183750); INCLUDE_ASM("asm/ov_SC06_008/nonmatchings/ov_SC06_008", func_80183824); -INCLUDE_ASM("asm/ov_SC06_008/nonmatchings/ov_SC06_008", func_801838E4); +extern void func_8012B370(int a0); + void func_801838E4(void) { + ((void (*)(void))func_8012B370)(); + } + INCLUDE_ASM("asm/ov_SC06_008/nonmatchings/ov_SC06_008", func_80183904); diff --git a/src/ov_SC06_020/ov_SC06_020.c b/src/ov_SC06_020/ov_SC06_020.c index 219391afe..96c104629 100644 --- a/src/ov_SC06_020/ov_SC06_020.c +++ b/src/ov_SC06_020/ov_SC06_020.c @@ -4785,7 +4785,13 @@ INCLUDE_ASM("asm/ov_SC06_020/nonmatchings/ov_SC06_020", func_8017D2CC); INCLUDE_ASM("asm/ov_SC06_020/nonmatchings/ov_SC06_020", func_8017D308); -INCLUDE_ASM("asm/ov_SC06_020/nonmatchings/ov_SC06_020", func_8017D37C); +extern void func_8016EE40(s32 a0, s32 a1, s32 a2); +extern char D_80188AF0[]; + +void func_8017D37C(void) { + ((void (*)(void *, s32))func_8016EE40)(&D_80188AF0, 0x1000000); +} + INCLUDE_ASM("asm/ov_SC06_020/nonmatchings/ov_SC06_020", func_8017D3A4); diff --git a/src/ov_SC06_022/ov_SC06_022.c b/src/ov_SC06_022/ov_SC06_022.c index 3e8b8e6eb..e6d58c868 100644 --- a/src/ov_SC06_022/ov_SC06_022.c +++ b/src/ov_SC06_022/ov_SC06_022.c @@ -4773,7 +4773,11 @@ INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022", func_8017D098); INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022", func_8017D0D8); -INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022", func_8017D154); +extern void func_800D1EBC(void); + void func_8017D154(void) { + func_800D1EBC(); + } + INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022", func_8017D174); diff --git a/src/ov_SC06_024/ov_SC06_024.c b/src/ov_SC06_024/ov_SC06_024.c index 27a94938b..a08cb0530 100644 --- a/src/ov_SC06_024/ov_SC06_024.c +++ b/src/ov_SC06_024/ov_SC06_024.c @@ -4981,7 +4981,11 @@ INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024", func_80182BD8); INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024", func_80182D10); -INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024", func_80182EAC); +extern void func_8012AD44(s32 *a0, s16 a1); + void func_80182EAC(s32 arg0) { + ((void (*)(s32, s32))func_8012AD44)(arg0, 0x3); + } + INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024", func_80182ECC); diff --git a/src/ov_SC06_025/ov_SC06_025.c b/src/ov_SC06_025/ov_SC06_025.c index 36c451a27..825fe22cb 100644 --- a/src/ov_SC06_025/ov_SC06_025.c +++ b/src/ov_SC06_025/ov_SC06_025.c @@ -4825,7 +4825,11 @@ INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_8017DE9C); INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_8017DED8); -INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_8017DF30); +extern void func_8017E05C(void); + void func_8017DF30(void) { + func_8017E05C(); + } + INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025", func_8017DF50); diff --git a/src/ov_SC06_029/ov_SC06_029.c b/src/ov_SC06_029/ov_SC06_029.c index c20da1618..40cc61639 100644 --- a/src/ov_SC06_029/ov_SC06_029.c +++ b/src/ov_SC06_029/ov_SC06_029.c @@ -5303,7 +5303,11 @@ INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_8018AF48); INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_8018B148); -INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_8018B168); +extern void func_80146C3C(void); + void func_8018B168(void) { + func_80146C3C(); + } + INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029", func_8018B188); diff --git a/src/ov_SC06_030/ov_SC06_030.c b/src/ov_SC06_030/ov_SC06_030.c index ef42864b5..55f426f0c 100644 --- a/src/ov_SC06_030/ov_SC06_030.c +++ b/src/ov_SC06_030/ov_SC06_030.c @@ -4906,7 +4906,13 @@ INCLUDE_ASM("asm/ov_SC06_030/nonmatchings/ov_SC06_030", func_80180CE0); INCLUDE_ASM("asm/ov_SC06_030/nonmatchings/ov_SC06_030", func_80180D28); -INCLUDE_ASM("asm/ov_SC06_030/nonmatchings/ov_SC06_030", func_80180D68); +extern void func_8016EE40(s32 a0, s32 a1, s32 a2); +extern s32 D_801B4C8C; + +void func_80180D68(void) { + ((void (*)(void *, s32))func_8016EE40)(&D_801B4C8C, 0x1000000); +} + INCLUDE_ASM("asm/ov_SC06_030/nonmatchings/ov_SC06_030", func_80180D90); diff --git a/src/ov_SC07_000/ov_SC07_000.c b/src/ov_SC07_000/ov_SC07_000.c index 6f3f78b15..d34279428 100644 --- a/src/ov_SC07_000/ov_SC07_000.c +++ b/src/ov_SC07_000/ov_SC07_000.c @@ -4867,7 +4867,14 @@ INCLUDE_ASM("asm/ov_SC07_000/nonmatchings/ov_SC07_000", func_8017E658); INCLUDE_ASM("asm/ov_SC07_000/nonmatchings/ov_SC07_000", func_8017E7A0); -INCLUDE_ASM("asm/ov_SC07_000/nonmatchings/ov_SC07_000", func_8017E7E8); +void func_8017E7E8(void *a0) { + s32 v0 = *(u16 *)((s32)a0 + 0xA); + s32 v1 = *(u16 *)((s32)a0 + 0x52); + *(u16 *)((s32)a0 + 0x52) = 0; + *(u16 *)((s32)a0 + 0x102) = 0; + *(u16 *)((s32)a0 + 0xA) = v0 + v1; + } + INCLUDE_ASM("asm/ov_SC07_000/nonmatchings/ov_SC07_000", func_8017E804); diff --git a/src/ov_SC07_009/ov_SC07_009.c b/src/ov_SC07_009/ov_SC07_009.c index bb899185e..fc5dd37a4 100644 --- a/src/ov_SC07_009/ov_SC07_009.c +++ b/src/ov_SC07_009/ov_SC07_009.c @@ -4797,7 +4797,12 @@ INCLUDE_ASM("asm/ov_SC07_009/nonmatchings/ov_SC07_009", func_8017D0D4); INCLUDE_ASM("asm/ov_SC07_009/nonmatchings/ov_SC07_009", func_8017D150); -INCLUDE_ASM("asm/ov_SC07_009/nonmatchings/ov_SC07_009", func_8017D178); +extern s32 func_80171990(u8 *a0); + extern s32 D_80126B58; + void func_8017D178(void) { + ((void (*)(void *))func_80171990)(&D_80126B58); + } + INCLUDE_ASM("asm/ov_SC07_009/nonmatchings/ov_SC07_009", func_8017D1A0); diff --git a/src/shared/engine_core.h b/src/shared/engine_core.h index dded53595..501612a17 100644 --- a/src/shared/engine_core.h +++ b/src/shared/engine_core.h @@ -24719,4 +24719,18 @@ *(s32 *)&D_801D2200 = D_801E7018; \ } +#define DEFINE_func_8018071C() \ + extern void func_8016EE40(s32 a0, s32 a1, s32 a2); \ + extern M2C_UNK D_8018F4F8; \ + void func_8018071C(void) { \ + ((void (*)(void *, s32))func_8016EE40)(&D_8018F4F8, 0x1000000); \ + } + +#define DEFINE_func_80183930() \ + extern void func_8016EE40(s32 a0, s32 a1, s32 a2); \ + extern M2C_UNK D_8018F830; \ + void func_80183930(void) { \ + ((void (*)(void *, s32))func_8016EE40)(&D_8018F830, 0x1000000); \ + } + #endif