Skip to content

Reimplement 7 UI::MenuViews functions at 100% - #369

Merged
gynt merged 11 commits into
sourcehold:mainfrom
kotijekriv:reimpl/UI-MenuViews-3-100
Nov 7, 2026
Merged

gynt merged 11 commits into
sourcehold:mainfrom
kotijekriv:reimpl/UI-MenuViews-3-100

Conversation

@kotijekriv

@kotijekriv kotijekriv commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Seven more UI::MenuViews functions at 100%, each with its status line: the map editor's properties view, the new map's size screen and its two unused twins, the crusade map's setup, the game-lost screen's every-frame handler, and the intro sequence's player.

All seven continue gynt's drafts on his fork's reimpl/UI-MenuViews-development, in the area he agreed on Discord (2026-11-06) we may take. Every commit body cites his commits by hash (the one we built on, and the earlier ones), says what was already his and what changed, and credits him as co-author. No header change is left: gynt's Ghidra sync e32319b took this PR's two GameCore BOOLEnums and renamed DAT_00b95954 to INT_00b95954 as an int rather than a BOOLEnum, which this PR now follows: main is merged in, and Unknown26 stores 1 (d2739f5). The twins' switches name the map sizes since a968ec4 (MC_MAP_SIZE_160, _200 and _300, and MC_MAP_SIZE_400 as the default; 100 has no name), as gynt asked on #354; the code is the same.

Other PRs: #353 and #359 (the first ten MenuViews functions) and draft #356; the ready #348, #349, #352, #354, #357, #358, #364 and #368 (a fix for main); the drafts #313, #318, #321, #327, #328, #360 and #363.

