Repository navigation
Conversation
…y the loop-end symbol differs) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
BuildingCostResource (BCR_WOOD..BCR_GOLD) instead of the column numbers 0-4, and namespace closing comments. Re-measured on 40cbb1c with a full build and reccmp: 94.7/92.3; only the loop-end symbol still differs, as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Drop the comment that restates the loop. Re-measured on 592a17d with a full build and reccmp: 94.7/92.3, still only the loop-end symbol differs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
TheRedDaemon
requested changes
Dec 4, 2026
| SHC_3BB0A8C1_0x004196D0 | 100.0% | Reimplemented | ||
|
|
||
| SHC_3BB0A8C1_0x00419780 | 0.0% | Pending | ||
| SHC_3BB0A8C1_0x00419780 | 100.0% | Reimplemented (counted: only the loop-end symbol differs) |
Contributor
Author
There was a problem hiding this comment.
reccmp scores it 94.7. The only differing instruction is the loop-end compare: the original cmp eax, 0x5C2A6C points one past the BuildingCost array, and reccmp labels that address RenderingDefinedData (the next global), while ours gets a different label. Everything else is identical. The remark now says this precisely, in main's counted: form (0ad637c).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
The only differing instruction is the loop-end compare: the original's cmp eax, 0x5C2A6C points one past BuildingCost, which reccmp labels RenderingDefinedData, while the build's operand gets another symbol name. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR carries the finished part of draft PR #234 (
reimpl/BuildingsState): the one function of its four that is at 100%. No function with register-allocation-only differences qualified (see below).Measured on
origin/main(40cbb1c, re-measured after merging 592a17d): I built the DLL with exactly this file in the build list, with the struct resolvers and its function resolver switched on, then ran reccmp. The file is taken unchanged from #234, and clang-format makes no changes to it.BuildingsState::initBuildingCostsThe only line reccmp marks is the loop bound: the original's
cmp eax, <RenderingDefinedData instance>against ours,cmp eax, cached+4. Both are the same address 0x5C2A6C, which reccmp symbolizes differently. This is main's existing "counted" case, worded the same way as the three functions already counted for it.Header changes: none. /GL and function-visibility entries: none needed.
Left in #234 (more than register allocation differs):
giveBackResourceForDestroyedBuilding(90.6): animul/addpair runs in a different order, and the original re-reads the building type withmovsxwhere ours reloads a spilled copy.determineBuildingEntranceFromCustomArea(98.2): a tile sum is reassociated.setupBuildingData(87.0): the field addresses are hoisted and spilled in a different place.Overlap with open PRs: none outside #234 itself.
Style pass (
style:commit, following the currentREIMPLEMENTATION_STYLE_GUIDE.mdon main):BuildingCostcolumns are indexed withBuildingCostResource(BCR_WOOD...BCR_GOLD) instead of 0-4;I re-measured with a full build and reccmp: still 94.7/92.3, and the loop-end symbol is still the only difference.
There is one commit for the function, with its status line.
Draft PR #234 stays open for the remaining three functions.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp