Repository navigation
fix(pinball): fix clock overlay, add blink and complementary colors - #59
Merged
Merged
Conversation
…lors - Fix frame_layer=1 scenes: clock overlay was erasing animation due to incorrect DotBlt mask semantics. Added overlay_clock_above() that uses pixel-based transparency instead of the font's DotBlt mask. - Add colon blinking during pinball animations (toggles every ~500ms), matching the main clock behavior. - Animation color now defaults to the HSV-complementary palette color (e.g. orange clock -> blue animation) instead of the same color. Added complementary_color() utility in colors.py. - Add scripts/debug_scene.py for .scn rendering analysis and debugging.
PluginManager now exposes current_color (set by ZeClock on every color change in auto mode). Pinball plugin reads _current_color from config so it matches the clock's active color at activation time. This ensures the pinball clock overlay uses the same color as the main clock even in auto-rotate mode, rather than always defaulting to orange.
The clock plugin has its own color palette (includes white) and its own auto-rotate cycle, independent from ZeClock's COLOR_LIST. Previously the pinball got ZeClock's color which was out of sync with what the user actually sees. Now PluginManager._get_default_plugin_color() reads _current_color directly from the default plugin instance, so the pinball clock overlay always matches the color displayed between animations.
Color is now read directly from the default plugin instance via _get_default_plugin_color(). The intermediate current_color attribute and its update in the main loop are no longer needed.
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.
Summary
Fixes broken rendering on ~348 pinball scenes with
frame_layer=1(clock above animation) and improves visual polish.Changes
Bug fix — clock overlay erasing animation (frame_layer=1)
Scenes like RD0673.scn had the animation completely hidden by the clock's black background. Root cause: the font's DotBlt mask marks only outline pixels as transparent, leaving the entire black background as "opaque" — which erases the animation underneath.
Fix: added
overlay_clock_above()inoverlay.pythat uses pixel-based transparency (any pixel ≤ 2 is transparent) instead of the DotBlt mask. Used for allframe_layer=1compositions.Colon blinking
The
:in the time display now blinks (toggles every ~500ms) during pinball animations, matching the main clock behavior.Complementary animation color
Animation color now defaults to the HSV-complementary palette color instead of the same color as the clock. For example: orange clock → blue animation, red → cyan, purple → green.
Added
complementary_color()utility incolors.py(HSV hue rotation + nearest palette snap).Debug script
Added
scripts/debug_scene.pyfor analyzing .scn rendering issues (frame dump, overlay preview, virtual DMD playback).Testing