feat(decomp): ov_SC04_010/func_8017D6CC — the self-caller cast lever, byte-verified

The §376 class's real blocker: after fix_arity_callers no-protos the conflicting
forward decl, the draft's definition becomes the prototype in scope and the TU's
own call site fails with 'too few arguments'. Casting THAT call site to a 0-arg
function pointer is byte-neutral (gcc-2.7.2 folds a cast of a known symbol back
to a direct jal, §20) and banks the function.
This commit is contained in:
Drew T
2026-08-31 23:18:43 -06:00
parent 6cca1e3ea0
commit 53fad0d031
+23 -2
View File
@@ -3569,7 +3569,28 @@ s32 func_8017D6C4(void *a0)
}
INCLUDE_ASM("asm/ov_SC04_010/nonmatchings/ov_SC04_010_jr_8017BEBC", func_8017D6CC);
void func_8017D6CC(void *a0)
{
extern u8 D_8018F598[];
if (*(s16 *)(a0 + 0xFE) != 0) {
D_8018F598[2] += 0x10;
D_8018F598[1] += 0xC;
D_8018F598[0] += 4;
if (D_8018F598[2] >= 0xF0) {
*(s16 *)(a0 + 0xFE) = 0;
}
} else {
D_8018F598[2] -= 0x10;
D_8018F598[1] -= 0xC;
D_8018F598[0] -= 4;
if (D_8018F598[2] < 0x61) {
*(u16 *)(a0 + 0xFE) += 1;
}
}
}
extern s32 func_8012C588(s32 a0, s32 a1);
void func_8017D7A0(u8 *a0) {
@@ -3692,7 +3713,7 @@ void func_8017DA58(s32 a0) {
extern void func_8017D6CC();
void func_8017DB20(void) {
func_8017D6CC();
((void (*)(void))func_8017D6CC)();
}