Skip to content

Add missing consts to various method signatures - #772

Merged
SquareMan merged 2 commits into
bfbbdecomp:mainfrom
joeyballentine:const-qualifier-fixes
Aug 4, 2026
Merged

Add missing consts to various method signatures#772
SquareMan merged 2 commits into
bfbbdecomp:mainfrom
joeyballentine:const-qualifier-fixes

Conversation

@joeyballentine

@joeyballentine joeyballentine commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Also removed a misleading/outdated comment

Found and fixed via LLM scan

The retail object has GetUV as a const member; the definition here dropped the
qualifier, so it mangled without the C and never matched. The body was already
correct -- adding const takes it to 100%, and the note about the final return
and the b/blr swaps no longer applies.

    zNPCHazard  55/110 -> 56/110 functions

zNPCFXCinematic.h pulls this header into zCutsceneMgr, so that unit rebuilds;
verified on a clean build that it is unaffected (15/18 either way).
…uctor

The retail constructor is
__ct__Q24xhud17font_meter_widgetFRCQ24xhud16font_meter_asset -- FRC, a const
reference. This one took a mutable reference, so it mangled as FR and could
never match. model_widget and meter_widget both already take
`const <x>_asset&`, and the body only reads `init`.

    __ct__Q24xhud17font_meter_widget...  0.00% -> 61.13%

The remainder is a genuine body difference (retail is 68 instructions to our
56, and assigns the colours differently), not a naming problem. Verified on
clean builds that no unit's function count changes.
@joeyballentine joeyballentine changed the title Const-qualify UVAModelInfo::GetUV and the font_meter_widget constructor Add missing consts to various method signatures Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

main/SB/Core/x/xHudFontMeter

Section From To Bytes
📈 .text 40.98% 52.89% +166
Function From To Bytes
📈 xhud::font_meter_widget::font_meter_widget(const xhud::font_meter_asset&) 0.00% 61.13% +166

main/SB/Game/zNPCHazard

Section From To Bytes
📈 .text 51.42% 51.68% +88
Function From To Bytes
UVAModelInfo::GetUV(RwTexCoords*&, int&, RpAtomic*) const 0.00% 100.00% +88

@joeyballentine
joeyballentine marked this pull request as ready for review August 3, 2026 17:55
@SquareMan
SquareMan merged commit 3e4d458 into bfbbdecomp:main Aug 4, 2026
5 checks passed
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.

2 participants