Skip to content

Commit ff7cd73

Browse files
committed
Autostory: fix team star segments
1 parent 14995c8 commit ff7cd73

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include "CommonFramework/VideoPipeline/VideoFeed.h"
8+
#include "PokemonSV/Inference/Overworld/PokemonSV_NoMinimapDetector.h"
89

910
#include "CommonFramework/Exceptions/OperationFailedException.h"
1011
#include "CommonFramework/VideoPipeline/VideoOverlay.h"
@@ -183,7 +184,7 @@ void checkpoint_33(
183184
128, 0, 20, 20, false);
184185

185186
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG, CallbackEnum::TUTORIAL});
186-
AdvanceDialogWatcher dialog(COLOR_RED);
187+
NoMinimapWatcher no_minimap(env.console.logger(), COLOR_RED, Milliseconds(250));
187188
int ret = run_until<ProControllerContext>(
188189
env.console, context,
189190
[&](ProControllerContext& context){
@@ -259,8 +260,10 @@ void checkpoint_33(
259260
pbf_press_button(context, BUTTON_R, 20, 20);
260261
pbf_wait(context, seconds_wait * TICKS_PER_SECOND);
261262

263+
pbf_wait(context, 20 * TICKS_PER_SECOND);
264+
262265
},
263-
{dialog}
266+
{no_minimap}
264267
);
265268
context.wait_for(std::chrono::milliseconds(100));
266269
if (ret < 0){

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "PokemonSV/Inference/Dialogs/PokemonSV_DialogDetector.h"
77
#include "CommonTools/Async/InferenceRoutines.h"
88
#include "CommonFramework/VideoPipeline/VideoFeed.h"
9+
#include "PokemonSV/Inference/Overworld/PokemonSV_NoMinimapDetector.h"
910

1011
#include "CommonFramework/Exceptions/OperationFailedException.h"
1112
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h"
@@ -175,7 +176,7 @@ void checkpoint_48(
175176
);
176177
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG, CallbackEnum::TUTORIAL});
177178

178-
AdvanceDialogWatcher dialog(COLOR_RED);
179+
NoMinimapWatcher no_minimap(env.console.logger(), COLOR_RED, Milliseconds(250));
179180
int ret = run_until<ProControllerContext>(
180181
env.console, context,
181182
[&](ProControllerContext& context){
@@ -271,9 +272,10 @@ void checkpoint_48(
271272
pbf_press_button(context, BUTTON_R, 20, 20);
272273
pbf_wait(context, seconds_wait * TICKS_PER_SECOND);
273274

275+
pbf_wait(context, 20 * TICKS_PER_SECOND);
274276

275277
},
276-
{dialog}
278+
{no_minimap}
277279
);
278280
context.wait_for(std::chrono::milliseconds(100));
279281
if (ret < 0){

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "PokemonSV/Inference/Dialogs/PokemonSV_DialogDetector.h"
88
#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h"
99
#include "CommonFramework/VideoPipeline/VideoFeed.h"
10+
#include "PokemonSV/Inference/Overworld/PokemonSV_NoMinimapDetector.h"
1011

1112
#include "CommonFramework/Exceptions/OperationFailedException.h"
1213
#include "CommonTools/Async/InferenceRoutines.h"
@@ -200,7 +201,7 @@ void checkpoint_59(
200201
);
201202
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG});
202203

203-
AdvanceDialogWatcher dialog(COLOR_RED);
204+
NoMinimapWatcher no_minimap(env.console.logger(), COLOR_RED, Milliseconds(250));
204205
int ret = run_until<ProControllerContext>(
205206
env.console, context,
206207
[&](ProControllerContext& context){
@@ -291,10 +292,10 @@ void checkpoint_59(
291292
pbf_wait(context, seconds_wait * TICKS_PER_SECOND);
292293

293294

294-
pbf_wait(context, 10 * TICKS_PER_SECOND);
295+
pbf_wait(context, 20 * TICKS_PER_SECOND);
295296

296297
},
297-
{dialog}
298+
{no_minimap}
298299
);
299300
context.wait_for(std::chrono::milliseconds(100));
300301
if (ret < 0){

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "PokemonSV/Inference/Dialogs/PokemonSV_DialogDetector.h"
77
#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h"
88
#include "CommonFramework/VideoPipeline/VideoFeed.h"
9+
#include "PokemonSV/Inference/Overworld/PokemonSV_NoMinimapDetector.h"
910

1011
#include "CommonFramework/Exceptions/OperationFailedException.h"
1112
#include "CommonTools/Async/InferenceRoutines.h"
@@ -178,7 +179,7 @@ void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& co
178179
);
179180
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG});
180181

181-
AdvanceDialogWatcher dialog(COLOR_RED);
182+
NoMinimapWatcher no_minimap(env.console.logger(), COLOR_RED, Milliseconds(250));
182183
int ret = run_until<ProControllerContext>(
183184
env.console, context,
184185
[&](ProControllerContext& context){
@@ -284,7 +285,7 @@ void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& co
284285
pbf_wait(context, 20 * TICKS_PER_SECOND);
285286

286287
},
287-
{dialog}
288+
{no_minimap}
288289
);
289290
context.wait_for(std::chrono::milliseconds(100));
290291
if (ret < 0){

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "PokemonSV/Inference/Dialogs/PokemonSV_DialogDetector.h"
88
#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h"
99
#include "CommonFramework/VideoPipeline/VideoFeed.h"
10+
#include "PokemonSV/Inference/Overworld/PokemonSV_NoMinimapDetector.h"
1011

1112
#include "CommonFramework/Exceptions/OperationFailedException.h"
1213
#include "CommonTools/Async/InferenceRoutines.h"
@@ -352,7 +353,7 @@ void beat_team_star_fighting2(SingleSwitchProgramEnvironment& env, ProController
352353
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG});
353354

354355

355-
AdvanceDialogWatcher dialog(COLOR_RED);
356+
NoMinimapWatcher no_minimap(env.console.logger(), COLOR_RED, Milliseconds(250));
356357
int ret = run_until<ProControllerContext>(
357358
env.console, context,
358359
[&](ProControllerContext& context){
@@ -511,7 +512,7 @@ void beat_team_star_fighting2(SingleSwitchProgramEnvironment& env, ProController
511512

512513

513514
},
514-
{dialog}
515+
{no_minimap}
515516
);
516517
context.wait_for(std::chrono::milliseconds(100));
517518
if (ret < 0){

0 commit comments

Comments
 (0)