From 082ddc859029f9a77d46d4d524f0c17cd5ea3b9b Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Fri, 4 Sep 2026 21:49:34 -0600 Subject: [PATCH] =?UTF-8?q?feat(phase-31):=20S80=20#10=20(2)=20=E2=80=94?= =?UTF-8?q?=20ov=5FSC03=5F107:=20func=5F8017D878=20(45=20ins,=20the=20mani?= =?UTF-8?q?fest's=20one=20GAME-C=20verbatim,=20"37=20stored=20drafts")=20D?= =?UTF-8?q?ECOMPILED:=20the=20stored=20best=20draft=20was=20byte-correct?= =?UTF-8?q?=20all=20along=20=E2=80=94=20it=20needed=20only=20its=20real=20?= =?UTF-8?q?return=20type=20(s32:=20the=20address=20of=20func=5F80172710=20?= =?UTF-8?q?or=200)=20once=20the=20TU's=20`extern=20void=20func=5F8017D878(?= =?UTF-8?q?void)`=20was=20corrected=20(commit:3893)=20=E2=80=94=20a=20def-?= =?UTF-8?q?side=20declaration=20wall,=20not=20codegen;=20match=5Fone=2045/?= =?UTF-8?q?45,=20rtu=5Fmatch=20MATCH,=20worktree=20gate=20banked=20(its=20?= =?UTF-8?q?merge=20step=20adopted=200=20files=20=E2=80=94=20spliced=20in-t?= =?UTF-8?q?ree=20instead)=20+=20in-tree=20byte-identical=2087d02b57.=20ov?= =?UTF-8?q?=5FSC03=5F107=20is=20now=20100%=20C;=20the=20game's=20verbatim?= =?UTF-8?q?=20set=20is=20the=20five=20PERMANENT=20rows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ov_SC03_107/ov_SC03_107_jr_801789AC.c | 33 ++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/ov_SC03_107/ov_SC03_107_jr_801789AC.c b/src/ov_SC03_107/ov_SC03_107_jr_801789AC.c index ebfa994ec..e04d96df4 100644 --- a/src/ov_SC03_107/ov_SC03_107_jr_801789AC.c +++ b/src/ov_SC03_107/ov_SC03_107_jr_801789AC.c @@ -6788,7 +6788,38 @@ void func_8017D838(s32 a0) { halfword at +2 of the object the word at +100 points to, calls func_80178BF8 with no arguments, and returns the ADDRESS of func_80172710 in $v0. */ -INCLUDE_ASM("asm/ov_SC03_107/nonmatchings/ov_SC03_107_jr_801789AC", func_8017D878); +#include "common.h" + +struct Vec; + +extern s32 func_8012BC60(struct Vec *a0, struct Vec *a1); +extern void func_8012BD14(s32 a0); +extern void func_80172710(void); +extern void func_80178BF8(); + +s32 func_8017D878(s32 arg0) +{ + extern u8 D_801202A0[]; + u8 *p; + s32 i; + s32 v1; + + if (((s32 (*)(s32))func_8012BD14)(*(s32 *)(arg0 + 0x64)) >= 0x1001) { + return 0; + } + for (i = 0, p = D_801202A0; i < 0x60; i++, p += 0x10C) { + if (*(u16 *)p == 0x224) { + if (((s32 (*)(s32, s32))func_8012BC60)(arg0 + 4, (s32)(p + 4)) < 0x1000) { + return 0; + } + } + } + v1 = *(s32 *)(arg0 + 0x64); + *(s16 *)(v1 + 2) = 2; + /* zero-arg call: target jal carries no argument setup */ + ((void (*)())func_80178BF8)(); + return (s32)func_80172710; +} extern s32 func_8012C044(s32 a0);