Uh oh!
There was an error while loading. Please reload this page.
Reimplement stockpile footprint cleanup (native byte match) - #217
Open
Krarilotus wants to merge 2 commits into
Open
Reimplement stockpile footprint cleanup (native byte match)#217Krarilotus wants to merge 2 commits into
Krarilotus wants to merge 2 commits into
Conversation
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 freeto 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: This recreates the original game's cleanup when a stockpile is removed, keeping its behavior unchanged. The compiled function matches the original machine code, and all 32 automated comparison tests passed.
Reimplements
TileMapState::clearStockpileFootprintTilesat0x004FAF70, preserving native stockpile demolition behavior: clear the nine walkable tiles'0x102logic bits, restore default height, honor each referenced building'snoRubblebranch, and clearAlphaGFXLayerafter reading that reference.Uses existing global resolvers and the receiver's map layers. Generated headers, resolver flags and default source lists are unchanged. The source can be selected with the existing local-development source list workflow.
Validation:
/O2 /Ob1compilation passes.TileMapStatedifferential emulation cases. Both rubble branches, zero/nonzero building indices, relocated receivers, stack cleanup and callee-saved registers pass.OpenSHC.dllbuild passes. Linked reccmp reports 100% at0x004FAF70; the soft status entry now records that result. A current Windows SDK manifest tool replaces the crashing legacymt.exelocally. No DLL deployment or live gameplay test was performed.The wiki describes vanilla footprint cleanup and related placement behavior. Build-process instructions and the extension-specific investigation have been removed from that page.