Repository navigation
Reimpl/WallAndPitchState 100% - #244
Merged
Merged
Conversation
…chState Remove the decompiler-generated `WARNING: Enum ...` and `decompilerscript: committed: ...` block comments, and the loose `return;` at the end of each void function body. The `// FUNCTION:` address lines and the early returns inside the functions are untouched. Deletions only; rebuilt with the struct resolvers on and every reccmp percentage is unchanged (avg 90.42 over 11). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Rewrite the decompiler's expanded arithmetic and bitwise assignments into their compound forms: this->index = this->index + 1 -> this->index += 1 this->countdown = this->countdown - 1 -> this->countdown -= 1 layer[t] = layer[t] & 0xffb8f4ff -> layer[t] &= 0xffb8f4ff layer[t] = info.logic | layer[t] -> layer[t] |= info.logic Code-generation neutral: with the struct resolvers enabled, reccmp reports the identical match percentage for all eleven functions before and after (addWallPlacementInfoForTile, placePitchDitch, resetWallPlacementInfo, resetWallAndPitchState, startEntityDestructionConfirmation, startUnitDestructionConfirmation and updateDestructionConfirmationCountdown at 100.00%, startBuildingDestructionConfirmation 95.65%, destroyWall 93.22%, destroyPitch 80.65%, confirmAndQueueDestructionCommand 59.32%). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01APv1k4u7nvSoJ6qABsdVev
TheRedDaemon
previously approved these changes
Oct 10, 2026
TheRedDaemon
left a comment
Contributor
There was a problem hiding this comment.
I generally approve, due to full match. One thing: Do you think you can name/create enums for the states here, or is it too uncertain? No problem if not.
The conflicts need to be resolved, though.
Contributor
Author
This is for the future when I test this live in the game cause I am not too sure on the current naming even. |
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.
No description provided.