Reimplement stockpile footprint cleanup (native byte match) - #217
Open
Krarilotus wants to merge 5 commits into
Open
Krarilotus wants to merge 5 commits into
Krarilotus wants to merge 5 commits into
Conversation
TheRedDaemon
requested changes
Sep 8, 2026
TheRedDaemon
requested changes
Sep 9, 2026
Contributor
Author
|
Renamed the article to |
Contributor
|
@Krarilotus LGTM Please resolve the conflict. We usually do this via rebasing, basically, if you are on your branch, you would rebase on "main" and force push the result onto your branch. |
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.
TL;DR: Recreates the original cleanup of a stockpile's nine walkable tiles, including the building's rubble behavior. The implementation uses existing map and building structures and matches the original function at 100% in reccmp.
Reimplements
TileMapState::clearStockpileFootprintTilesat0x004FAF70. Each tile loses the existingL_STOCKPILEUnkandL_WALL_OR_GATEHOUSElogic flags, regains its default height, follows its referenced building'snoRubblebranch, and finally clearsAlphaGFXLayer.MiscDisplayLayeris a separate ushort layer without a corresponding flag enum in the current headers. Its0x4000value remains literal until its meaning is identified. The wiki documents this limitation and the ownership of the map layers and global inputs.Validation: full x86 RelWithDebInfo DLL build with VS2005 SP1 passes after the flag-name change; linked reccmp still reports 100% at
0x004FAF70. The local build uses a current Windows SDK manifest tool because the legacy tool crashes. No DLL deployment or gameplay test was performed. The emulation script was removed from this PR as requested in review.