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 @@ -26,9 +26,9 @@ namespace NintendoSwitch{
namespace PokemonFRLG{

WhiteDialogDetector::WhiteDialogDetector(Color color)
: m_right_box(0.812, 0.726, 0.013, 0.169)
, m_top_box(0.175, 0.715, 0.649, 0.005)
, m_bottom_box(0.177, 0.896, 0.645, 0.008)
: m_right_box(0.844, 0.725, 0.005, 0.197)
, m_top_box(0.151, 0.719, 0.698, 0.006)
, m_bottom_box(0.152, 0.913, 0.692, 0.009)
{}
void WhiteDialogDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_right_box);
Expand All @@ -49,10 +49,10 @@ bool WhiteDialogDetector::detect(const ImageViewRGB32& screen){
}

AdvanceWhiteDialogDetector::AdvanceWhiteDialogDetector(Color color)
: m_dialog_box(0.170, 0.726, 0.655, 0.172)
, m_right_box(0.812, 0.726, 0.013, 0.169)
, m_top_box(0.175, 0.715, 0.649, 0.005)
, m_bottom_box(0.177, 0.896, 0.645, 0.008)
: m_dialog_box(0.145, 0.727, 0.707, 0.193)
, m_right_box(0.844, 0.725, 0.005, 0.197)
, m_top_box(0.151, 0.719, 0.698, 0.006)
, m_bottom_box(0.152, 0.913, 0.692, 0.009)
{}
void AdvanceWhiteDialogDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_dialog_box);
Expand Down Expand Up @@ -94,10 +94,10 @@ bool AdvanceWhiteDialogDetector::detect(const ImageViewRGB32& screen){
}

SelectionDialogDetector::SelectionDialogDetector(Color color)
: m_right_box(0.812, 0.726, 0.013, 0.169)
, m_top_box(0.175, 0.715, 0.649, 0.005)
, m_bottom_box(0.177, 0.896, 0.645, 0.008)
, m_selection_box(0.783, 0.457, 0.017, 0.177)
: m_right_box(0.844, 0.725, 0.005, 0.197)
, m_top_box(00.151, 0.719, 0.698, 0.006)
, m_bottom_box(0.152, 0.913, 0.692, 0.009)
, m_selection_box(0.813, 0.436, 0.013, 0.195)
{}
void SelectionDialogDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_right_box);
Expand All @@ -121,8 +121,8 @@ bool SelectionDialogDetector::detect(const ImageViewRGB32& screen){
}

BattleDialogDetector::BattleDialogDetector(Color color)
: m_dialog_top_box(0.152, 0.721, 0.694, 0.008)
, m_dialog_right_box(0.842, 0.730, 0.004, 0.171)
: m_dialog_top_box(0.124, 0.727, 0.752, 0.009)
, m_dialog_right_box(0.871, 0.736, 0.005, 0.179)
{}
void BattleDialogDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_dialog_top_box);
Expand All @@ -142,10 +142,10 @@ bool BattleDialogDetector::detect(const ImageViewRGB32& screen){


BattleMenuDetector::BattleMenuDetector(Color color)
: m_menu_top_box(0.522, 0.716, 0.331, 0.011)
, m_menu_right_box(0.845, 0.727, 0.008, 0.175)
, m_dialog_top_box(0.153, 0.720, 0.343, 0.014) //top of the white dialog box
, m_dialog_right_box(0.486, 0.722, 0.009, 0.177) //right side, closest to the menu
: m_menu_top_box(0.523, 0.720, 0.357, 0.008) //top of the white dialog box
, m_menu_right_box(0.875, 0.729, 0.005, 0.193)
, m_dialog_top_box(0.123, 0.726, 0.373, 0.013)
, m_dialog_right_box(0.492, 0.739, 0.005, 0.172) //right side, closest to the menu
{}
void BattleMenuDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_menu_top_box);
Expand Down Expand Up @@ -174,9 +174,9 @@ bool BattleMenuDetector::detect(const ImageViewRGB32& screen){


AdvanceBattleDialogDetector::AdvanceBattleDialogDetector(Color color)
: m_dialog_box(0.152, 0.721, 0.694, 0.177)
, m_dialog_top_box(0.152, 0.721, 0.694, 0.008)
, m_dialog_right_box(0.842, 0.730, 0.004, 0.171)
: m_dialog_box(0.123, 0.725, 0.753, 0.197)
, m_dialog_top_box(0.124, 0.727, 0.752, 0.009)
, m_dialog_right_box(0.871, 0.736, 0.005, 0.179)
{}
void AdvanceBattleDialogDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_dialog_box);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ namespace NintendoSwitch{
namespace PokemonFRLG{

StartMenuDetector::StartMenuDetector(Color color)
: m_right_box(0.864, 0.750, 0.006, 0.173)
, m_top_box(0.128, 0.744, 0.743, 0.006)
, m_bottom_box(0.128, 0.917, 0.736, 0.006)
: m_right_box(0.898, 0.751, 0.003, 0.195)
, m_top_box(0.097, 0.746, 0.804, 0.005)
, m_bottom_box(0.095, 0.941, 0.803, 0.006)
{}
void StartMenuDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_right_box);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace NintendoSwitch{
namespace PokemonFRLG{

ShinySymbolDetector::ShinySymbolDetector(Color color)
: m_box_symbol(0.441, 0.250, 0.030, 0.050)
: m_box_symbol(0.430, 0.208, 0.048, 0.078)
{}
void ShinySymbolDetector::make_overlays(VideoOverlaySet& items) const{
items.add(COLOR_RED, m_box_symbol);
Expand Down
4 changes: 3 additions & 1 deletion SerialPrograms/Source/PokemonFRLG/PokemonFRLG_Navigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void soft_reset(const ProgramInfo& info, VideoStream& stream, ProControllerConte
// A + B + Select + Start
pbf_press_button(context, BUTTON_B | BUTTON_A | BUTTON_MINUS | BUTTON_PLUS, 360ms, 1440ms);

pbf_mash_button(context, BUTTON_PLUS, GameSettings::instance().START_BUTTON_MASH0);
pbf_mash_button(context, BUTTON_PLUS, GameSettings::instance().START_BUTTON_MASH1);
context.wait_for_all_requests();

pbf_press_button(context, BUTTON_A, 160ms, 320ms);
Expand Down Expand Up @@ -69,6 +69,8 @@ void open_slot_six(ConsoleHandle& console, ProControllerContext& context){
pbf_wait(context, 100ms);
context.wait_for_all_requests();
pbf_press_button(context, BUTTON_PLUS, 320ms, 640ms);
pbf_wait(context, 100ms);
context.wait_for_all_requests();
}
},
{ start_menu }
Expand Down
6 changes: 3 additions & 3 deletions SerialPrograms/Source/PokemonFRLG/PokemonFRLG_Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ GameSettings& GameSettings::instance(){
GameSettings::GameSettings()
: BatchOption(LockMode::LOCK_WHILE_RUNNING)
, m_soft_reset_timings("<font size=4><b>Soft Reset Timings:</b></font>")
, START_BUTTON_MASH0(
, START_BUTTON_MASH1(
"<b>Start Button Mash:</b><br>Mash Start for this long after a soft reset to get to the main menu.",
LockMode::LOCK_WHILE_RUNNING,
"5000 ms"
"6000 ms"
)
, ENTER_GAME_WAIT0(
"<b>Enter Game Wait:</b><br>Wait this long for the game to load.",
Expand All @@ -51,7 +51,7 @@ GameSettings::GameSettings()
)
{
PA_ADD_STATIC(m_soft_reset_timings);
PA_ADD_OPTION(START_BUTTON_MASH0);
PA_ADD_OPTION(START_BUTTON_MASH1);
PA_ADD_OPTION(ENTER_GAME_WAIT0);
PA_ADD_STATIC(m_shiny_audio_settings);
PA_ADD_OPTION(SHINY_SOUND_THRESHOLD);
Expand Down
2 changes: 1 addition & 1 deletion SerialPrograms/Source/PokemonFRLG/PokemonFRLG_Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GameSettings : public BatchOption{
static GameSettings& instance();

SectionDividerOption m_soft_reset_timings;
MillisecondsOption START_BUTTON_MASH0;
MillisecondsOption START_BUTTON_MASH1;
MillisecondsOption ENTER_GAME_WAIT0;
MillisecondsOption ENTER_GAME_MASH0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ void GiftReset::open_summary(SingleSwitchProgramEnvironment& env, ProControllerC
pbf_wait(context, 100ms);
context.wait_for_all_requests();
pbf_press_button(context, BUTTON_PLUS, 320ms, 640ms);
pbf_wait(context, 100ms);
context.wait_for_all_requests();
}
},
{ start_menu }
Expand Down