mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-28 06:49:47 -04:00
72e6a096ca
CAUGHT BY VERIFYING THE CHECKPOINT INSTEAD OF ASSERTING IT. `.run/wave22/` was covered by the blanket `/.run/*` ignore, so the 13 UNBANKED drafts — 6 NEAR with precise residual diagnoses and 7 that reached match_one MATCH but did not bank whole-binary — existed only on disk. My own checkpoint's "START HERE" list names them as next-session fuel, and they cost ~2.59M subagent tokens to produce. One `git clean -fdx` would have destroyed them: exactly the exposure the .run/giants Fable5 cracks had before Phase 27 curated them (R20). Now allowlisted: .run/wave22/*.c + .run/wave22_targets.json (the per-target canonical callee/data declarations resolved from the real TU scope — the §17a-1 lever the wave was built on). Also commits docs/family-hseq.md, regenerated by this session's family_hseq runs.
54 lines
976 B
C
54 lines
976 B
C
extern u8 D_8018A300[];
|
|
|
|
void func_80177DA8(p, v, idx)
|
|
u8 *p;
|
|
u32 v;
|
|
s16 idx;
|
|
{
|
|
u8 *r;
|
|
u16 c;
|
|
u16 flag;
|
|
u32 n;
|
|
u8 m;
|
|
s16 i;
|
|
u8 t;
|
|
u32 x;
|
|
u32 uv;
|
|
u32 w1;
|
|
u32 w2;
|
|
|
|
flag = 0x100;
|
|
i = 0;
|
|
t = D_8018A300[idx];
|
|
c = (t << 6) | 0x4016;
|
|
*(u16 *)(p + 0xE) = c;
|
|
p += 0x14;
|
|
*(u16 *)(p + 0xE) = c;
|
|
p += 0x14;
|
|
r = p;
|
|
do {
|
|
n = (v << 16) >> 28;
|
|
m = n;
|
|
if (n != 0 || i == 2 || i == 0xFF) {
|
|
flag = 0;
|
|
}
|
|
v <<= 4;
|
|
i++;
|
|
*(s16 *)(r + 0xA) = flag | (*(s16 *)(r + 0xA) & ~0x100);
|
|
*(u8 *)(r + 0xC) = m * 8 + 8;
|
|
r += 0x14;
|
|
} while (i < 3);
|
|
*(u16 *)(p + 0xE) = c;
|
|
p += 0x14;
|
|
*(u16 *)(p + 0xE) = c;
|
|
p += 0x14;
|
|
*(u16 *)(p + 0xE) = c;
|
|
p += 0x14;
|
|
x = ((t << 6) | 0x4016) << 16;
|
|
uv = idx << 4;
|
|
w1 = uv | 0x1000;
|
|
*(u32 *)(p + 0xC) = x | w1;
|
|
w2 = uv | 0x1008;
|
|
*(u32 *)(p + 0x20) = x | w2;
|
|
}
|