diff --git a/.github/workflows/cpp-ci-serial-programs-base.yml b/.github/workflows/cpp-ci-serial-programs-base.yml index 35d8ee2d4f..2b5782b59d 100644 --- a/.github/workflows/cpp-ci-serial-programs-base.yml +++ b/.github/workflows/cpp-ci-serial-programs-base.yml @@ -247,9 +247,9 @@ jobs: with: # The fork's fixtures: upstream's plus the PLZA AutoStory frames (Confirm Choices, opening and arrival folders), dayfine/CommandLineTests PR #18, # and the 01.01 banner and controls hint in English and Italian (branch plza/hint-banner-any-language), - # and the 01.00 new game frames, HOME tiles (FireRed first, Z-A second too) and the 01.02 Italian choice menu and talk prompt (branch plza/new-game-intro), and the 03.02b battle frame with no lock-on and Map & Missions card (branch plza/battle-panel), and Wild Zone 1's full map frames (branch plza/zone1-map-pin), and 03.09's lab gate dialog and 03.08b's wild battle at the zone pillar (branch plza/0309-gate-frames), and Wild Zone 1's frames with the lead's panel up and no battle (branch plza/0308b-pillar-frame), and the first X's Save card over the menu and the menu after it (branch plza/menu-save-frames). Fork-only pin: dropped at upstream handoff. + # and the 01.00 new game frames, HOME tiles (FireRed first, Z-A second too) and the 01.02 Italian choice menu and talk prompt (branch plza/new-game-intro), and the 03.02b battle frame with no lock-on and Map & Missions card (branch plza/battle-panel), and Wild Zone 1's full map frames (branch plza/zone1-map-pin), and 03.09's lab gate dialog and 03.08b's wild battle at the zone pillar (branch plza/0309-gate-frames), and Wild Zone 1's frames with the lead's panel up and no battle (branch plza/0308b-pillar-frame), and the first X's Save card over the menu and the menu after it (branch plza/menu-save-frames), and the 01.02 French choice menu (branch plza/choice-fr). Fork-only pin: dropped at upstream handoff. repository: 'dayfine/CommandLineTests' - ref: '9d564dfac6cbd0fc37c117bcb6f5f4df5b71e8a1' + ref: 'f35620e0f84cd1dae1c85225169b33e292639753' path: 'CommandLineTests' # The unit tests assume the downloadable resources they need are already downloaded diff --git a/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.cpp b/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.cpp index e87cd715f5..482b3cd397 100644 --- a/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.cpp @@ -24,13 +24,13 @@ constexpr size_t MIN_CHOICE_ROWS = 2; // The menu's geometry at 1920 x 1080. Measured on the console on the // tourist's two rows (Traditional Chinese), the Research Lab elevator's -// three (Japanese) and Villy's two at 01.02 (Italian). The panel is -// anchored at its bottom right: it ends at x 1728, y 808 whatever its +// three (Japanese) and Villy's two at 01.02 (Italian, French). The panel +// is anchored at its bottom right: it ends at x 1728, y 808 whatever its // rows, and grows left to fit its longest row (x 1408 in Japanese, 1343 -// in Italian). The highlight runs from 10 right of the panel's left to -// x 1715; the bottom row's from y 732 to 800, each row above 80 higher. -// The rows' text starts 35 right of the panel's left and ends at x 1690 -// at most (Italian's longest row: 1688). +// in Italian, 1198 in French). The highlight runs from 10 right of the +// panel's left to x 1715; the bottom row's from y 732 to 800, each row +// above 80 higher. The rows' text starts 35 right of the panel's left +// and ends at x 1690 at most (Italian's and French's longest rows: 1688). constexpr double ROW_PITCH = 80.0 / 1080; constexpr double STRIP_TOP = 748.0 / 1080; constexpr double STRIP_HEIGHT = 40.0 / 1080; @@ -126,8 +126,12 @@ bool row_has_text(const ImageViewRGB32& frame, size_t from_bottom, double highli } // namespace +// The selection arrow sits left of the panel: from 13 left of it to 27 +// right (x 1185 to 1225 on French's panel at 1198). French's 01.02 rows, +// 35 characters, take 455 of the panel's 530; the box starts at x 960, +// room for a panel at x 973, rows of about 54 such characters. const ImageFloatBox& dialog_choice_box(){ - static const ImageFloatBox box{0.654308, 0.481553, 0.295529, 0.312621}; + static const ImageFloatBox box{960.0 / 1920, 0.481553, 0.949837 - 960.0 / 1920, 0.312621}; return box; } diff --git a/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.h b/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.h index 2ba49c8066..780833bb4c 100644 --- a/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.h +++ b/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox.h @@ -22,8 +22,9 @@ namespace NintendoSwitch{ namespace PokemonLZA{ -// Where a dialogue's choices are drawn: the restaurant receptionist's -// (RestaurantFarmer). Other dialogues' choices are assumed to sit there. +// Where a dialogue's selection arrow can be: the restaurant +// receptionist's box (RestaurantFarmer), widened left to x 960 for the +// panels of long languages (French's 01.02 arrow is at x 1185). const ImageFloatBox& dialog_choice_box(); // A dialogue's choice menu as read: how many rows it has, and the diff --git a/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox_Tests.cpp index 5e5e3db237..eed12874c0 100644 --- a/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/Detectors/PokemonLZA_AutoStoryDialogChoiceBox_Tests.cpp @@ -225,6 +225,11 @@ const FrameCase FRAME_CASES[] = { .input = {.file = "AutoStoryDialogChoices/it_0102_villy_2rows_row0.png"}, .expectation = {.rows = DialogChoiceRows{.count = 2, .selected = 0}, .choice_box = true}, }, + { + .name = "Villy's \"I'll get it back\" or \"battle\" at 01.02 (2 rows, French: the arrow left of x 1256)", + .input = {.file = "AutoStoryDialogChoices/fr_0102_villy_2rows_row0.png"}, + .expectation = {.rows = DialogChoiceRows{.count = 2, .selected = 0}, .choice_box = true}, + }, { .name = "light pavement, no menu", .input = {.file = "AutoStoryDetectors/ArrivalToAd/0038-nothing+autosave.jpg"},