Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -195,8 +195,6 @@ const MarkIconMatcher& MarkIcon_Lza(){
return ret;
}

//TODO: GAMEBOY

const std::vector<const MarkIconMatcher*>& ALL_ORIGIN_MARK_MATCHERS(){
static const std::vector<const MarkIconMatcher*> matchers = {
&MarkIcon_Kalos(),
Expand Down
2 changes: 2 additions & 0 deletions SerialPrograms/Source/PokemonHome/PokemonHome_Panels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "Programs/PokemonHome_BoxSorterLivingDex.h"

#include "Programs/PokemonHome_GenerateNameOCR.h"
#include "Programs/TestPrograms/PokemonHome_ReadSummaryScreen.h"

namespace PokemonAutomation{
namespace NintendoSwitch{
Expand Down Expand Up @@ -44,6 +45,7 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
if (PreloadSettings::instance().DEVELOPER_MODE){
ret.emplace_back("---- Developer Tools ----");
ret.emplace_back(make_single_switch_program<PokemonHome::GenerateNameOCRData_Descriptor, PokemonHome::GenerateNameOCRData>());
ret.emplace_back(make_single_switch_program<PokemonHome::ReadSummaryScreen_Descriptor, PokemonHome::ReadSummaryScreen>());
}

return ret;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* Read Summary Screen
*
* From: https://github.com/PokemonAutomation/
*
*/

#include <optional>
#include <sstream>
#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<CollectedPokemonInfo> logged_info = pokemon_info;
std::ostringstream ss;
ss << logged_info;
Comment thread
Dalton-V marked this conversation as resolved.
env.log("Summary screen result: " + ss.str());
}

}
}
}
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions SerialPrograms/cmake/SourceFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading