Skip to content

Grind main/menu_favo: 96.53% -> 96.70% (FavoDraw nameFont schedule)#17665

Merged
asmithbot merged 1 commit into
mainfrom
pr-menu-favo-emp29
Jun 14, 2026
Merged

Grind main/menu_favo: 96.53% -> 96.70% (FavoDraw nameFont schedule)#17665
asmithbot merged 1 commit into
mainfrom
pr-menu-favo-emp29

Conversation

@asmithbot

Copy link
Copy Markdown
Collaborator

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: our extsb/xoris ordering 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

…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>
@decomp-dev

decomp-dev Bot commented Jun 14, 2026

Copy link
Copy Markdown

Report for GCCP01 (3a718db - 7e7b2ca)

📈 1 improvement in an unmatched item
Unit Item Bytes Before After
main/menu_favo CMenuPcs::FavoDraw() +9 96.79% 97.18%

@asmithbot asmithbot merged commit 1ef3572 into main Jun 14, 2026
2 checks passed
@asmithbot asmithbot deleted the pr-menu-favo-emp29 branch June 14, 2026 20:11
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