Repository navigation
Mario: draw the TICK row only on the clock's overlay - #127
Merged
Merged
Conversation
settings_game_draw branches into settings_clock_draw's last tail call to draw RESET GAME, so tick_draw also drew the TICK row on the in-game pause overlay, below that panel and outside its dirty rect, where it stayed after the overlay closed. Skip it unless gnw_mode is the clock (the test ui_render_overlay picks settings_clock_draw with). golden.json is recorded with gcc 15.3.1 (15.2's toolchain is gone; main's hashes are the same under both). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Checked on hardware (amalgam on a dev unit): the SMB1 pause overlay no longer shows the TICK row or leaves it behind, and the clock overlay's TICK ON row still works. |
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.
A user reported a stray "TICK ON" row when pausing in games (on an amalgam, Mario side). Stock `settings_game_draw` has no tail call of its own for RESET GAME: it branches into `settings_clock_draw`'s last tail call (0x0800cffc → 0x0800ce9e), which the TICK setting redirected to `tick_draw`. So every in-game pause also drew the TICK row, below the in-game panel and outside its dirty rect, and it stayed on screen after the overlay closed.
`tick_draw` now skips the row unless `(gnw_mode & 0xc2) == 0x02`, the same test `ui_render_overlay` uses to pick `settings_clock_draw`.
Zelda isn't affected: in its ITCM code the only branch into the hooked tail of `settings_clock_draw` comes from inside that function, and both in-game draw functions end in their own tail calls.
Testing:
🤖 Generated with Claude Code