Skip to content

ringmenu: drop 76 invented extern fp consts for literals (96.454% -> 96.461%) - #17677

Open
SirEnkido wants to merge 2 commits into
zcanann:mainfrom
SirEnkido:agent/ringmenu
Open

ringmenu: drop 76 invented extern fp consts for literals (96.454% -> 96.461%)#17677
SirEnkido wants to merge 2 commits into
zcanann:mainfrom
SirEnkido:agent/ringmenu

Conversation

@SirEnkido

Copy link
Copy Markdown

What changed

src/ringmenu.cpp, two commits:

  • Replaced 76 invented extern const float/double kRingMenu* named constants with plain inline literals, so MWCC folds them into the anonymous .sdata2 pool and the code fp-relocs align byte-identically with the target (satisfies the AGENTS.md rule against extern-as-crutch and biases toward original source)
  • Wrote drawCommand's scale as 0.8 - 0.25*fabs(angle) so the pooled doubles emit in the target's order

Evidence

  • main/ringmenu fuzzy (report.json): 96.454% → 96.461%
  • DOL verified byte-identical (build/GCCP01/ok passes); only src/ringmenu.cpp touched
  • Independently audited: 0 externs remain, all 15 /* --INFO-- */ headers preserved, no offset tricks or fake symbols

Notes for review

  • Small headline gain, but the substantive win is removing 76 fabricated extern constants in favor of real literals — the file now reads much closer to plausible original source.
  • The remaining gap in onDraw/onCalc/drawGBA/drawCommand/GetDispCounter was each traced to documented register-allocation / scheduling / anonymous-pool walls and left unhacked. Details in the commit messages.
  • drawCommand's scale literal is written as the exact (double)0.8f value for byte-identical pool matching — intentional, flagged for transparency.

Produced by Claude agents following AGENTS.md / WORK_SPLIT.md, operated by @SirEnkido.

🤖 Generated with Claude Code

SirEnkido and others added 2 commits July 18, 2026 15:14
…lain literals; anon pool now aligns with target, code relocs match)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ble order now byte-identical to target

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant