diff --git a/SerialPrograms/Source/PokemonHome/Inference/PokemonHome_OriginMarkReader.cpp b/SerialPrograms/Source/PokemonHome/Inference/PokemonHome_OriginMarkReader.cpp index 09b8c94666..48876b8c41 100644 --- a/SerialPrograms/Source/PokemonHome/Inference/PokemonHome_OriginMarkReader.cpp +++ b/SerialPrograms/Source/PokemonHome/Inference/PokemonHome_OriginMarkReader.cpp @@ -195,8 +195,6 @@ const MarkIconMatcher& MarkIcon_Lza(){ return ret; } -//TODO: GAMEBOY - const std::vector& ALL_ORIGIN_MARK_MATCHERS(){ static const std::vector matchers = { &MarkIcon_Kalos(), diff --git a/SerialPrograms/Source/PokemonHome/PokemonHome_Panels.cpp b/SerialPrograms/Source/PokemonHome/PokemonHome_Panels.cpp index 8082a24351..d829b6bebd 100644 --- a/SerialPrograms/Source/PokemonHome/PokemonHome_Panels.cpp +++ b/SerialPrograms/Source/PokemonHome/PokemonHome_Panels.cpp @@ -13,6 +13,7 @@ #include "Programs/PokemonHome_BoxSorterLivingDex.h" #include "Programs/PokemonHome_GenerateNameOCR.h" +#include "Programs/TestPrograms/PokemonHome_ReadSummaryScreen.h" namespace PokemonAutomation{ namespace NintendoSwitch{ @@ -44,6 +45,7 @@ std::vector PanelListFactory::make_panels() const{ if (PreloadSettings::instance().DEVELOPER_MODE){ ret.emplace_back("---- Developer Tools ----"); ret.emplace_back(make_single_switch_program()); + ret.emplace_back(make_single_switch_program()); } return ret; diff --git a/SerialPrograms/Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.cpp b/SerialPrograms/Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.cpp new file mode 100644 index 0000000000..056e916316 --- /dev/null +++ b/SerialPrograms/Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.cpp @@ -0,0 +1,48 @@ +/* Read Summary Screen + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include +#include +#include "Pokemon/Pokemon_CollectedPokemonInfo.h" +#include "Pokemon/Pokemon_Strings.h" +#include "PokemonHome/Programs/PokemonHome_BoxNavigation.h" +#include "PokemonHome_ReadSummaryScreen.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonHome{ +using namespace Pokemon; + +ReadSummaryScreen_Descriptor::ReadSummaryScreen_Descriptor() + : SingleSwitchProgramDescriptor( + "PokemonHome:ReadSummaryScreen", + STRING_POKEMON + " Home", "Read Summary Screen", + "", + "Read the current Pokemon summary screen in Pokemon Home and log the detected data.", + ProgramControllerClass::StandardController_NoRestrictions, + FeedbackType::REQUIRED, + AllowCommandsWhenRunning::DISABLE_COMMANDS + ) +{} + +ReadSummaryScreen::ReadSummaryScreen(){} + +void ReadSummaryScreen::program( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context +){ + CollectedPokemonInfo pokemon_info{}; + read_summary_screen(env, context, pokemon_info); + + std::optional logged_info = pokemon_info; + std::ostringstream ss; + ss << logged_info; + env.log("Summary screen result: " + ss.str()); +} + +} +} +} diff --git a/SerialPrograms/Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.h b/SerialPrograms/Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.h new file mode 100644 index 0000000000..345387dbbb --- /dev/null +++ b/SerialPrograms/Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.h @@ -0,0 +1,31 @@ +/* Read Summary Screen + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonHome_ReadSummaryScreen_H +#define PokemonAutomation_PokemonHome_ReadSummaryScreen_H + +#include "NintendoSwitch/NintendoSwitch_SingleSwitchProgram.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonHome{ + +class ReadSummaryScreen_Descriptor : public SingleSwitchProgramDescriptor{ +public: + ReadSummaryScreen_Descriptor(); +}; + +class ReadSummaryScreen : public SingleSwitchProgramInstance{ +public: + ReadSummaryScreen(); + + virtual void program(SingleSwitchProgramEnvironment& env, ProControllerContext& context) override; +}; + +} +} +} +#endif diff --git a/SerialPrograms/cmake/SourceFiles.cmake b/SerialPrograms/cmake/SourceFiles.cmake index f1b37efede..902eee9a0e 100644 --- a/SerialPrograms/cmake/SourceFiles.cmake +++ b/SerialPrograms/cmake/SourceFiles.cmake @@ -1623,6 +1623,8 @@ file(GLOB LIBRARY_SOURCES Source/PokemonHome/Programs/PokemonHome_GenerateNameOCR.h Source/PokemonHome/Programs/PokemonHome_PageSwap.cpp Source/PokemonHome/Programs/PokemonHome_PageSwap.h + Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.cpp + Source/PokemonHome/Programs/TestPrograms/PokemonHome_ReadSummaryScreen.h Source/PokemonHome/Resources/PokemonHome_PokeballSprites.cpp Source/PokemonHome/Resources/PokemonHome_PokeballSprites.h Source/PokemonLA/Inference/Battles/PokemonLA_BattleMenuDetector.cpp