mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-04 16:28:11 -04:00
1.8 KiB
1.8 KiB
T3.c8 — kept-macro carry survives a respelled nested base
- Cause confirmed (ledger): t3_S13 row func_8017EA20 had
KEPT(NON-STRUCT)off 18, lines 3954/3958, basenested:*(s32 *)(*(s32 *)(param_1 + 0x64) + 0x20); t3_S28 (MEMBERS) respelled the inner deref to((Unkstruct_800B5CB8 *)param_1)->unk64and lines shifted to 3953/3957 → c4 carry (s_macro_rows, match = same off and (same base or same line)) found neither. - Fix
tools/restruct.py:s_base_norm(key)(:1191-1203) normalises*(T *)(X + 0xNN)and((S *)X)->unkNNto@[X+NN]innermost-first;s_macro_rowsmatch addsor s_base_norm(prior base) == s_base_norm(census base)(:1227-1230). Off still must match. - Selftest (:4823-4834): fx_f
CAST_NONSTRUCT(u16, *(s32 *)(((Unkstruct_TEST *)a0)->unk4 + 0x20), 0x12), prior t3_S13 row keyed*(s32 *)(*(s32 *)(a0 + 0x4) + 0x20)on line 999 → carried, unbacked 0. Scratch check: a different inner offset (0x8 vs unk4) does not normalise equal. - Ledger repair (no src edit, no --apply):
.run/t3c8/repair.py— copy of the latest S row for the body, its macro_of entries dropped,s_macro_rowsre-run on the current file text (label kept t3_S28 during carry for provenance), relabelledt3c8_repair, appended vialedger_append. Row MEMBERS, 39 sites; macro_of: KEPT(SIGN) 3919 t3_S28, KEPT(WIDTH) 3931 t3_S28, KEPT(NON-STRUCT) 3953/3957 t3_S13. - Scan for other bodies in this state: check-casts after repair reports unbacked 0 → none.
Verified
restruct.py --selftest→ 96/96 OKrestruct.py --check-ledger→ rc 0, 0 violationsrestruct.py --rung S --check-residue --only "ov_*"→ uncovered 0 sites / 0 bodiestype_census.py --check-casts --quiet→(unbacked 0)(raw P/I/X/M nonzero as expected)git status --short src include→ empty