From ec8a305d756a9320322c8eafb261940a367015e6 Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Sat, 5 Sep 2026 01:05:31 -0600 Subject: [PATCH] =?UTF-8?q?feat(phase-32):=20T3=20(7)=20=E2=80=94=20md=5FM?= =?UTF-8?q?AIN=5F007:=20func=5F800CEE2C=20(52=20ins)=20BANKED=20byte-ident?= =?UTF-8?q?ical=202ff702b6=20(Sonnet=20drafter;=20an=20early=20u8=20*base?= =?UTF-8?q?=20local=20keeps=20&D=5F800AF630=20in=20$s0=20across=20two=20ca?= =?UTF-8?q?lls,=20the=20neighbour=20global=20read=20by=20raw=20offset=20wi?= =?UTF-8?q?th=20no=20relocation;=20one=20captured=20pointer=20local=20for?= =?UTF-8?q?=20a=20shared=20address)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/md_MAIN_007/md_MAIN_007.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/md_MAIN_007/md_MAIN_007.c b/src/md_MAIN_007/md_MAIN_007.c index 6f806f93d..e937faf62 100644 --- a/src/md_MAIN_007/md_MAIN_007.c +++ b/src/md_MAIN_007/md_MAIN_007.c @@ -1,6 +1,38 @@ #include "common.h" -INCLUDE_ASM("asm/md_MAIN_007/nonmatchings/md_MAIN_007", func_800CEE2C); +extern u16 D_800B99E4; +extern u8 D_800CFABF; +extern u8 D_800CFAC4[]; +extern u8 D_800CFAD4[]; +extern void (*D_800CFADC[])(void); +extern s32 D_800D1364; +extern u8 D_800AF630[]; +extern void func_8001534C(int, void *, int, int, int, int); + +void func_800CEE2C(void) { + u8 *base = D_800AF630; + u8 *p; + u8 v1; + u16 idx; + + p = &D_800CFABF; + v1 = *(u8 *)&D_800B99E4; + v1 += 0x30; + *p = v1; + func_8001534C(1, p - 0xB, 0x60, 0x64, 0, 0); + + if (D_800D1364) { + func_8001534C(2, D_800CFAC4, 0x60, 0x70, 0, 0); + } else { + func_8001534C(3, D_800CFAD4, 0x60, 0x70, 0, 0); + } + + idx = *(u16 *)(base + 0xA3B4); + if (idx < 4) { + D_800CFADC[idx](); + } +} + INCLUDE_ASM("asm/md_MAIN_007/nonmatchings/md_MAIN_007", func_800CEEFC);