Built on top of main (eef6f66) with the bundled MSVC1400-SP1, natively on Windows, against the Steam Stronghold Crusader.exe (3bb0a8c1…5387ac5a). Each file was measured as it stands: 100.0% raw and 100.0% normalized in a clean alone build, 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 a fresh-eyes review (each function compared with the original's disassembly, every attribution checked against the whole history; its points applied and measured), openshc-pr-check with no errors, and status_regression.py, which finds nothing below a known score on main or any fork.

Header changes

Update: on main since e32319b, DAT_00b95954 as int INT_00b95954. The evidence below is kept for the record.

  • DAT_00b95954 is a BOOLEnum (4cc9d5e): every store is 0 or 1 (0x004254C0 stores ebx, zeroed at 0x004254B6; 0x004E1F08 stores 1 in Unknown26), and every read tests it against 0 or 1 (0x0042640D, 0x004261E4, and switchToMenuView's two cmp .., 1 at 0x0046B806, which pick the end credits' music). Main's playDarMehqOrGlory and switchToMenuView compile the same. Ghidra would name it BOOLEnum_00b95954; the name stays, so gynt's sync can rename it together with its users.
  • GameCore::descriptionUseStringTable and GameCore::mapLoadedForEditor are BOOLEnums (56d6a82): descriptionUseStringTable is stored 0 at 0x0042EE75 and 0x0042FA76, 1 at 0x00474EE6, and from registers holding 0 or 1 at 0x0042F0C1, 0x00474ECA and 0x00448922; mapLoadedForEditor is stored 1 at 0x004300C9, 0x00430614 and 0x00494610, and from 0/1 registers at 0x00425F1D and 0x0042FA96. Every read compares with 0 or with a register that holds 0. Main's eight users (switchToMenuView, readMapOrSavFile, writeMapOrSaveFile, InitializeBasicMap, the MapEditorProperties and SaveLoadMap handlers and the two UnusedChoose handlers) compile the same.

Behaviour

All seven behave as the original does. Two of gynt's earlier drafts didn't, and his later commits had already fixed them, which this PR follows:

  • Unknown26 (0x004E1E70): his f4756df returns after every switchToMenuView, as the original does; his earlier 288b1cd and 0ef5f8b went on after the switch, so at the end of the intro sequence they could switch views more than once in a frame.
  • GameLost_DoEveryFrame (0x004DC9E0): in skirmish and multiplayer the screen leaves only once BOOLEnum_00ed279c is set (0x004DCA4A to 0x004DCA63), as in his 9df20a9.
Class Function Address gynt's commits
MapEditorProperties MenuView_MapEditorProperties_Prepare 0x0042DFD0 46f3f38 (85.7%), 24305ee, 8f42b3d
NewMapMapsize MenuView_NewMapMapsize_DoEveryFrame 0x0042F3F0 3a10a44 (83.5%), 35d66b7, 4cfdc42
UnusedChooseAvailableKeeps MenuView_UnusedChooseAvailableKeeps_DoEveryFrame 0x0042FAC0 96f71d9 (83.5%), 69751c0, cef13ed
UnusedChooseGameType MenuView_UnusedChooseGameType_DoEveryFrame 0x00430150 7425729 (83.5%), 431d154, 27bdc15
CrusadeMap MenuView_CrusadeMap_Prepare 0x004D8CB0 ba34388 (82.5%), 75c2542, 387ad88
GameLost MenuView_GameLost_DoEveryFrame 0x004DC9E0 9df20a9 (65.8%), 29597e4, 5ddb422
Unknown26 MenuView_Unknown26_CampaignRelatedUnk_DoEveryFrame 0x004E1E70 f4756df, d40842f

The three DoEveryFrame twins are the original's three copies of one body, instruction for instruction the same but for the title's text (TEXT_MAPEDIT 20, 21 and 27).

Kept as they are, and why

Each was measured; a one-line comment in the code says why.

  • The twins: the title's position in two locals, y first (inline: quick_diff 0.9760 -> 0.7200; x first: 0.9600), and the label's x in its own local (x += previewSize: 0.8617). The second switch lists default first, as the original lays the arms out, so a 100 map gets the 200 frame, as in the original.
  • CrusadeMap_Prepare: the loop counter outside the for (declared in it, each loop gets a second guard: 91 instructions against the original's 86); a totalLoadedGfx store in each arm (one store after picking the file name: 0.9708 -> 0.9123); a fixme on the original clamping the warchest progress when the extreme one passes 19 (0x004D8D22).
  • GameLost_DoEveryFrame: one skipStoreSKMasters store at the end (a store per arm keeps 0 in ebx all through the function: 0.9221 -> 0.6937); the video test before the greatest-lord screen (the other way round: 0.9026); a switch for the builder's map type (if / else: 0.9121); isSkirmishTrail == TRUE, as the original compares with 1.
  • Unknown26: missions past 21 tested first (<= 21 first: 0.9057 -> 0.8113).

Proposed, not changed here

  • MenuTextInputState::DAT_ArrayOfMapIndices2 starts at +0x1050, not +0x1054, and both arrays hold 500: 0x004494A0 copies Indices[i] = [i*4 + 0x011275F8]. Main's SaveLoadMap compensates with [mapIndex - 1], so the change would touch a function on main; it's left for a PR of its own.
  • INT_00ed2bdc is written indexed at 0x004D9547 ([edx*4 + 0xed2bdc]), so it is the first element of an array, not a flag; it stays int until the array is understood.
  • GameCore::skipStoreSKMasters only ever holds 0 or 1 (22 stores of 0, 2 of 1, six reads against 0): a bool would fit; byte keeps the code.
  • MinimapViewState::needsRedraw looks like a BOOLEnum, but most of its accesses are this-relative and not checked yet.
  • 0x004D8DC0 in status/addresses-SHC-3BB0A8C1.txt is a loop label inside CrusadeMap_Prepare (0x004D8CB0), not a function.

gynt's other commits on these functions

Each commit body names the commits it continues. gynt has more on the same functions on his fork, and they are credited here too: his best-scoring commit on the address and his newest one on the file, where the body doesn't name them. Where one of them is at 100%, his version already matched the original, and a fix this text describes for that function was only against the earlier draft it names.

Function Address His other commits
MenuView_NewMapMapsize_DoEveryFrame 0x0042F3F0 e9bc49c (2026-11-02, "swap if/else arms across the UI view and modal f")
MenuView_UnusedChooseAvailableKeeps_DoEveryFrame 0x0042FAC0 e9bc49c (2026-11-02, "swap if/else arms across the UI view and modal f")
MenuView_UnusedChooseGameType_DoEveryFrame 0x00430150 e9bc49c (2026-11-02, "swap if/else arms across the UI view and modal f")
MenuView_CrusadeMap_Prepare 0x004D8CB0 e9bc49c (2026-11-02, "swap if/else arms across the UI view and modal f")

🤖 Generated with Claude Code

kotijekriv and others added 9 commits November 7, 2026 21:44
Every store is 0 or 1: 0x004254C0 stores ebx, zeroed at 0x004254B6, and 0x004E1F08 stores ecx, set to 1 in
Unknown26_CampaignRelatedUnk_DoEveryFrame. Every read compares it with 0 or 1: cmp .., 0 three times, cmp .., 1 twice
(at 0x0046B806 among them) and 0x004261E4 against a zeroed edi. The type changes from undefined4 to BOOLEnum, with the
include and using as in main's BOOLEnum_00ed279c. Ghidra would name it BOOLEnum_00b95954; the name stays, so that the
sync can rename it together with its users. Its users compile to the same code before and after: main's
playDarMehqOrGlory and switchToMenuView are 100.0% raw and normalized in clean alone builds of this branch without and
with this commit, which compare equal over all 1827 functions; this branch's Unknown26_CampaignRelatedUnk_DoEveryFrame
and Credits_Prepare in the MenuViews draft measure the same in quick_diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e BOOLEnums

descriptionUseStringTable (0x01FE8678) is stored 0 at 0x0042EE75 and 0x0042FA76, 1 at 0x00474EE6, and from registers
holding 0 or 1 at 0x0042F0C1 (ebx, zeroed at 0x0042F012), 0x00474ECA (ebx, zeroed at 0x00474E62) and 0x00448922 (ebp,
set to 1 at 0x004485F0); readMapOrSavFile also reads it from the map file. mapLoadedForEditor (0x01FE9AA8) is stored 1
at 0x004300C9, 0x00430614 and 0x00494610, and from esi (zeroed at 0x00425EA1) at 0x00425F1D and edi (set to 1 at
0x0042F989) at 0x0042FA96. Every read of either compares it with 0 or with a register, and the registers checked hold 0
(ecx at 0x0042E940, and esi at 0x0042E05B and 0x0042E06F, where this branch's MapEditorProperties_Prepare matches with
truth tests). Both change from dword to BOOLEnum. All their users compile to the same code before and after (quick_diff,
same ratio and length each): main's switchToMenuView, readMapOrSavFile, writeMapOrSaveFile, InitializeBasicMap,
MenuItemRenderFunction_MapEditorProperties_MainButtons, MenuItemActionHandler_SaveLoadMap_Buttons,
MenuItemActionHandler_UnusedChooseAvailableKeeps_Main and _UnusedChooseGameType_Main, and this branch's
MapEditorProperties_Prepare and Unknown26_CampaignRelatedUnk_DoEveryFrame. The names stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_MapEditorProperties_Prepare opens the map editor's properties view: it closes the third modal, resets the text
input, loads frontend_builder2.tgx, in a multiplayer map counts the players with a first building and clears every
player's and the map's start goods, and measures the height of the map's description. From gynt's 46f3f38 on his
fork's reimpl/UI-MenuViews-development (85.71% there, "Shared call duplicated"), first written in 24305ee and
8f42b3d (59.5%): the function's reads and stores, the per-arm renderMultilineTextUnk calls and the positive
descriptionStringTableIndex test are his. Changed here: the two pointer loops become index loops over players 1 to 8 and
the 25 start goods (with the draft's walking pointers MSVC addresses the start resources from an offset register:
quick_diff 1.0000 -> 0.9429); the building test reads playerDataArray[player].buildingEntryInfos[0].id, the field the
draft reached through a cast 0x3D8 bytes before startResources; main's INT_00b95b74 for DAT_00b95b74 and
TAIT_NINE__FILTER_B for 9; COL_000000 for the black colour; truth tests on mapLoadedForEditor and
descriptionUseStringTable, BOOLEnums since the header commit before this one; 0x13 and 0x168 are 19 and 360; the (int)
cast on descriptionStringTableIndex, piVar2 to piVar4, five using lines and three unused includes go; main's namespace
form; the file name's s_ pointer with its text above it; comments say what the loops and the height are. This file was
measured as it stands in a clean alone build of the branch on main eef6f66: 100.0% raw, 100.0% normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_NewMapMapsize_DoEveryFrame draws the screen's title, "Select New Map Size" (TEXT_MAPEDIT 20), and a minimap
preview of the map at its size, framed twice in black, with the size as text above its top right corner. Written from
the original's instructions, with gynt's draft (3a10a44 on his fork's reimpl/UI-MenuViews-development, 83.46% there;
earlier 35d66b7 at 64.5% and 4cfdc42 at 62.32%) for the reads: the two switches, the first the original's jump table
and the second its sub / je chain with default first, are his. His goto from default into case 200 goes, as both arms
written out are merged by MSVC as in the original. Two forms are kept for the register allocation, each with a one-line
comment: the title's position in two locals, y first (inline: quick_diff 0.9760 -> 0.7200, x first: 0.9600), and the
label's x in its own local (x += previewSize: 0.8617). Also: main's namespace form, as in the sibling Prepare;
s__dx_d_005a22fc for "%dx%d" with its text above it; COL_C2F0EB, COL_000000 and TTA_RIGHT for 0xc2f0eb, 0 and -1;
needsRedraw = TRUE; decimals for 0x1e, 0x32, 0x3b, 0x122 and the frame offsets; the casts on the frame colour go; the
draft's eleven decompiler locals become x, y, centerX, centerY, mapSize, previewSize, sizeText, titleX, titleY and
labelX; comments say what is drawn, that x and y become the preview's top left corner and that a 100 map gets the
default 200 frame. quick_diff 0.9760 leaves the security cookie, the colour immediate, the jump table's labels and ret /
ret 0. This file was measured as it stands in a clean alone build of the branch on main eef6f66: 100.0% raw, 100.0%
normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_UnusedChooseAvailableKeeps_DoEveryFrame draws the screen's title, "Select Keep Types" (TEXT_MAPEDIT 21), and a
minimap preview of the map at its size, framed twice in black, with the size as text above its top right corner. The
body is the one of NewMapMapsize's 0x0042F3F0 with its own title, and the original's instructions are the same but for
that text index. Written from the original's instructions, with gynt's draft (96f71d9 on his fork's
reimpl/UI-MenuViews-development, 83.46% there; earlier 69751c0 at 64.5% and cef13ed at 62.32%) for the reads: the
two switches, the first the original's jump table and the second its sub / je chain with default first, are his. His
goto from default into case 200 goes, as both arms written out are merged by MSVC as in the original. Two forms are kept
for the register allocation, each with a one-line comment: the title's position in two locals, y first (inline:
quick_diff 0.9760 -> 0.7200, x first: 0.9600), and the label's x in its own local (x += previewSize: 0.8617). Also:
main's namespace form, as in the sibling Prepare; s__dx_d_005a22fc for "%dx%d" with its text above it; COL_C2F0EB,
COL_000000 and TTA_RIGHT for 0xc2f0eb, 0 and -1; needsRedraw = TRUE; decimals for 0x1e, 0x32, 0x3b, 0x122 and the frame
offsets; the casts on the frame colour go; the draft's eleven decompiler locals become x, y, centerX, centerY, mapSize,
previewSize, sizeText, titleX, titleY and labelX; comments say what is drawn, that x and y become the preview's top left
corner and that a 100 map gets the default 200 frame. quick_diff 0.9760 leaves the security cookie, the colour
immediate, the jump table's labels and ret / ret 0. This file was measured as it stands in a clean alone build of the
branch on main eef6f66: 100.0% raw, 100.0% normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_UnusedChooseGameType_DoEveryFrame draws the screen's title, "Select Game Type" (TEXT_MAPEDIT 27), and a minimap
preview of the map at its size, framed twice in black, with the size as text above its top right corner. The body is the
one of NewMapMapsize's 0x0042F3F0 with its own title, and the original's instructions are the same but for that text
index. Written from the original's instructions, with gynt's draft (7425729 on his fork's
reimpl/UI-MenuViews-development, 83.46% there; earlier 431d154 at 64.5% and 27bdc15 at 63.19%) for the reads: the
two switches, the first the original's jump table and the second its sub / je chain with default first, are his. His
goto from default into case 200 goes, as both arms written out are merged by MSVC as in the original. Two forms are kept
for the register allocation, each with a one-line comment: the title's position in two locals, y first (inline:
quick_diff 0.9760 -> 0.7200, x first: 0.9600), and the label's x in its own local (x += previewSize: 0.8617). Also:
main's namespace form, as in the sibling Prepare; s__dx_d_005a22fc for "%dx%d" with its text above it; COL_C2F0EB,
COL_000000 and TTA_RIGHT for 0xc2f0eb, 0 and -1; needsRedraw = TRUE; decimals for 0x1e, 0x32, 0x3b, 0x122 and the frame
offsets; the casts on the frame colour go; the draft's eleven decompiler locals become x, y, centerX, centerY, mapSize,
previewSize, sizeText, titleX, titleY and labelX; comments say what is drawn, that x and y become the preview's top left
corner and that a 100 map gets the default 200 frame. quick_diff 0.9760 leaves the security cookie, the colour
immediate, the jump table's labels and ret / ret 0. This file was measured as it stands in a clean alone build of the
branch on main eef6f66: 100.0% raw, 100.0% normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_CrusadeMap_Prepare loads the trail's map picture, keeps each trail's progress within its missions, and counts
into DAT_SkirmishTrailRelated1 three less one for each of the current trail's missions so far that was skipped with the
chicken, not below 0. From gynt's ba34388 on his fork's reimpl/UI-MenuViews-development (82.46% there, "Dropped goto
restored in trail-type chain"), first written in 75c2542 and 387ad88 (65.9%): the function's reads and stores, the
three chicken counts and the trail-type chain are his. Changed here: each count becomes a for loop up to the trail's
furthest mission, read once into a const local, behind a test of it, with the counter set before the test and the clamp
to 0 inside it: the draft's guard `< 1` compiled to cmp 1 / jl where the original tests the zero register with jle
(written `> 0` now), and the original skips the clamp when nothing was counted (quick_diff 0.8686 -> 0.9708). Two shapes
stay, each with a one-line comment: the counter outside the for (declared in it, each loop gets a second guard, 91
instructions against the original's 86: quick_diff 0.9379) and a totalLoadedGfx store in each arm (one store after
picking the file name, as the original's one store at 0x004D8CE1: 0.9123). Also: 0x31, 0x1d, 0x13 and -0x4b0 are 49, 29,
19 and -1200; the (int) casts on the progress fields and on DAT_SkirmishTrailRelated1, which are int, go; INT_00ed2bdc =
FALSE, as main's CrusadeMapAndEndscreen writes it; `+ -1` is a decrement; iVar1 is mission and the furthest mission
furthestMission; main's namespace form; the unused using goes; a fixme says the original clamps the warchest progress
when the extreme one passes 19 (the store at 0x004D8D22), which the code keeps; the s_ pointers with their text above
them. quick_diff 0.9708 leaves the timeGetTime import call, ret / ret 0 and the alignment jump the original has before
its third loop. This file was measured as it stands in a clean alone build of the branch on main eef6f66: 100.0% raw,
100.0% normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_GameLost_DoEveryFrame keeps the game-lost screen up until it may leave: in skirmish and multiplayer, behind the
greatest-lord screen, only once BOOLEnum_00ed279c is set (0x004DCA4A to 0x004DCA63); otherwise also once draggingStopped
is set, which it sets itself when no video plays, or in a campaign mission 5 seconds after the first frame that gets
there. Then it ends both speech streams (SoundSystem::endSpeechStreamsAndResetLoopFlags, 0x00424700, inlined), stops the
videos and goes back to the menu the game came from. Written from the original's instructions, with gynt's draft
(9df20a9 on his fork's reimpl/UI-MenuViews-development, 65.81% there; earlier 29597e4 and 5ddb422 at 33.9%) for
the reads: its returning arms, the extreme / warchest / skirmish order and the inverted MT_ECONOMIC test are his.
Changed: one skipStoreSKMasters = 0 at the end in place of a store and a return in each arm, which MSVC copies into the
arms itself; with a store in each arm it keeps 0 in ebx all through the function (quick_diff 0.9221 -> 0.6937); the
video test before the greatest-lord screen, as the original's jumps run (the other way round: 0.9026); the goto past the
leave test is a timedOut flag (the goto measures the same); the builder's map type a switch, as the original's sub / je
(if / else: 0.9121); truth tests on the BOOLEnums and on skipStoreSKMasters, except isSkirmishTrail == TRUE, which the
original compares with 1. Also: main's namespace form; main's BOOLEnum_00ed279c for INT_00ed279c; the speech streams'
flags indexed by SND_STR_SPEECH_1 and _2; NULL for (HBINK)0x0; 0x51, 0x33 and 0x16 are 81, 51 and 22; comments for the
SKMasters slots, SelectCrusade_Main's argument, the "Quit Mission" action and the inlined call. quick_diff 0.9221 leaves
the timeGetTime import calls and ret / ret 0. This file was measured as it stands in a clean alone build of the branch
on main eef6f66: 100.0% raw, 100.0% normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MenuView_Unknown26_CampaignRelatedUnk_DoEveryFrame plays the sequence its Prepare built with BuildIntroLogoSequence
(credits-script elements and videos) frame by frame and, once it is over, switches to the next view. From gynt's
f4756df on his fork's reimpl/UI-MenuViews-development (titled 100.00%): returning after every switchToMenuView and
testing missions past 21 first are his; his d40842f on top of it only added (int) casts, and only his earlier
288b1cd, 0ef5f8b, faaf06c and 43d1ef1 went on after the switch. Changed here: early returns in place of his
nesting, no iVar1, no casts (the bink counters are int), 21 for 0x15, ++ for the + 1, TRUE for DAT_00b95954 (a BOOLEnum
since this branch's first header commit), main's namespace form, and comments: mission 1000 is the intro sequence, and
DAT_00b95954 makes switchToMenuView play the end credits' music. quick_diff 0.9057 leaves ret / ret 0. This file was
measured as it stands in a clean alone build of the branch on main eef6f66: 100.0% raw, 100.0% normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the declaration/type change This requires changes to the generated/exported types or definitions. label Nov 7, 2026
kotijekriv and others added 2 commits November 7, 2026 23:39
The sync took this branch's GameCore.descriptionUseStringTable and mapLoadedForEditor as BOOLEnums, and renamed
DAT_00b95954 to INT_00b95954 typed int, where this branch had made it a BOOLEnum: main's header is taken, and
Unknown26_CampaignRelatedUnk_DoEveryFrame stores 1 into INT_00b95954. The branch no longer changes any header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gynt on sourcehold#354 asked why a switch used numbers where an enum has names. The NewMapMapsize, UnusedChooseAvailableKeeps
and UnusedChooseGameType DoEveryFrame switches now name 160, 200 and 300 as MC_MAP_SIZE_160, _200 and _300, and the
default size 400 as MC_MAP_SIZE_400, as main's checkKeepEnclosed does. 100 has no name in MapConstants and stays a
number. quick_diff gives all three the same 0.9760 as before (only the cookie, the colour immediate, the jump table's
labels and ret / ret 0 differ). No other numeric case or comparison in this branch has an enum: missionNumber1to20
(1000, 1) and section1066 (2) are plain ints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kotijekriv added a commit to kotijekriv/OpenSHC that referenced this pull request Nov 7, 2026
…ith gynt's draft

Draft. MenuView_UnusedCreateSiege_DoEveryFrame draws the unused "'Siege That' Builder" screen: the title, " - " and the
map's name, the description (TEXT_MAPEDIT 37) unless the bottom-left text box shows one, and the same minimap preview
with its size label as NewMapMapsize's DoEveryFrame (0x0042F3F0, here at y + 240); then it clears
MenuTextInputState.field_0xa4 and stores whether the current player has a keep. Written from the original's
instructions, with gynt's draft (266501c on his fork's reimpl/UI-MenuViews-development, 73.70% there; earlier
0df26b8, c218ebd, 94b5738 and 660d9d6) for the reads; the preview is the code of the twins in
sourcehold#369, which the original's instructions repeat. Changed: main's names after the sync (field_0x24,
field_0xa4, buildingEntryInfos[0] for keep); the description's position as two locals, y first (inline: quick_diff
0.8802 -> 0.5928); s___005a2304 for " - "; COL_C2F0EB and COL_000000; decimals; main's namespace form; no decompiler
locals. Left: the original keeps 1 in ebx and saves all four callee-saved registers up front, and in the name's else
branch computes the position into esi and edi before it calls getTextArrayPointer; ours keeps 1 in edi and saves ebx and
esi only around the preview. The forms tried for the name (its position as locals before the branch or in it, the call
as a statement of its own, the title's position as locals) all lose. This file was measured as it stands in a clean
alone build of the branch on main eef6f66: 91.4% raw, 76.4% normalized.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kotijekriv added a commit to kotijekriv/OpenSHC that referenced this pull request Nov 7, 2026
As in sourcehold#369's twins: 160, 200, 300 and the default 400 are MC_MAP_SIZE_160, _200, _300 and _400; 100 has no name
and stays a number. quick_diff 0.8802 as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the declaration/type change This requires changes to the generated/exported types or definitions. label Nov 7, 2026
@gynt
gynt added this pull request to the merge queue Nov 7, 2026
Merged via the queue into sourcehold:main with commit 303fe1c Nov 7, 2026
4 checks passed
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