From 4d8493aa326cd44811fef061bbc9b1d82bc97153 Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Thu, 3 Sep 2026 17:19:33 -0600 Subject: [PATCH] feat(decomp): bank func_8005EC00 by syncing two declarations from the TU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same §378 class as func_8005EB28, two symbols deep: the draft declared D_800729DC as void* where the TU says u32, and D_80072974 as void(*)() where the TU says void(*)(void*). Copying the TU's own extern verbatim for each, in the order the gate named them, banked it in two rounds. 143dbb89 BYTE-IDENTICAL. The loop is the §378 chain's essence: ask the gate which symbol conflicts, copy the TU's declaration into the draft, re-gate, repeat. No judgement required — the gate names the symbol and the TU holds the authoritative spelling. --- src/800c3.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/800c3.c b/src/800c3.c index f9cd1751f..5dd653dbc 100644 --- a/src/800c3.c +++ b/src/800c3.c @@ -1307,7 +1307,44 @@ void func_8005EB28(void *param_1) { * return 0; * } */ -INCLUDE_ASM("asm/nonmatchings/800c3", func_8005EC00); +extern u32 D_800729DC; +extern void (*D_80072974)(void *); +extern s32 D_800729A8; +extern s32 D_800729D4; + + +s32 func_8005EC00(void *arg0) { + s32 v1; + s32 v0; + s32 a1; + + if (D_800729DC != 0) { + (*D_80072974)((void *)(*(s32 *)((char *)arg0 + 0xC) + 0x1E0)); + (*D_80072974)((void *)(*(s32 *)((char *)arg0 + 0xC) + 0x2D0)); + } + + a1 = 0; + if (*(u8 *)((char *)arg0 + 0x36) == 0) { + a1 = D_800729A8; + } + + v1 = func_8005DE78((s32)arg0, a1); + if (v1 < 0) { + return v1; + } + + v0 = v1 & 0xF0; + if (v0 == 0) { + return -9; + } + + v0 = (v1 & 0xF) * 2; + D_800729D4 = v0; + if (v0 == 0) { + D_800729D4 = 0x20; + } + return 0; +} INCLUDE_ASM("asm/nonmatchings/800c3", func_8005ECC0);