Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
9805a05
BDSP AutoStory: set Options by position, in any language
dayfine Nov 9, 2026
15df882
Merge branch 'bdsp/autostory-mine-floaroma-wip' into bdsp/autostory-s…
dayfine Nov 10, 2026
c35fbfc
AutoStory (BDSP): adopt std::string_view for option row names
dayfine Nov 10, 2026
ac6a40d
Merge branch 'bdsp/autostory-mine-floaroma-wip' into bdsp/autostory-s…
dayfine Nov 10, 2026
64f65fc
Merge bdsp/autostory-mine-floaroma-wip into bdsp/autostory-settings-l…
dayfine Nov 11, 2026
1a622c3
Merge origin/bdsp/autostory-mine-floaroma-wip into bdsp/autostory-set…
dayfine Nov 11, 2026
64a4086
Merge branch 'bdsp/autostory-mine-floaroma-wip' into bdsp/autostory-s…
dayfine Nov 11, 2026
4e4a169
Merge origin/bdsp/autostory-mine-floaroma-wip into bdsp/autostory-set…
dayfine Nov 11, 2026
4b3c079
Merge remote-tracking branch 'origin/bdsp/autostory-mine-floaroma-wip…
dayfine Nov 11, 2026
3de9f7d
Merge origin/bdsp/autostory-mine-floaroma-wip into bdsp/autostory-set…
dayfine Nov 12, 2026
935a745
Merge origin/bdsp/autostory-mine-floaroma-wip into bdsp/autostory-set…
dayfine Nov 12, 2026
053d630
Merge origin/bdsp/center-run-settle into bdsp/autostory-settings-lang…
dayfine Nov 12, 2026
2d5996f
Merge origin/bdsp/center-run-settle into bdsp/autostory-settings-lang…
dayfine Nov 12, 2026
9e6e3a4
Merge origin/bdsp/center-run-settle into bdsp/autostory-settings-lang…
dayfine Nov 12, 2026
d659bea
Merge origin/bdsp/center-run-settle into bdsp/autostory-settings-lang…
dayfine Nov 12, 2026
e354e7e
Merge origin/bdsp/center-run-settle into bdsp/autostory-settings-lang…
dayfine Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* BDSP AutoStory - Actions Tests

Check warning on line 1 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Actions_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=649 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -30,6 +30,7 @@
#include "PokemonBDSP_AutoStory_IntroSteps.h"
#include "PokemonBDSP_AutoStory_LitDoorway.h"
#include "PokemonBDSP_AutoStory_NewGame.h"
#include "PokemonBDSP_AutoStory_Settings.h"
#include "PokemonBDSP_AutoStory_Actions_Tests.h"

namespace PokemonAutomation{
Expand Down Expand Up @@ -437,6 +438,42 @@
}


// The Options screen of a French game (console B, 2026-11-09; in
// CommandLineTests under PokemonBDSP/AutoStory): read by position and
// colour only, the cursor on Text Speed with Normal (the middle of three)
// selected, and the first value of the two-value rows below it.
UnitTestResult test_options_french(Logger& logger){

Check warning on line 445 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Actions_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::NintendoSwitch::PokemonBDSP::test_options_french( Logger & logger): function_lines=31 (advisory above 25, limit 50)
const std::string path = UNIT_TEST_RESOURCE_PATH() + "PokemonBDSP/AutoStory/OptionsFrench-20261109.png";

Check warning on line 446 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Actions_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
if (!Filesystem::is_regular_file(path)){
return UnitTestResult(UnitTestResult::SKIPPED, "Screenshot not found: " + path);

Check warning on line 448 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Actions_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
const ImageRGB32 screen(path);
if (!options_screen_shown(screen)){
return "Options screen not recognised.";
}
const std::optional<double> y = options_selected_row_y(screen);
if (!y || *y < 0.137 || *y > 0.177){
return "Selected row not found on the first row.";
}
logger.log("Selected row at y=" + std::to_string(*y));

Check warning on line 458 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Actions_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
if (options_highlighted_column(screen, *y, 3) != size_t(1)){
return "Text Speed: Normal (column 1 of 3) not read.";
}
// Battle Effects to Gyroscope: rows 2 to 6, the first value highlighted.
for (size_t row = 2; row <= 6; row++){
const double row_y = *y + 0.0858 * row;
if (options_highlighted_column(screen, row_y, 2) != size_t(0)){
return "Row " + std::to_string(row) + ": the first of two values not read.";

Check warning on line 466 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Actions_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
}
ImageRGB32 black(1920, 1080);
black.fill(0xff000000);
if (options_screen_shown(black)){
return "A black frame read as Options.";
}
return true;
}

// The move picked from names and PP as read. lab-B 2026-11-09, French:
// no name read, Piplup's Pound at 35 PP and Growl at 22 PP, and the old
// "newest move that is not a status move" fallback used Growl until the
Expand Down Expand Up @@ -586,6 +623,10 @@
.input = {"Jubilife School lamp", test_school_lamp},
.expectation = {},
},
{
.input = {"Options read by position, French", test_options_french},
.expectation = {},
},
{
.input = {"battle moves: the pick from names and PP", test_choose_move},
.expectation = {},
Expand Down
Loading
Loading