mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
f459f53083
The same axis that broke 138 of 140 binaries an hour ago now lands clean, because conform_decls' NEW arity guard located the actual obstruction instead of leaving me to absorb it by hand. THE OBSTRUCTION WAS ONE LINE. Conforming `extern s32 func_8015B950(void)` -> `(s32 arg0)` turns every 0-arg CALL SITE into `too few arguments`. My hand attempt assumed those were spread across the 926 TUs and would need 926 casts (the func_8012AAAC precedent, where it really was 137 separate sites). They are not: there is exactly ONE call, in `src/shared/engine_core.h`'s `DEFINE_func_8015BEE4()` macro body — expanded into all 926 TUs by the preprocessor. func_8015BEE4 is a THUNK: `return func_8015B950();` with $a0 passing straight through from its own caller. So the 0-arg call shape is byte-CORRECT and must be preserved, not fixed — `return ((s32 (*)(void))func_8015B950)();` keeps it exactly (§17a-1; gcc folds the cast of a known symbol to a direct jal, and the s32 return is unchanged so the thunk's value still flows). Sequence: 1 cast -> conform_decls --apply (925 sites, R32 completion assertion: 0 remaining) -> gate BANKED byte-identical -> R22 clean-fleet extract-all 139/139, check-all 140 passed / 0 failed. The draft's 2 callee-decl conflicts (func_801725A4, func_80147078) dissolved with the axis. Worth 37,398 templatable ins; the ×137 family sweep is next.