Skip to content

Commit 788651e

Browse files
committed
convert ticks to seconds
1 parent b48006d commit 788651e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ void overworld_navigation(
362362
if (movement_mode == NavigationMovementMode::CLEAR_WITH_LETS_GO){
363363
walk_forward_while_clear_front_path(info, stream, context, forward_ticks, y);
364364
}else{
365-
ssf_press_left_joystick(context, x, y, 0, seconds_realign * TICKS_PER_SECOND);
365+
ssf_press_left_joystick(context, x, y, 0ms, Seconds(seconds_realign));
366366
if (movement_mode == NavigationMovementMode::DIRECTIONAL_ONLY){
367-
pbf_wait(context, seconds_realign * TICKS_PER_SECOND);
367+
pbf_wait(context, Seconds(seconds_realign));
368368
} else if (movement_mode == NavigationMovementMode::DIRECTIONAL_SPAM_A){
369369
for (size_t j = 0; j < 5 * seconds_realign; j++){
370370
pbf_press_button(context, BUTTON_A, 20, 5);
@@ -1063,9 +1063,9 @@ void press_A_until_dialog(
10631063
int ret = run_until<ProControllerContext>(
10641064
stream, context,
10651065
[seconds_between_button_presses](ProControllerContext& context){
1066-
pbf_wait(context, seconds_between_button_presses * TICKS_PER_SECOND); // avoiding pressing A if dialog already present
1066+
pbf_wait(context, Seconds(seconds_between_button_presses)); // avoiding pressing A if dialog already present
10671067
for (size_t c = 0; c < 10; c++){
1068-
pbf_press_button(context, BUTTON_A, 20, seconds_between_button_presses * TICKS_PER_SECOND);
1068+
pbf_press_button(context, BUTTON_A, 20*8ms, Seconds(seconds_between_button_presses));
10691069
}
10701070
},
10711071
{advance_dialog}

SerialPrograms/Source/PokemonSV/Programs/PokemonSV_MenuNavigation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ void press_Bs_to_back_to_overworld(const ProgramInfo& info, VideoStream& stream,
143143
int ret = run_until<ProControllerContext>(
144144
stream, context,
145145
[seconds_between_b_presses](ProControllerContext& context){
146-
pbf_wait(context, seconds_between_b_presses * TICKS_PER_SECOND); // avoiding pressing B if already in overworld
146+
pbf_wait(context, Seconds(seconds_between_b_presses)); // avoiding pressing B if already in overworld
147147
for (size_t c = 0; c < 10; c++){
148-
pbf_press_button(context, BUTTON_B, 20, seconds_between_b_presses * TICKS_PER_SECOND);
148+
pbf_press_button(context, BUTTON_B, 20*8ms, Seconds(seconds_between_b_presses));
149149
}
150150
},
151151
{overworld, battle}

0 commit comments

Comments
 (0)