From b3ea50b1d522c581ee63f80e456be0ad410032c0 Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Tue, 25 Aug 2026 21:20:57 -0600 Subject: [PATCH] chore(decomp): commit in-tree banked work before the next gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uncommitted src/ changes found at gate entry. These are banked functions from a lane that gates with commit=False, not residue — preserved, not reverted. Top-level src/*.c (main TUs) are excluded by construction (S59). --- src/ov_SC02_005/ov_SC02_005_jr_80181D30.c | 27 ++++++++++++++++++++++- src/ov_SC03_002/ov_SC03_002_jr_8017D604.c | 26 +--------------------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/ov_SC02_005/ov_SC02_005_jr_80181D30.c b/src/ov_SC02_005/ov_SC02_005_jr_80181D30.c index e20bd206a..fda6b6d81 100644 --- a/src/ov_SC02_005/ov_SC02_005_jr_80181D30.c +++ b/src/ov_SC02_005/ov_SC02_005_jr_80181D30.c @@ -5300,7 +5300,32 @@ void func_80185A04(s32 param_1, s32 param_2, s16 param_3) { } -INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005_jr_80181D30", func_80185A88); +extern u16 D_801E4BBC; +extern s16 D_80195B24[]; + +s16 func_80185A88(int param_1, int param_2) { + register s32 zr __asm__("$0"); + int t; + int x; + int m; + int h; + int d; + t = (u16)*(u16 *)(param_1 + 0x76) - (u16)*(u16 *)(param_1 + 0x60); + x = t - param_2; + d = t + zr; + m = x + zr; + if (D_801E4BBC == 2) { + if (*(u32 *)(param_1 + 0xE8) & 0x800) goto RET; + if ((s16)x < 0x80) m = 0x80; + } else { + if (*(u32 *)(param_1 + 0xE8) & 0x80000) goto RET; + h = (s16)D_80195B24[D_801E4BBC] >> 1; + if ((s16)x < h) m = h; + } +RET: + return d - m; +} + INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005_jr_80181D30", func_80185B38); diff --git a/src/ov_SC03_002/ov_SC03_002_jr_8017D604.c b/src/ov_SC03_002/ov_SC03_002_jr_8017D604.c index 770d67964..71aa62e9a 100644 --- a/src/ov_SC03_002/ov_SC03_002_jr_8017D604.c +++ b/src/ov_SC03_002/ov_SC03_002_jr_8017D604.c @@ -3402,31 +3402,7 @@ extern s32 func_8012AD50(void *a0); } -typedef struct { short vx, vy, vz, pad; } SVEC_8017EBD0; - -extern SVEC_8017EBD0 D_801CA324; -extern SVEC_8017EBD0 D_801CA32C; - -extern void func_80015978(s32 a0, s32 *a1); -extern void func_8017EC98(SVEC_8017EBD0 *p0, SVEC_8017EBD0 *p1); - -void func_8017EBD0(void *arg0) { - SVEC_8017EBD0 blk1; - SVEC_8017EBD0 blk2; - SVEC_8017EBD0 temp; - - blk1 = D_801CA324; - blk2 = D_801CA32C; - - if (*(s16 *)((u8 *)arg0 + 0xFC) == 0) { - func_8017EC98(&blk1, &blk2); - return; - } - func_80015978((s32)((u8 *)arg0 + 4), (s32 *)&temp); - func_8017EC98(&blk1, &temp); - func_8017EC98(&temp, &blk2); -} - +INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002_jr_8017D604", func_8017EBD0); // @class: struct + regalloc(local-alloc density) // @stuck: none — MATCH (186 ins, relocation-masked)