feat(phase-31): S80 #10 (2) — ov_SC03_107: func_8017D878 (45 ins, the manifest's one GAME-C verbatim, "37 stored drafts") DECOMPILED: the stored best draft was byte-correct all along — it needed only its real return type (s32: the address of func_80172710 or 0) once the TU's extern void func_8017D878(void) was corrected (commit:3893) — a def-side declaration wall, not codegen; match_one 45/45, rtu_match MATCH, worktree gate banked (its merge step adopted 0 files — spliced in-tree instead) + in-tree byte-identical 87d02b57. ov_SC03_107 is now 100% C; the game's verbatim set is the five PERMANENT rows

This commit is contained in:
Drew T
2026-09-04 21:49:34 -06:00
parent b7f73e7187
commit 082ddc8590
+32 -1
View File
@@ -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);