Repository navigation
Refactor: Read the frontend offsets as members - #7649
Merged
Merged
Conversation
Collaborator
|
Merged, thank you giveen! All 123 functions in |
This branch is waiting to be deployed
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.
Part of #7078
Model: Ares / claude-opus-5
Eight byte-offset accesses in
src/frontendgo through struct members:multi.cppGetLocalPlayerPassword(0x441430): the whole body was one expression,*(int*)((char*)g_game + 0x2a42)selecting the local player and*(int*)((char*)g_game + 0x1b63 + n * 0x1b8a + 0x27)reaching that player's info block. Nowg_game->players[g_game->localPlayer].info->password, throughGame::players/Player::info/PlayerInfo::password.multi.cppBuildPlayerSlotGadgets(0x440d70) andClearPlayerSlotGadgets(0x440e40):*(short*)(base + 0xb6)twice, nowbase->u.count.campaign_menu.cppCampaignMenuShow(0x447340): the frame count and the two frame-record reads, nowframeCount,frameWidthandframeHeightfromgraphics/gaf_frame.h.campaign_menu.cppCampaignMenuInit(0x4475f0): the frame count and the frame record, same members.tools/cleanup_progress.pycounts the folder's byte-offset accesses at 68 on the base and 60 here, andsrc/frontendis the folder this slice covers.Checks: checkall 160 of 160 MATCH (every function in
multi.cpp,campaign_menu.cppandfrontend.cpp); place.py MD5 8e74a1dffa1f5988624c52048f5b20cd, with and without--no-orig --strict; modules.py --check passes; progress.py still 100.00% matched, 3267 functionstools/cleanup_progress.pycounts the folder's byte-offset accesses at 68 on the base and 60 here.Checks: checkall 160 of 160 MATCH (every function in
multi.cpp,campaign_menu.cppandfrontend.cpp); place.py MD5 8e74a1dffa1f5988624c52048f5b20cd, with and without--no-orig --strict; modules.py --check passes; progress.py still 100.00% matched, 3267 functionsLeft out:
multi.cpp:421,:422,:1959,:1960: the four*(T*)((char*)&msg.group + 2 / 0xe)reads. Both sites already carry a one-line comment from main saying the +0xe int straddles the end of the 16-byteGroup_00441220, so no member spells it. Nothing to change.frontend.cpp:1419:*(unsigned int*)(unit + 4) >> 1, whereunitis the int handleg_game->dplConnectionrather than a pointer to a described record, so there is no member to name.campaign_menu.cpp:843:(char*)g_game + 0x14b * g_game->localPlayer. The 0x14b stride is neitherPlayer's 0x1b63 stride norPlayerInfo's 0xb9, so no header describes this third view of the player block; it needs a size and a name with evidence first.Suspected original bugs: