Skip to content

Reimpl/WallAndPitchState 100% - #244

Merged
gynt merged 19 commits into
mainfrom
reimpl/WallAndPitchState
Oct 11, 2026
Merged

gynt merged 19 commits into
mainfrom
reimpl/WallAndPitchState

Conversation

@gynt

@gynt gynt commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

gynt and others added 18 commits September 28, 2026 21:54
…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
@gynt gynt changed the title Reimpl/wall and pitch state Reimpl/WallAndPitchState 100% Oct 5, 2026
@gynt
gynt marked this pull request as ready for review October 5, 2026 22:26
@gynt
gynt requested a review from TheRedDaemon October 7, 2026 20:45
TheRedDaemon
TheRedDaemon previously approved these changes Oct 10, 2026

@TheRedDaemon TheRedDaemon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gynt

gynt commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

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.

This is for the future when I test this live in the game cause I am not too sure on the current naming even.

@gynt
gynt merged commit 1c1274f into main Oct 11, 2026
1 check passed
@gynt
gynt deleted the reimpl/WallAndPitchState branch October 11, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants