Repository navigation
Reimplement 5 UI::MenuModals functions at 100% - #355
Merged
TheRedDaemon merged 5 commits intoNov 7, 2026
Merged
Conversation
MenuModalRenderFunction_WaitingForHost, gynt's code from his fork, branch reimpl/UI-MenuModals-100 (25e0f9f, 95.5% "asm differs" there). Unchanged, it measures reccmp 100.0% here, with today's headers, the resolvers on and --ignore-security-cookie. His newer reimpl/UI-MenuModals (2026-11-02) has an older decompiler-style form of it at 80-86%; that one is not used. Against the draft: decimal constants, COL_C2F0EB, a line comment with the text in place of the script's block comment, the four unused using-declarations (eTextSections, BGR24, TextAlignment, BOOLEnum) and the BOOLEnum.hpp include dropped, BGR24.hpp becomes ColorsEnum.hpp. His yParam / xParam locals go: the position is passed straight into the call (x + width / 2, y + 23; his width / 2 + x order is a tie), which gives the same code, as the arguments are pushed right to left and y is still computed before x. Same generated code (quick_diff and reccmp unchanged). Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuModalRenderFunction_AlliesOrder, gynt's code from his fork, branch reimpl/UI-MenuModals-100 (25e0f9f, 95.0% "asm differs" there). Unchanged, it measures reccmp 100.0% here, with today's headers, the resolvers on and --ignore-security-cookie. His newer reimpl/UI-MenuModals (2026-11-02) has an older decompiler-style form of it at 80-86%; that one is not used. Against the draft: decimal constants, COL_CCFAFF, a line comment with the text in place of the script's block comment, the four unused using-declarations (eTextSections, BGR24, TextAlignment, BOOLEnum) and the BOOLEnum.hpp include dropped, BGR24.hpp becomes ColorsEnum.hpp. His yParam / xParam locals go: the position is passed straight into the call (x + 30, y + 25), which gives the same code, as the arguments are pushed right to left and y is still computed before x. His int xParam; declared before the BuildEnemyPlayerList call goes with them. The list is still rebuilt first on every render, as the original does. Same generated code (quick_diff and reccmp unchanged). Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuModalRenderFunction_AlliesRequestGoods, gynt's code from his fork, branch reimpl/UI-MenuModals-100 (25e0f9f, 94.7% "asm differs" there). Unchanged, it measures reccmp 100.0% here, with today's headers, the resolvers on and --ignore-security-cookie. His newer reimpl/UI-MenuModals (2026-11-02) has an older decompiler-style form of it at 80-86%; that one is not used. Against the draft: decimal constants, COL_CCFAFF, a line comment with the text in place of the script's block comment, the four unused using-declarations (eTextSections, BGR24, TextAlignment, BOOLEnum) and the BOOLEnum.hpp include dropped, BGR24.hpp becomes ColorsEnum.hpp. His yParam / xParam locals go: the position is passed straight into the call (x + 20, y + 25), which gives the same code, as the arguments are pushed right to left and y is still computed before x. His int xParam; declared first goes with them. Same generated code (quick_diff and reccmp unchanged). Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuModalRenderFunction_AlliesSendGoods, gynt's code from his fork, branch reimpl/UI-MenuModals-100 (25e0f9f, 94.7% "asm differs" there). Unchanged, it measures reccmp 100.0% here, with today's headers, the resolvers on and --ignore-security-cookie. His newer reimpl/UI-MenuModals (2026-11-02) has an older decompiler-style form of it at 80-86%; that one is not used. Against the draft: decimal constants, COL_CCFAFF, a line comment with the text in place of the script's block comment, the four unused using-declarations (eTextSections, BGR24, TextAlignment, BOOLEnum) and the BOOLEnum.hpp include dropped, BGR24.hpp becomes ColorsEnum.hpp. His yParam / xParam locals go: the position is passed straight into the call (x + 20, y + 25), which gives the same code, as the arguments are pushed right to left and y is still computed before x. His int xParam; declared first goes with them. The comment keeps cr.tex's "Send Goods" (the draft had both "Send goods" and "Send Goods"). Same generated code (quick_diff and reccmp unchanged). Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuModalRenderFunction_ChooseRandomNumberOfEnemies, gynt's code from his fork, branch reimpl/UI-MenuModals-100 (25e0f9f, 94.7% "asm differs" there). Unchanged, it measures reccmp 100.0% here, with today's headers, the resolvers on and --ignore-security-cookie. His newer reimpl/UI-MenuModals (2026-11-02) has an older decompiler-style form of it at 80-86%; that one is not used. Against the draft: decimal constants, COL_CCFAFF, a line comment with the text in place of the script's block comment, the four unused using-declarations (eTextSections, BGR24, TextAlignment, BOOLEnum) and the BOOLEnum.hpp include dropped, BGR24.hpp becomes ColorsEnum.hpp. The decompiler's iVar2 to iVar5 go: both texts' positions (x + 300, y + 100 and x + 100, y + 300), the font sizes, the wrap width 400 and the blend 0 are passed straight into the calls, which gives the same code. The second comment drops the script's triple space after "You can" (cr.tex has one space); the two one-line calls are clang-formatted. Same generated code (quick_diff and reccmp unchanged). Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 7, 2026
TheRedDaemon
approved these changes
Nov 7, 2026
kotijekriv
added a commit
to kotijekriv/OpenSHC
that referenced
this pull request
Nov 7, 2026
…nc, sourcehold#355) into reimpl/UI-MenuViews-1-100
kotijekriv
added a commit
to kotijekriv/OpenSHC
that referenced
this pull request
Nov 7, 2026
gynt
added a commit
that referenced
this pull request
Nov 7, 2026
The branch's status updates were generated from a snapshot taken before #355 landed, so committing them downgraded the 5 UI::MenuModals functions (0x0047E3A0, 0x004AD2B0, 0x004AD780, 0x004ADD90, 0x004AE070) from "100.0% | Reimplemented" back to "0.0% | Pending". Only lines for functions this branch actually touches should change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmasN7c2wmSWi212e7H
gynt
added a commit
that referenced
this pull request
Nov 7, 2026
These are the functions from #355, which landed on main after this branch's merge of it. This branch never touched their lines; bringing them forward only keeps `git diff origin/main..HEAD` limited to the functions this branch actually works on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmasN7c2wmSWi212e7H
gynt
added a commit
that referenced
this pull request
Nov 7, 2026
This reverts commit d677bbe. The commit was based on a misreading: the 5 UI::MenuModals lines were never changed by this branch. They are identical to the merge base here, and main moved ahead of that base when #355 landed, which is all `git diff origin/main..HEAD` was showing. Merging main resolves these lines in main's favour without help, since only main's side touched them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmasN7c2wmSWi212e7H
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.
Five UI::MenuModals render functions at 100%, each with its status line: the "waiting for host" dialog and four ally and opponent dialogs (the allies' order, request goods and send goods boxes, and the random number of enemies).
This is our first PR in UI::MenuModals, which gynt agreed on Discord (2026-11-06) we may continue from his drafts. All five are his code from his fork's
reimpl/UI-MenuModals-100(25e0f9f, his closed #252), where they read 94.7-95.5% ("asm differs"). Unchanged, they measure 100.0% on today's main with today's headers, the resolvers on and--ignore-security-cookie. These commits only restyle them, and each commit credits him as co-author. His newerreimpl/UI-MenuModals(2026-11-02) has an older decompiler-style form of them at 80-86%; we didn't use it. No header change.Other PRs: the ready #348, #349, #352 and #353, the ready #354 (scenario editor), and the drafts #313, #318, #321, #327 and #328.
Built on top of
main(8125c61) with the bundled MSVC1400-SP1, natively on Windows, against the SteamStronghold Crusader.exe(3bb0a8c1…5387ac5a), with the struct and function resolvers enabled locally (not committed), using sourcehold's reccmp with--resolve-wrapped-calls --ignore-security-cookie. None of it has been run in game.It went through the same checks as #353: a fresh-eyes review of every file (texts, positions, alignment, colours, fonts and the wrap width checked against the original's disassembly and cr.tex; its points applied and measured),
openshc-pr-checkwith no errors and no CHECKs, andstatus_regression.py, which finds nothing below a known score on main or any fork.MenuModalRenderFunction_WaitingForHostMenuModalRenderFunction_AlliesOrderMenuModalRenderFunction_AlliesRequestGoodsMenuModalRenderFunction_AlliesSendGoodsMenuModalRenderFunction_ChooseRandomNumberOfEnemiesWhat changed against gynt's drafts
The same generated code in all five (quick_diff and reccmp unchanged); every argument value is the same.
COL_C2F0EB/COL_CCFAFF, and line comments with each text in place of the script's block comments.BOOLEnum.hppinclude go;BGR24.hppbecomesColorsEnum.hpp.x + width / 2, y + 23and the like). That's a tie: the arguments are pushed right to left, so y is still computed before x, as in the original. In AlliesOrder, RequestGoods and SendGoods,int xParam;from the top is gone with them.iVar2-iVar5are named or inlined, and the script's triple space in "You can still" in the comment is a single one.The font numbers 15, 17 and 18 stay numbers: they index
TextManager::fontSizeClassArray[20], which has no enum.Proposed, not changed here
renderMultilineText5Unkis a null-checked wrapper aroundFontSizeClass::renderMultilineTextUnk(mode 0);renderWrappedTextwould say what it does, and its colour parameter could beBGR24.🤖 Generated with Claude Code