Skip to content

Commit 815b607

Browse files
committed
fix functions using clear_dialog(... STOP_TIMEOUT).
1 parent 29b93d9 commit 815b607

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ void clear_dialog(VideoStream& stream, ProControllerContext& context,
218218
break;
219219
case CallbackEnum::TUTORIAL:
220220
stream.log("clear_dialog: Detected tutorial.");
221+
if (mode == ClearDialogMode::STOP_TUTORIAL){
222+
return;
223+
}
221224
pbf_press_button(context, BUTTON_A, 20, 105);
222225
break;
223226
case CallbackEnum::BLACK_DIALOG_BOX:

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ enum class ClearDialogMode{
4444
STOP_WHITEBUTTON,
4545
STOP_TIMEOUT,
4646
STOP_BATTLE,
47+
STOP_TUTORIAL,
4748
};
4849

4950

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,11 @@ void checkpoint_18(
211211
pbf_mash_button(context, BUTTON_A, 6 * TICKS_PER_SECOND);
212212

213213
env.console.log("Talk to Clavell in his office, and the professor.");
214-
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 25,
215-
{CallbackEnum::PROMPT_DIALOG}); // max time between dialog: 17s. set timeout to 25 seconds for buffer.
216-
// mash A to get through the Random A press that you need. when the professor shows you area zero.
217-
pbf_mash_button(context, BUTTON_A, 3 * TICKS_PER_SECOND);
214+
// clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 25,
215+
// {CallbackEnum::PROMPT_DIALOG}); // max time between dialog: 17s. set timeout to 25 seconds for buffer.
216+
// // mash A to get through the Random A press that you need. when the professor shows you area zero.
217+
// pbf_mash_button(context, BUTTON_A, 3 * TICKS_PER_SECOND);
218+
218219
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60,
219220
{CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG});
220221

@@ -279,11 +280,14 @@ void checkpoint_20(
279280
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 128, 0);
280281

281282
env.console.log("Talk to Nemona, Arven, Cassiopeia.");
282-
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 16,
283-
{CallbackEnum::PROMPT_DIALOG, CallbackEnum::BLACK_DIALOG_BOX}); // max time between dialog: 11
283+
// clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 16,
284+
// {CallbackEnum::PROMPT_DIALOG, CallbackEnum::BLACK_DIALOG_BOX}); // max time between dialog: 11
284285

285-
// mash A to get through the Random A press that you need. when the Nemona shows you a Poke Gym.
286-
pbf_mash_button(context, BUTTON_A, 250);
286+
// // mash A to get through the Random A press that you need. when the Nemona shows you a Poke Gym.
287+
// pbf_mash_button(context, BUTTON_A, 250);
288+
289+
clear_dialog(env.console, context, ClearDialogMode::STOP_TUTORIAL, 20,
290+
{CallbackEnum::TUTORIAL, CallbackEnum::PROMPT_DIALOG, CallbackEnum::BLACK_DIALOG_BOX});
287291

288292
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 10,
289293
{CallbackEnum::TUTORIAL}); // max time between dialog: 3

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ void checkpoint_62(
208208

209209
env.console.log("Battle Normal Gym leader.");
210210
run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);
211-
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 60);
212-
pbf_mash_button(context, BUTTON_A, 1000ms);
211+
// clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 60);
212+
// pbf_mash_button(context, BUTTON_A, 1000ms);
213213

214214
env.console.log("Finish up with Larry, then speak to Geeta and Nemona.");
215215
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::WHITE_A_BUTTON, CallbackEnum::PROMPT_DIALOG, CallbackEnum::BATTLE, CallbackEnum:: DIALOG_ARROW});

0 commit comments

Comments
 (0)