Repository navigation
Conversation
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: 944abe8
Verdict
NEEDS_REWORK
First-pass review of this PR's own diff against plza/upstream/s2-10 (#544). The launch driver's state machine holds up when I trace it: X then A for RESTART, A only on the game's tile, a wait on HOME after the launch press, per-screen press caps, settled-looks before success, a cancel check each look, and failure before any press for a missing tile/title check or backup save. The 29 cases in Pokemon_StoryLaunch_Tests.cpp cover it well. Code health: 0 failures. CRLF kept, files listed in SourceFiles.cmake. Fork Draft CI (ubuntu / build) was still pending when I looked.
Medium
switch_launch_prompts()(Pokemon_StorySwitchPrompts.h/.cpp) has no caller and no test anywhere through this chain tip. The tests build their own prompts. Its press details (Up twice then A on the update prompt,CLOSE_GAME_DELAYafter A on "Close software?") go unchecked until some later PR uses it. Land it with its first caller, or say in the description which PR that is. The same goes forlaunch_story_game()itself: only tests call it in this chain.- Overlap with upstream
NintendoSwitch/Programs/NintendoSwitch_GameEntry.cpp. That file already handles close, user select and the update window (resume_game_from_home: Up, Up, A, the same as here). The driver needs a backend/simulation seam, which GameEntry lacks, so a new driver may be right. A maintainer will ask why GameEntry isn't reused, though, so the header comment or the description should answer that in one line. - Lab talk in code.
Pokemon_StoryLaunch.hbackup_title("console B, 2026-11-14"),Pokemon_StoryLaunch.cpp:46-49LaunchReadable::title("PLZA's loose title check (console B, 2026-11-14)"), and test comments atPokemon_StoryLaunch_Tests.cpp~196, ~237 ("Console B, 2026-11-14 02:41 (FRLG)"), ~280 ("Console B, PLZA, 2026-11-14 13:09"). Keep the screen behavior and drop our console and timestamps (user theme T3). The PLZA button example in the shared header (StoryLaunchRequest::Save::BACKUP) is fine as an example, but "PLZA" belongs in the PLZA policy rather than the shared engine's enum comment.
Low
- The title-readability condition is written twice, two ways.
LaunchDriver::step()passes.title = m_title_held_looks == 0 && (m_launched || !title_after_launch), andread_launch_look()then checks(launched || !policy.title_after_launch)again, withlaunched = m_launched || m_loading. The second check never changes the result. Keep one (user theme T5). move_to_tile()hard-codesMilliseconds(80), Milliseconds(400), which areStoryLaunchPress{}'s defaults. UseStoryLaunchPress{.button = button}so the numbers live in one place, and give those defaults a why (80 ms hold, 400 ms release).press()failure text "{} presses changed nothing": the count is per screen name over the whole launch (e.g. "home" counts the X and every A), not consecutive presses that did nothing. Say "took {} presses".switch_launch_prompts(ConsoleHandle&): the returnedmatcheslambdas keep detectors that referenceconsole. Say in the header comment that the prompts must not outlive the console.
# Conflicts: # SerialPrograms/Source/Pokemon/AutoStory/Pokemon_AutoStory_Tests.h
The launch driver and its tests keep each screen behavior they guard and drop the console, game and timestamps of the runs that showed it.
|
Review fixes, tip Fixed: 3 (console, game and timestamps out of the launch header, driver and tests), 1 (description: launch_story_game() and switch_launch_prompts() are used by the PLZA program PR, batch 2). |
# Conflicts: # SerialPrograms/Source/Pokemon/AutoStory/Pokemon_AutoStory_Tests.h
…set_game_from_home()
|
Empty after the PLZA-minimal S2 cut (HomeTileReader / shared launch stay on the BDSP/FRLG branches). Branch kept as the base of the next PR. |
Depends on #544
Adds a run's first event, the launch: from wherever the console is (HOME with the game closed or suspended, the title, the overworld) to the overworld on a save, one driver for every game with each game's policy saying how its screens look. It also adds the Switch's own prompts between HOME and a game (close software, user select, update), which every game's launch policy starts with. launch_story_game() and switch_launch_prompts() have no caller in this chain: Used by the PLZA program PR (batch 2). Tests: the StoryLaunch suite over the fake backend, built and run by Fork Draft CI. Part of the re-split of #522/#524/#525 into reviewable steps; review fixes are new commits on the PR that owns each problem, merged up the chain.