Reimplement stockpile footprint cleanup (native byte match) - #217
Reimplement stockpile footprint cleanup (native byte match)#217Krarilotus wants to merge 4 commits into
Conversation
| @@ -0,0 +1,81 @@ | |||
| """Compare a VS2005 /O2 DLL-mode object with original SHC 1.41 under x86 emulation. | |||
There was a problem hiding this comment.
As mentioned in other places: Please remove the emulation scripts if you matched 100%. They are optional in case you did not.
There was a problem hiding this comment.
Removed in ba14b9b. The full DLL rebuild and linked reccmp comparison still give 100% at 0x004FAF70; the PR now contains the implementation and its behavior documentation.
| These logic names come from the existing `Logic1` enum; their combination here | ||
| does not establish additional stockpile semantics. `MiscDisplayLayer` is a | ||
| separate `ushort` layer with no corresponding flag enum in the current headers. | ||
| Its `0x4000` bit is kept literal pending identification of its consumers; a | ||
| same-valued flag from another layer would not establish its meaning. |
There was a problem hiding this comment.
This is far to technical again. That extends to the wiki entry itself.
I personally think the other text part are also too technical in the way that they talk a bit much about what the code does.
Do not get me wrong, these entries can state stuff like the three points, like "it clears that and that flag on the map logic layer and restores the height", but things like the part after, talking about where these infos come from, are pure code information and provide no information about what the game does on a game logic level.
There was a problem hiding this comment.
Rewrote the article in 4596df5 around the visible game behavior: clearing the walkable tiles, updating rubble/display information, and the shared placement rules. Removed addresses, enum provenance and discussion of how the evidence was obtained. The unidentified display effect remains stated briefly without guessing its meaning.
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.