Grind main/menu_favo: 96.53% -> 96.70% (FavoDraw nameFont schedule)#17665
Merged
Conversation
…n nameFont loop (96.53% -> 96.70%) Ghidra 80162360 nameFont loop (lines 313-330): iVar8 (TableStrings name lookup, char(foodId)+0x17d) is materialized with the foodId sign-bias (xoris) emitted ahead of the entry->x/entry->y bias loads. Our source computed posY/posX before name, inverting that schedule. Moving the name lookup ahead matches the target's xoris/extsb order. Drops FavoDraw misalign 12->10. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FavoDraw nameFont loop: compute the TableStrings name lookup before posX/posY.
Ghidra ground truth (resources/ghidra-decomp-1-31-2026/80162360_FavoDraw__8CMenuPcsFv.c, nameFont loop lines 313-330) materializes the name index
Game...m_table[0].index[((char)foodId + 0x17d) * 5 + 4]with the foodId sign-bias (xoris/extsb) emitted ahead of the entry->x (+0x1C) and entry->y (+0xB) bias loads. Our source computed posY/posX before the name lookup, inverting that schedule (objdiff rows 570-572: ourextsb/xorisordering was flipped vs target). Moving the name computation ahead of posY/posX restores the target's xoris/extsb order.Faithful reorder of independent computations (value-identical). Gate: FavoDraw misalign 12 -> 10, matched 378 -> 384; unit main/menu_favo fuzzy_match_percent 96.526726 -> 96.69779. No function regressed.
🤖 Generated with Claude Code