Repository navigation
Reimplement 47 UI::MenuViews functions: gynt's finished backlog (100%) - #379
Merged
gynt merged 59 commits intoNov 10, 2026
Merged
Conversation
MenuView_BuildMenu_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-development-second-pass at 32939bb (2026-10-25), where its status line reads 100.0%; that commit is also the last one to change the file. Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_BuildMenu_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-development-second-pass at 32939bb (2026-10-25), where its status line reads 100.0%; that commit is also the last one to change the file. Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_CampaignUnk_DoInitial, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 83c1d80 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004DD0C0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_Credits_DoInitial, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 08040dd (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004262B0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_CrusadeEndscreen_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in fa5f9af (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004E1F50 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_CrusadeEndscreen_DoInitial, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 3003347 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004D91D0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_CrusadeEndscreen_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in d91816f (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004DF2E0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_CustomScenarios_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-development-second-pass at 32939bb (2026-10-25), where its status line reads 100.0%; that commit is also the last one to change the file. Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_CustomScenarios_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 459b8d9 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00425EA0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_GameStartEnterName_DoInitial, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 6ee93e3 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004406F0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_General_DoInitial_BlackBorderAndGfx, gynt's version as it stands on his fork's archive/UI-MenuViews-development-second-pass at 32939bb (2026-10-25), where its status line reads 100.0%; that commit is also the last one to change the file. Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_General_DoInitial_BlackBoxDefaultBorderAndPicture, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 3cb6e95 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00425F60 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_General_DoInitial_CrusadeAndRankMenu, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 28a288b (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004DD750 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_General_DoInitial_DefaultMainMenuStructure, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 20a601e (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004276F0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_General_DoInitial_ScreenToBlack, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 225b15f (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00430100 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_HistoricCampaignIntro_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 7c34016 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004DBAF0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_HistoricCampaignSelect_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-development-second-pass at 32939bb (2026-10-25), where its status line reads 100.0%; that commit is also the last one to change the file. Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_HistoricCampaignSelect_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 8c72f92 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00425500 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_HistoricMissionSelect_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in f2a9ee6 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00426830 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_IntroLogos_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in b7a43d1 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00424720 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_IntroVideo_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-development-second-pass at 32939bb (2026-10-25), where its status line reads 100.0%; that commit is also the last one to change the file. Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_IntroVideo_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in dfb6eac (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00424A50 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_LobbyMenu_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 8327b9c (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00427320 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_MainMenu_DoInitial, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 440a25e (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00424CD0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_MainMenu_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-development-second-pass at 32939bb (2026-10-25), where its status line reads 100.0%; that commit is also the last one to change the file. Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_MapEditorLandscaping_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in baf5a43 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004313C0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_MissionSelect_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 57e21ac (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004268C0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_MpConnection_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 5f0385e (2026-10-25, "reimplement: SHC_3BB0A8C1_0x00427110 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_ScenarioDescription_DoInitial, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in e76bc7c (2026-10-25, "reimplement: SHC_3BB0A8C1_0x004DD300 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_SelectCrusade_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in a4b0298 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x0042BBF0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_UnusedOldTitleMenu_DoInitial, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in df53f89 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x0042DD00 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_UnusedOldTitleMenu_Prepare, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 2ff2116 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x0042DCB0 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_UnusedSelectRandomNumberOfEnemies_DoEveryFrame, gynt's version as it stands on his fork's archive/UI-MenuViews-merged-full at 2755710 (2026-10-25), where its status line reads 100.0%; the file was last changed in 9a09c92 (2026-10-25, "reimplement: SHC_3BB0A8C1_0x0042B960 100.00% Reimplemented"). Taken unchanged; what main needs on top follows in our own commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… otherwise Main renamed these since gynt's base, which kept three of the 47 files from compiling: MinimapViewState's field3_0xc is field_0xc (MenuView_BuildMenu_DoEveryFrame, MenuView_MapEditorLandscaping_DoEveryFrame) and GameSynchronyState's field225_0x106ee4 is field_0x106ee4 (MenuView_LobbyMenu_Prepare). MenuView_BuildMenu_DoEveryFrame also compared activeMenuTab.buildMenuTab with (BuildMenuTabTypeShort)0x3e, a type his branch has and main doesn't; main's buildMenuTab is a BuildMenuTabTypeInt and BuildMenuTabType has no 62, so it compares with the number. With this, all 47 build on main 9528350 and measure reccmp 100.0. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
openshc-pr-fix.py over the 29 of gynt's 47 files it had something for: hex numbers that aren't masks or colours written in decimal (246), usings nothing uses dropped (57), "+ -N" written "- N" (4), compound assignments (2) and BOOL comparisons as truth tests (4). Mechanical; the code is the same. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The decompiler's argument locals (iVar1 to iVar8, TVar4, BVar5, BVar7) become named positions declared where they are set, the other arguments are written in the calls, the colour is COL_CCFAFF, the "added by script" block comments are // "text" lines, and the trailing return goes. quick_diff identical before and after (0.9519, the listing's ret). Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of literals The 19 files of gynt's that wrote file names and texts as literals use main's s_ pointers instead (style guide 12), each for the address the original pushes where a text is stored more than once, and include string-literals.hpp. MenuView_CrusadeEndscreen_Prepare passes them to AppendCreditsBinkVideoCommand and AppendCreditsBinkVideoWithAudioCommand through (char*), as main does where a header takes a char*. quick_diff identical for every file. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The decompiler's trailing return; goes from the 13 void functions that ended with one (style guide 1), and the "added by script" block comments with a text in them become // "the text" lines above the call (style guide 19). quick_diff identical for every file. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ee more files The button timings in MenuView_CustomScenarios_Prepare, MenuView_HistoricCampaignSelect_Prepare and MenuView_UnusedEconomicGametypeSelect_Prepare (each button's animation starts 1600 ms after the previous one) and MenuView_Unknown33_DoEveryFrame's nine cleared DAT_PlayerSlotArraySomeValue entries are for-loops; MSVC unrolls them back into the same stores (a memset in Unknown33: quick_diff 0.9643 -> 0.7965). Unknown33's player loop counts playerID up to countof(currentPlayerFullIDArray) and tests the ready check directly. MenuView_UnusedSelectRandomNumberOfEnemies_DoEveryFrame and MenuView_CrusadeEndscreen_Prepare get named positions in place of the decompiler's argument locals. CrusadeEndscreen's AppendCreditsSoundStreamCommand values are plain numbers, as its int parameter takes them: gynt's SHC_SoundStream names there were Ghidra's guess. The (8, n) calls count n from 1 to 8 over the first jester run's eight blocks (SFX_1Unk, SFX_2Unk, SPEECH_1 and SPEECH_2, then three OR-ed constants for 5, 6 and 7, then a cast 8), and the (24, MUSIC), (4, SPEECH_1), (3, ...) and (1, 0x5a) calls are plain numbers too. The text size it picks for Italian is fontSize. quick_diff identical for every file; reccmp 100.0 for each of them in the full build at the branch head. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alues, one goto Ten more files of gynt's: decompiler locals named for what they hold or dropped where the call can be tested directly (TicksSinceCounterStart, FindCampaignMapHotspotAtMouse, getEventIDForTimeUntilDefeatEventType), the current menu as menu, the chapter of a historic mission, the campaign texts as text; lastClickedListIndex is set to -1 and DAT_00b960dc to -3 rather than their unsigned hex; the minimap clear's byte count is sizeof(loadedMiniMap); the old title menu's colour is COL_0080FF and its positions are declared where they are computed; a doubled include goes; and MenuView_MapEditorLandscaping_DoEveryFrame draws its panel under one test of unk_resetViewportRelated in place of the goto, which compiles to the same branches. quick_diff identical for every file; reccmp 100.0 for each of them in the full build at the branch head, as with gynt's goto. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_BuildMenu_DoEveryFrame (0x00433030) compares activeMenuTab.buildMenuTab with 62 (cmp ..., 0x3e at 0x0043303E), a tab the enum has no name for; gynt's branch wrote it (BuildMenuTabTypeShort)0x3e. Main's hideOrUnhideUI (0x00471AA0) switches the build menu from BMTT_SOLDIERS to 62 when it hides the menu and from 62 back to BMTT_SOLDIERS when it shows it again, so 62 is the hidden soldiers tab. Named the way the enum already names 49 (BMTT_UNKNOWN_49) until Ghidra has a name for it. Used in the next commit; code generation is the same. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three of gynt's MenuViews functions reset the user text handler to index 4 (push 4 before resetToTextIndex): MenuView_SingleplayerMapChoice_Prepare (0x00448D40), MenuView_BuildMenu_Prepare (0x00431A90) and MenuView_LobbyMenu_Prepare (0x00427320). The enum leaves 4 out between TAIT_THREE__FILTER_A and TAIT_FIVE__NUMERIC_DOT; TheRedDaemon asked for such values on sourcehold#300. The ModalsDisplayRendering backlog branch carries the same line for MenuModalRenderFunction_Chat, so the two merge cleanly. Used in the next commit; code generation is the same. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The current menu is `Menu* const menu` at its one assignment and the border values are int const, in the shape of main's MenuView_General_DoInitial_OnlySetMenuXY (21 files had pMVar1, _menu or _menuPtr declared early). - No (ushort) casts on the COL_ shortValues (drawColorBox takes them as they are), no unused BOOLEnum.hpp includes. - Every s_ string pointer has its text in a comment above the statement. - BMTT_UNKNOWN_62 and TAIT_UNKNOWN_4 (previous two commits; TAIT_UNKNOWN_4 in all three resets) and TAIT_NINE__FILTER_B for the numbers 62, 4 and 9; TEXT_MAINOPTIONS, 15 for MissionSelect's text; COL_000000 for the old title menu's black text. - Early returns in Unknown33_DoEveryFrame, UnusedExtremeAd_DoEveryFrame (whose two click tests are one condition) and MissionSelect_DoEveryFrame; HistoricCampaignIntro_Prepare stores its two texts straight from the call, as main's HistoricCampaignOutro_Prepare does; BuildMenu_DoEveryFrame takes timeGetTime() in the store. - TRUE/FALSE for BOOL-like flags (needsRedraw, pendingMenuRedraw, mapLoadedForEditor, INT_00ed27b8, INT_00b960e4, INT_00b95f68), == 0 for counters and IDs, truth tests for isBinkVideoPlaying, NULL for the Bink handle, and casts and parentheses that did nothing removed (MainMenu_DoInitial's sword position, BuildMenu_DoEveryFrame's tab test, Unknown33's ready check). - Comments where a reader would ask: the repeated game-mode test, the button timings, the Custom Game button, the Italian text size (fontSizeUnk, as its meaning isn't proven), HistoricCampaignIntro's two campaign texts, and why CrusadeEndscreen_Prepare writes its five texts and its three runs of blocks out (a loop over the texts: quick_diff 0.9985 -> 0.9718). quick_diff identical for every file; all 47 functions reccmp 100.0 in a full build at the branch head. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
…NKNOWN, INT_00b9840c) 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.
gynt's finished MenuViews functions, landed as he OK'd 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").
These 47 functions read 100% on his fork, but were never in a PR. Each one comes in as a commit authored by him, with his file exactly as it stands at the tip of one of two branches, where its status line reads 100%:
archive/UI-MenuViews-merged-full(2755710): 35 functions;archive/UI-MenuViews-development-second-pass(32939bb): 12 functions.Each commit body names its branch and commit. 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), resolvers enabled locally (not committed), and sourcehold's reccmp with--resolve-wrapped-calls --ignore-security-cookie.openshc-pr-checkgives no errors, andstatus_regression.pyfinds nothing lower than a known score.Our commits on top of his
field3_0xc→field_0xc(twice);field225_0x106ee4→field_0x106ee4;(BuildMenuTabTypeShort)0x3e: that type isn't on main, so the value comes from the header commit below.s_pointers in place of about 90 string literals. Each was picked by the address the original pushes, and has its text in a// "…"comment above it.return;s, block comments and the decompiler's parentheses.constwhere they're assigned once, and declared at first use. The menu-position block in 11 files now has the shape of main'sMenuView_General_DoInitial_OnlySetMenuXY.gotoremoved (MapEditorLandscaping_DoEveryFrame); the function still measures 100.0.if.(ushort)on the colours'shortValueand unusedBOOLEnum.hppincludes.One change to gynt's naming. In CrusadeEndscreen_Prepare, his
SHC_SoundStreamnames forAppendCreditsSoundStreamCommand's second argument are now plain numbers. That parameter is anint, and the values just count 1 to 8 over the jester's eight blocks (5, 6 and 7 were OR-ed constants). TheMUSICandSPEECH_1arguments in the same calls became their numbers too. Happy to put them back if the names are preferred.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.BuildMenuTabTypegetsBMTT_UNKNOWN_62(eb52adb).cmp …, 0x3eat 0x0043303E).BMTT_SOLDIERSto 62 when it hides the menu, and back again when it shows it. So 62 is the hidden soldiers tab.BMTT_SOLDIERS_HIDDENwould fit as a real name.TextArrayIndexTypegetsTAIT_UNKNOWN_4(07a1c3a).resetToTextIndex: SingleplayerMapChoice_Prepare (0x00448D40), BuildMenu_Prepare (0x00431A90) and LobbyMenu_Prepare (0x00427320).TAIT_THREE__FILTER_AandTAIT_FIVE__NUMERIC_DOT, and TheRedDaemon asked for such values on Reimplement 33 Map::Version functions that are 100% #300.Left as they are, with the reason
(char*)casts in CrusadeEndscreen_Prepare stay: Credits.hpp declaresAppendCreditsBinkVideoCommandandAppendCreditsBinkVideoWithAudioCommandwithchar*parameters.char const*would drop the casts, but those are Jake Vawter's functions on his fork, so we left that header alone.memsetmeasures lower (0.9643 → 0.7965).(int)DAT_MapMissionType < 2: the global isundefined4, and the original compares it signed. Its values are 0 just build, 1 economic, 2 siege and 3 invasion.DAT_MainMenuSwingSwordBool = 0stays a number: despite its name the global holds 0-2 (main storesrng % 3in it).historicCampaignNumber(1-4) has no enum, and the labels match the merged HistoricCampaignOutro.int chapter;has no initial value: every branch assigns it.Header changes we didn't make (suggestions)
DAT_MapMissionType→int, which would drop the cast above.DAT_00b960dc→int, since it stores -3.historicCampaignNumber→int, since it holds 1-4.MinimapViewState::needsRedraw→BOOLEnum: main storesTRUEto it.setRenderingRect(xPos, yPos, width, heigth)really takes right/bottom: setRenderingRect.cpp stores them in.right/.bottom, and BuildMenu_DoEveryFrame passesx + 513, y + 576.INT_00b95b64,INT_00b960e4,INT_00b95f68,INT_00ed27b8,postWindowCloseMessage,DAT_SH1_SiegeAdvancedModeandisTimeHalted2.What some placeholders hold
These come from these functions; most of the checker's remaining notes are about these names.
INT_00b95abc: the hovered button, -1 for none.INT_00b960f0/INT_00b960fc:timeGetTime()values kept inintglobals.INT_00ed27b8: set once the German easter-egg music has started.DAT_00b95b2c: the chapter (0-3).DAT_00b96100: that chapter's first mission (1/6/11/16).INT_00b95b64: set by the load/save map UI, cleared in the map choice's Prepare.INT_00b960e0: 24 at 800×600, otherwise 0.INT_00b95b34: the demo screen's start time.DAT_00ed278c: counts clicks on the Extreme ad's hotspot; the window closes at 3.INT_00ed3140: a tick counter.DAT_UnknownGFXIndex: 1 while a modal dialog is open.missionNumber1to20is set to 33 in UnusedEconomicMissionSelect, andunk_resetViewportRelatedtakes 1-4.== 1..4are the crusade-select buttons (First Edition, Custom Game, Warchest, Extreme). A button enum would help there and in SelectCrusade_Main, GameLost_DoEveryFrame and Unknown61_Prepare.The 47 functions
Function, address, and which of gynt's two branches it comes from
MenuView_BuildMenu_DoEveryFrameMenuView_BuildMenu_PrepareMenuView_CampaignUnk_DoInitialMenuView_Credits_DoInitialMenuView_CrusadeEndscreen_DoEveryFrameMenuView_CrusadeEndscreen_DoInitialMenuView_CrusadeEndscreen_PrepareMenuView_CustomScenarios_DoEveryFrameMenuView_CustomScenarios_PrepareMenuView_GameStartEnterName_DoInitialMenuView_General_DoInitial_BlackBorderAndGfxMenuView_General_DoInitial_BlackBoxDefaultBorderAndPictureMenuView_General_DoInitial_CrusadeAndRankMenuMenuView_General_DoInitial_DefaultMainMenuStructureMenuView_General_DoInitial_ScreenToBlackMenuView_HistoricCampaignIntro_PrepareMenuView_HistoricCampaignSelect_DoEveryFrameMenuView_HistoricCampaignSelect_PrepareMenuView_HistoricMissionSelect_PrepareMenuView_IntroLogos_PrepareMenuView_IntroVideo_DoEveryFrameMenuView_IntroVideo_PrepareMenuView_LobbyMenu_PrepareMenuView_MainMenu_DoInitialMenuView_MainMenu_PrepareMenuView_MapEditorLandscaping_DoEveryFrameMenuView_MissionSelect_DoEveryFrameMenuView_MpConnection_PrepareMenuView_ScenarioDescription_DoInitialMenuView_SelectCrusade_DoEveryFrameMenuView_SelectCrusade_DoInitialMenuView_SingleplayerMapChoice_PrepareMenuView_Unknown26_CampaignRelatedUnk_DoInitialMenuView_Unknown33_DoEveryFrameMenuView_Unknown61ReturnToSkrimishMenuUnk_DoEveryFrameMenuView_Unknown61ReturnToSkrimishMenuUnk_DoInitialMenuView_Unknown61ReturnToSkrimishMenuUnk_PrepareMenuView_UnusedCreateSiege_PrepareMenuView_UnusedDemoBuyItScreen_PrepareMenuView_UnusedEconomicGametypeSelect_DoInitialMenuView_UnusedEconomicGametypeSelect_PrepareMenuView_UnusedEconomicMissionSelect_PrepareMenuView_UnusedExtremeAd_DoEveryFrameMenuView_UnusedExtremeAd_DoInitialMenuView_UnusedOldTitleMenu_DoInitialMenuView_UnusedOldTitleMenu_PrepareMenuView_UnusedSelectRandomNumberOfEnemies_DoEveryFrameOther PRs: the rest of gynt's backlog is in #380 (MenuModals, DisplayElements, Rendering), #381 and #382 (MenuItems). Our drafts below 100% stay open: #313, #318, #321, #327, #328, #356, #360 and #363.
🤖 Generated with Claude Code