Repository navigation
Conversation
ScreenEvents names what a frame shows (fades, dialog, battle, still screen, HOME menu) in words every game shares; ScreenMachine runs a closed loop over known screens: look, take that screen's step, look again, failing on unknown screens, stalls, too many visits or timeout. Split out of the AutoStory shared core (#648) so it can be reviewed on its own. Drops the unused ScreenEvents::from_bits.
This was referenced Nov 19, 2026
Names via EnumStringMap (SCREEN_EVENT_NAMES, WARP_FADE_NAMES), ScreenEvents prints via std::formatter, ScreenState's stored callables are MoveOnlyFunction (run_screen_machine takes the states by value), fields get defaults, fade thresholds move into the .cpp, unused bits() goes, and run_screen_machine's per-look body becomes take_look().
…achine Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
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.
Depends on #572
This adds a small game-agnostic screen layer under CommonTools. ScreenEvents names what a frame shows (a black or white fade, a dialog or choice box, a battle, a still screen, the HOME menu) and reads fades and still screens from pixels; a game plugs its own detectors in through ScreenEventObserver. ScreenMachine runs a closed loop over known screens: look, take that screen's step, look again, and fail on an unknown screen, a stalled screen, too many visits or a timeout. It is split out of #648 so it can be reviewed at the infra bar on its own; the code is unchanged apart from dropping an unused
from_bits. Tested with the ScreenEvents and ScreenMachine unit test suites, which run on the fake observations and synthetic frames, no console needed.