Repository navigation
Reimplement 32 UI::MenuItems functions: gynt's finished backlog, part 2 (100%) - #382
Merged
gynt merged 46 commits intoNov 10, 2026
Merged
Conversation
MenuItemActionHandler_HistoricCampaignSelect_Main, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at b3069fd (2026-10-07), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_UnusedEconomicGametypeSelect_Main, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at b3069fd (2026-10-07), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_HistoricMissionSelect_General, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at 0a7d992 (2026-10-25), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_UnusedEconomicMissionSelect_General, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at 0a7d992 (2026-10-25), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_UnusedSomeMissionStartUnk_General, gynt's work as it stands on his fork's reimpl/UI-MenuItems at 9b61ac2 (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_LobbyMenu_MapDescScrollbar, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at cf563c2 (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemRenderFunction_LobbyMenu_MapDescScrollbar, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at cf563c2 (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_LobbyMenu_MapSelectTable, gynt's work as it stands on his fork's reimpl/UI-MenuItems at bb50b3f (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemRenderFunction_SingleplayerMapChoice_Scrollbar, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at 81e1041 (2026-10-03), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemRenderFunction_UnusedOldTitleMenu_ContinueButton, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at de6f8e0 (2026-10-27), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemRenderFunction_UnusedOldTitleMenu_TestMapButton, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at de6f8e0 (2026-10-27), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_MapEditorProperties_MapDescriptionBox, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at 71eb42a (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemRenderFunction_MapEditorProperties_MapDescriptionScrollbar, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at dd14331 (2026-10-06), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_NewMapMaptype_Buttons, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at a389f84 (2026-10-04), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_WaitingForHost_Button, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at a389f84 (2026-10-04), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_IdentityOptions_LordIcons, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at 81e1041 (2026-10-03), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_SaveLoadMap_Scrollbar, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at 0a7d992 (2026-10-25), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_SaveMap_TableContent, gynt's work as it stands on his fork's reimpl/UI-MenuItems at 6d85b5f (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_OptionsMenu_SubOptionsButtons, gynt's work as it stands on his fork's reimpl/UI-MenuItems at cdeb8de (2026-10-09), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_IdentityOptions_Confirm, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at a389f84 (2026-10-04), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_LoadMap_TableContent, gynt's work as it stands on his fork's reimpl/UI-MenuItems at 0d89dce (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_OverlaySlider_Deselect, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at de6f8e0 (2026-10-27), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_UnusedWinCondition_DeselectUnk, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at de6f8e0 (2026-10-27), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_InGameMenu_MapEventIconUnk, gynt's work as it stands on his fork's reimpl/UI-MenuItems at 8a77b61 (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemRenderFunction_InGameMenu_KeepEnclosedSymbol, gynt's work as it stands on his fork's reimpl/UI-MenuItems at ff59286 (2026-10-08), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemRenderFunction_InGameMenu_BikMessagePlayerShield, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at dd14331 (2026-10-06), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_NewInvasion_RepeatSlider, gynt's work as it stands on his fork's archive/UI-MenuViews-development-second-pass at 81e1041 (2026-10-03), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_UnusedCreateMessageEvent_Unknown, gynt's work as it stands on his fork's reimpl/UI-MenuItems-100 at de6f8e0 (2026-10-27), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_UnusedChooseMessageBox_Unknown, gynt's work as it stands on his fork's reimpl/UI-MenuItems at 05f58da (2026-10-10), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_Unknown27CampaignUnk_Main, gynt's work as it stands on his fork's reimpl/UI-MenuItems at d39ef7e (2026-10-08), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_TacticalPowerBar_Main, gynt's work as it stands on his fork's reimpl/UI-MenuItems at 846f2c8 (2026-10-09), where its status line reads 100%. Taken over unchanged; main's later renames and the style rules follow in commits of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iles gynt's drafts were written against an older main. Main's Ghidra syncs have renamed or retyped what these files use, so they would not compile as they stand. Renamed by tools/reimplementation-helper/batch/refactor_struct_fields.py from the compiler errors, by offset, and by hand where a type changed: (undefined*)0x0 -> NULL; 0xe7 -> buildMenuTab; DAT_00b95b74 -> INT_00b95b74; DAT_MenuLoadGameRelativeSelectionIndex -> menuLoadGameRelativeSelectionIndex; DAT_MenuLoadGameRelativeSelectionOffset -> menuLoadGameRelativeSelectionOffset; field12_0x30 -> pendingGameSpeedLevel; field14_0x38 -> pendingSettingBubbleHelp; field15_0x3c -> pendingUnusedOption1; field178_0x5549ec -> activeTacticalPower; field20_0x44 -> pendingStreamVolume0; field21_0x48 -> pendingStreamVolume1; field22_0x4c -> pendingStreamVolume3; field26_0x74 -> field_0x74; field32_0x74 -> fileListEntryCount; field38_0x8c -> lastClickedListIndex; field39_0x90 -> lastListClickTime; field91_0x2bc -> cachedKeepEnclosed; unknownAlwaysZero03 -> showTextMessageInsteadOfEdit. buildMenuTab = 231 writes the 0xe7 into the ActiveMenuTab field as main's hideOrUnhideUI does; NULL is the (undefined*)0x0 the callback pointers are compared with, now that they are NoArgCallback*. No logic changes. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… truth tests, no using lines The style fixer's pass over the lines the batch adds, then clang-format: hexadecimal constants as decimals, x = x + n as x += n, + -n as - n, == FALSE / != FALSE on BOOL values as truth tests, and the decompiler's using declarations dropped (the names are written qualified). The code is unchanged: quick_diff gives the same output for every file before and after. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/reimplementation-helper/batch/strip_noise_comments.py drops the decompiler's block comments above each // FUNCTION: line (the WARNING: Enum and decompilerscript plates), and declare_at_use.py moves the declarations that were still at the top of four functions (MapEventIconUnk, BikMessagePlayerShield, LoadMap_TableContent, UnusedChooseMessageBox_Unknown) down to their first assignment. The code is unchanged: quick_diff gives the same output for every file before and after. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ours by name, loops The rest of the checker's ERRORs on the batch, file by file: the decompiler's iVar / dVar / pcVar / BVar / DVar locals get names that say what they hold and are declared where first assigned; block comments inside the bodies become // lines, and NewInvasion_RepeatSlider's, which only repeated the field name, goes; the old title menu's text colour is written by its ColorsEnum name (COL_0000FF) and its two button captions by their string pointers; BOOLEnum stores are TRUE / FALSE; MapDescriptionBox clears its buffer with sizeof the buffer; runs of nine copies of one statement and MapEventIconUnk's if / do-while pair become for loops, which MSVC unrolls or lays out the same. quick_diff gives the same output for every file before and after, but for the jump table's label number in the listing of three files whose loops add labels (HistoricCampaignSelect_Main, NewMapMaptype_Buttons, UnusedEconomicGametypeSelect_Main; their .text and .rdata compare identical). UnusedEconomicGametypeSelect_Main's goto to a bare return becomes that return. Two gotos stay, in HistoricMissionSelect_General and UnusedEconomicMissionSelect_General, with their labels named: the label has two predecessors, and writing the shared tail out twice costs 9 and 7 instructions. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ays why The for loops of the previous commit count to countof(the array) instead of 9 and step with ++i, as main's other loops do, and the goto that stays in HistoricMissionSelect_General gets the one-line reason its sibling has. The code is unchanged: quick_diff gives the same output (but for the listing's label numbers). Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gynt wrote DAT_ArrayOfMapIndices[offset + row - 1] against a header where DAT_MapSelectionPreloadMapIndexMapping sat at 0x880 of MenuTextInputState and the array began at 0x884. Main has merged the two into one int[501] at 0x880, four bytes earlier, so gynt's [i - 1] is main's [i], and with the - 1 kept the function read the element before the one the original reads (reccmp on main: 92.9%, [eax*4 + instance+2172] against the original's +2176). Without it the function is 100.0% raw and normalized again. The batch has no other user of the array. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuItemActionHandler_IdentityOptions_Confirm (0x00493D30) queues command 96 (push 0x60; call 0x489100, queueCommand) when the identity options are confirmed outside GM_SOLITARY. The enum had 95 and 98 but not 96; it gets the placeholder name form of GCT_UNKNOWN_98. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…EID_UNKNOWN_0x105 MenuItemActionHandler_TacticalPowerBar_Main (0x004DA050) plays sound effect 260 (push 0x104; call 0x449c40, setUpSFXToPlayUnk) when tactical power 2, 3, 4, 6, 13 or 16 is picked, and 261 (push 0x105) for power 7. The enum ended at 257; they get the same placeholder name form as SEID_UNKNOWN_0x100 and SEID_UNKNOWN_0x101, and 0x101's line gains a comma. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… index The loop that drops the first spawn moment wrote spawnMomentX[i + 19] and spawnMomentY[i + 19], past the end of the 20-element X and Y arrays. Those are the addresses of spawnMomentY[i - 1] and spawnMoment[i - 1] (X at 0x61B04, Y at 0x61B54, spawnMoment at 0x61BA4 in MinimapViewState), so they are written that way, as main's clearOldSpawnMoment does. The code is unchanged: quick_diff and the listing give the same instructions and the same offsets (instance+400208 and +400288) before and after. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
buildmenuMenuTabToSwitchTo is an ActiveMenuTab union; the draft stored the 10 through its tabType member as BASMTT_HUNTERSHUT. It is the build menu's tab, so it is written through buildMenuTab as BMTT_CASTLE (also 10), as main's hideOrUnhideUI writes the same field. Same offset, same value: quick_diff and the listing are unchanged. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… batch These come from the review of the branch, and none of them changes the generated code: - param_N gets main's names: button for the menu buttons (tacticalPower for TacticalPowerBar_Main, whose value becomes activeTacticalPower), row for the table rows, unused where the parameter is not read, unused and scrollbarEvent for the scrollbar handlers, unused and sliderValue for the scrollbar renders, and descBoxIndexUnk for LobbyMenu_MapDescScrollbar, which picks 204 or 110 by it. - The last decompiler locals: DVar1 in LoadMap_TableContent is clickTime, and the BVar1 of the LobbyMenu MapDescScrollbar render goes: it returns when AModalDialogIsActiveButIsNotQuitting is set and stores RT_SCREEN_MENU by name (MSVC still stores the zero it tested). - Ghidra's comma operators inside if conditions become statements with early returns or nested ifs: TacticalPowerBar_Main (whose barLevel is now declared where it is assigned), MapDescriptionBox, OverlaySlider_Deselect, UnusedWinCondition_DeselectUnk, LordIcons and UnusedCreateMessageEvent. - Casts that restated a field's own type go: DAT_ButtonX/Y/W/H, DAT_ButtonBackgroundBlendStrength, menuLoadGameRelativeSelectionOffset, fileListEntryCount, DAT_MapSelectionScrollOffset/TotalNumber, spawnMomentY, spawnMomentCount, MapPropertiesState::offset, (ushort) on the COL_*.shortValue arguments, (BGR24)((int)textColor), (int)((int)(shieldIndex + 469)) and the function pointer casts on sliderCallbackFunction. The ones that change signedness or type stay: (int)mbr_0x928, (int)total, (TextAlignment)DAT_ButtonW and (int)(clickTime - lastListClickTime). - Number casts become enum names: GCT_UNKNOWN_96, SEID_UNKNOWN_0x100, SEID_UNKNOWN_0x104 and SEID_UNKNOWN_0x105, and their using lines go. The old title menu's textColor = 0 is COL_000000, and its BGR24 include and using line go with the (BGR24)((int)textColor) cast they served. - BOOLEnum.hpp is dropped from the 8 files that never name BOOLEnum, and BOOLEnum values are tested by truth and stored as TRUE / FALSE where these lines touch them. - The three sparse-switch comments are one line each, and the comments on the two gotos that stay give what writing the shared tail out twice costs: 9 instructions in HistoricMissionSelect_General, 7 in UnusedEconomicMissionSelect_General. quick_diff gives the same output for every file before and after, but for the jump table's label numbers in TacticalPowerBar_Main's listing; each function's body in the /FA listing, with the globals' offsets, compares identical. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y returns over the batch These come from the second review of the branch, and none of them changes the generated code: - The old title menu's ContinueButton and TestMapButton lose their two lines of assembly over a plain if / else, as main's ExitButton has it. - HistoricMissionSelect_General and UnusedEconomicMissionSelect_General test difficulty >= 4 and (int)(clickTime - lastListClickTime) >= 500 with the constant on the right. The assembly comment over the first becomes one line saying why it is not > 3 (> 3 takes quick_diff from 0.9111 to 0.8667). Cases 18 and 20 lose the braces they did not need; the default keeps its own for clickTime, and the goto still lands where it did. - The decompiler's parentheses go: (DAT_00b96100 - button) - 1, the if ((a == x) && (b == y)) tests in HistoricMissionSelect_General, UnusedEconomicMissionSelect_General, UnusedSomeMissionStartUnk_General, NewMapMaptype_Buttons and LoadMap_TableContent, and the nested ones in MapDescriptionScrollbar and Unknown27CampaignUnk_Main. - SaveLoadMap_Scrollbar tests the offset with > 0, steps it with --x / ++x, and its case 5 gets main's line from BuildingAvailability_Scrollbar on why it stores and returns. - UnusedCreateMessageEvent_Unknown's second arm stores data.message.messageID, which sits at the same offset 0 of InGameEventUnion as the first arm's data.scenario.actionData, so the two arms no longer look like one store written twice. - LobbyMenu_MapDescScrollbar returns early instead of wrapping its body, OptionsMenu_SubOptionsButtons returns from its two arms that broke out of the switch, and UnusedEconomicGametypeSelect_Main loses its empty case 4. - resetToTextIndex gets TAIT names, as main's callers write them: TAIT_NINE__FILTER_B in IdentityOptions_Confirm and MapDescriptionBox, TAIT_ZERO in OptionsMenu_SubOptionsButtons. quick_diff gives the same output for every file before and after, and each function's body in the /FA listing, with the globals' offsets, compares identical. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In HistoricMissionSelect_General and UnusedEconomicMissionSelect_General, in main's one-line form. Comment only. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Style guide reading (advisory, posted once) 2 possible deviation(s) from REIMPLEMENTATION_STYLE_GUIDE.md across 2 of the 32 reimplemented The match comes first. Where the ugly form is what matched, it stays -- that is the guide's own overriding rule, and rule 21 asks for a one-line comment saying what was measured so the next reader does not retry it. This report is posted once, when the PR opens, and is not repeated on later pushes.
WhereRule 20 — Keep nesting low; no
|
This was referenced Nov 9, 2026
Main's Ghidra sync 6c1e0bd brought this branch's header changes; main's versions are kept. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gynt
approved these changes
Nov 10, 2026
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.
This PR lands 32 MenuItems functions, the second half of gynt's MenuItems backlog. He OK'd landing them on Discord on 2026-11-09: "Yes you can make a PR for them and check they still build. Cleaning up the backlog, love it". The first 33 are in #381; #379 (MenuViews) and #380 (MenuModals, DisplayElements, Rendering) carry the rest of the backlog.
Each of these functions read 100% on his fork but was never in a PR. Each one comes in as a commit authored by him, with his file as it stands at the last commit that touched it, where its status line reads 100%. The commit body names the branch and commit, and the table at the end lists them. What main needed on top follows in our own commits, which credit him as co-author.
Measured on today's main (9528350):
Stronghold Crusader.exe(3bb0a8c1…5387ac5a), with resolvers enabled locally (not committed) and sourcehold's reccmp run with--resolve-wrapped-calls --ignore-security-cookie.openshc-pr-checkfinds no errors, andstatus_regression.pyfinds no status line that got worse.Fixes to gynt's code
- 1when indexing the map list. In his base,DAT_MapSelectionPreloadMapIndexMappingsat at 0x880 and the array at 0x884. Main merged them into oneint DAT_ArrayOfMapIndices[501]at 0x880, four bytes earlier, so gynt's[i - 1]is main's[i]. With the- 1it reads 92.9% on main; without it, 100%. Main's other users (SaveLoadMap_Buttons, SetupPreviewMinimapDataUnk) index it the same way.spawnMomentX[eventIndex + 19]andspawnMomentY[eventIndex + 19], which run past each 20-entry array into the next one. It now writesspawnMomentY[eventIndex - 1]andspawnMoment[eventIndex - 1]: the same addresses, as main's clearOldSpawnMoment writes them. The listing is identical..tabType = BASMTT_HUNTERSHUT. It now writes.buildMenuTab = BMTT_CASTLE, as main's hideOrUnhideUI does. Both values are 10.Our other commits on top of his
refactor_struct_fields.pyand by hand where a type changed, such as(undefined*)0x0→NULLnow that the callbacks areNoArgCallback*.param_Ngiven main's names (button,row,unused,scrollbarEvent,sliderValue);sliderCallbackFunction, which is already aNoArgCallback*;SEID_UNKNOWN_0x100(already on main) for the tactical-power sound 256, and the TAIT names forresetToTextIndex.data.message.messageID, which sits at the same offset 0 of InGameEventUnion as the other arm'sdata.scenario.actionData. That's a reading of the union, not a finding.Header changes (each in a commit of its own)
Main's Ghidra sync (6c1e0bd) brought these header lines, and main (d5d965d) is merged in, with our code following main's spellings (
TAIT_UNKNOWNfor text index 4,INT_00b9840c), so the declaration check passes now.GameCommandTypegetsGCT_UNKNOWN_96(1563658): IdentityOptions_Confirm (0x00493D30) doespush 0x60; call 0x489100(queueCommand) when button 17 is confirmed outside GM_SOLITARY.SoundEffectIDgetsSEID_UNKNOWN_0x104andSEID_UNKNOWN_0x105(43e6ffc): TacticalPowerBar_Main (0x004DA050) doespush 0x104for tactical powers 2, 3, 4, 6, 13 and 16, andpush 0x105for power 7, each followed bycall 0x449C40. 0x101 was the enum's last value, so its line gains a comma.The sibling MenuItems PR adds other values to the same two headers (GCT 33/37, SEID 0x8C/0x8E). The two merge cleanly in either order.
Kept as they are, with the reason
gotos in HistoricMissionSelect_General and UnusedEconomicMissionSelect_General stay. The original shares the tail with case 13, and writing it out twice adds 9 and 7 instructions; eachgotohas a one-line comment saying so. The style-lint bot will post on both when this opens.difficulty >= 4stays.> 3takes quick_diff from 0.9111 to 0.8667; main's ScenarioDescription writes> 3.(int)mbr_0x928,(int)total,(TextAlignment)DAT_ButtonWand(int)(clickTime - lastListClickTime).231stay numbers: main has no enum for them either (hideOrUnhideUI writes 231 bare too).DAT_MenuModalComposition2's rectangle while it closes Composition1.RT_SCREEN_MENUand never restoresRT_MAP_GAME, unlike the other three scrollbars.Header changes we didn't make (suggestions)
AIMessageQueue::mbr_0x928(dword) holds negative values →int. Main's users are playNextStoredAIMessage and playVideoOverMap.MapPropertiesState::total→int(two of the casts above).TextManager::textColor(dword) →BGR24.MiniMapDefinedData::cachedKeepEnclosedstores a BOOLEnum.UserTextHandler::allowUserTextInput: main stores only 0 and 1 to it.TextAlignment, but the old title buttons passDAT_ButtonWthere. Is it a width?TileMapState::shiftRelated0or3is set to 5 here, so the name is wrong.Names to offer
DAT_00b960f4looks like the map description's scroll offset (main's MapDescriptionScrollbar steps it by 14).INT_00b95b74looks like the map description's text height (main assigns it renderMultilineTextUnk's result).DAT_00b96100,DAT_00b960dc,INT_00b95f68,field_0x74andfield39_0x1370, no better name is known.The 32 functions
Function, address, and gynt's branch and commit it comes from
MenuItemActionHandler_HistoricCampaignSelect_Mainarchive/UI-MenuViews-development-second-passb3069fdMenuItemActionHandler_HistoricMissionSelect_Generalreimpl/UI-MenuItems-1000a7d992MenuItemActionHandler_IdentityOptions_Confirmarchive/UI-MenuViews-development-second-passa389f84MenuItemActionHandler_IdentityOptions_LordIconsarchive/UI-MenuViews-development-second-pass81e1041MenuItemActionHandler_InGameMenu_MapEventIconUnkreimpl/UI-MenuItems8a77b61MenuItemActionHandler_LoadMap_TableContentreimpl/UI-MenuItems0d89dceMenuItemActionHandler_LobbyMenu_MapDescScrollbararchive/UI-MenuViews-development-second-passcf563c2MenuItemActionHandler_LobbyMenu_MapSelectTablereimpl/UI-MenuItemsbb50b3fMenuItemActionHandler_MapEditorProperties_MapDescriptionBoxarchive/UI-MenuViews-development-second-pass71eb42aMenuItemActionHandler_NewInvasion_RepeatSliderarchive/UI-MenuViews-development-second-pass81e1041MenuItemActionHandler_NewMapMaptype_Buttonsarchive/UI-MenuViews-development-second-passa389f84MenuItemActionHandler_OptionsMenu_SubOptionsButtonsreimpl/UI-MenuItemscdeb8deMenuItemActionHandler_OverlaySlider_Deselectreimpl/UI-MenuItems-100de6f8e0MenuItemActionHandler_SaveLoadMap_Scrollbarreimpl/UI-MenuItems-1000a7d992MenuItemActionHandler_SaveMap_TableContentreimpl/UI-MenuItems6d85b5fMenuItemActionHandler_TacticalPowerBar_Mainreimpl/UI-MenuItems846f2c8MenuItemActionHandler_Unknown27CampaignUnk_Mainreimpl/UI-MenuItemsd39ef7eMenuItemActionHandler_UnusedChooseMessageBox_Unknownreimpl/UI-MenuItems05f58daMenuItemActionHandler_UnusedCreateMessageEvent_Unknownreimpl/UI-MenuItems-100de6f8e0MenuItemActionHandler_UnusedEconomicGametypeSelect_Mainarchive/UI-MenuViews-development-second-passb3069fdMenuItemActionHandler_UnusedEconomicMissionSelect_Generalreimpl/UI-MenuItems-1000a7d992MenuItemActionHandler_UnusedSomeMissionStartUnk_Generalreimpl/UI-MenuItems9b61ac2MenuItemActionHandler_UnusedWinCondition_DeselectUnkreimpl/UI-MenuItems-100de6f8e0MenuItemActionHandler_WaitingForHost_Buttonarchive/UI-MenuViews-development-second-passa389f84MenuItemRenderFunction_InGameMenu_BikMessagePlayerShieldarchive/UI-MenuViews-development-second-passdd14331MenuItemRenderFunction_InGameMenu_KeepEnclosedSymbolreimpl/UI-MenuItemsff59286MenuItemRenderFunction_LobbyMenu_MapDescScrollbararchive/UI-MenuViews-development-second-passcf563c2MenuItemRenderFunction_MapEditorProperties_MapDescriptionScrollbararchive/UI-MenuViews-development-second-passdd14331MenuItemRenderFunction_RankingGames_Scrollbarreimpl/UI-MenuItems-1000a7d992MenuItemRenderFunction_SingleplayerMapChoice_Scrollbararchive/UI-MenuViews-development-second-pass81e1041MenuItemRenderFunction_UnusedOldTitleMenu_ContinueButtonreimpl/UI-MenuItems-100de6f8e0MenuItemRenderFunction_UnusedOldTitleMenu_TestMapButtonreimpl/UI-MenuItems-100de6f8e0Other PRs:
🤖 Generated with Claude Code