Skip to content

Commit 253b571

Browse files
author
Gin
committed
minor
1 parent f5941c5 commit 253b571

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ void checkpoint_17(
147147
// open school navigation screen
148148
press_button_until_gradient_arrow(env.program_info(), env.console, context, {0.031, 0.193, 0.047, 0.078});
149149
// go to staff room
150-
basic_menu_navigation(env.program_info(), env.console, context, {0.031, 0.193, 0.047, 0.078}, {0.031, 0.193 + 0.074219, 0.047, 0.078}, DPAD_DOWN, 1);
150+
navigate_school_layout_menu(env.program_info(), env.console, context, {0.031, 0.193, 0.047, 0.078},
151+
{0.031, 0.193 + 0.074219, 0.047, 0.078}, DPAD_DOWN, 1);
151152
// enter staff room
152153
pbf_mash_button(context, BUTTON_A, 3 * TICKS_PER_SECOND);
153154
pbf_wait(context, 3 * TICKS_PER_SECOND);

SerialPrograms/Source/PokemonSV/Programs/PokemonSV_MenuNavigation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ void press_button_until_gradient_arrow(
597597
}
598598
}
599599

600-
void basic_menu_navigation(
600+
void navigate_school_layout_menu(
601601
const ProgramInfo& info,
602602
VideoStream& stream,
603603
ProControllerContext& context,
@@ -612,7 +612,7 @@ void basic_menu_navigation(
612612
if (ret < 0){
613613
OperationFailedException::fire(
614614
ErrorReport::SEND_ERROR_REPORT,
615-
"basic_menu_navigation: Failed to detect gradient arrow at expected start position.",
615+
"navigate_school_layout_menu: Failed to detect gradient arrow at expected start position.",
616616
stream
617617
);
618618
}
@@ -634,11 +634,11 @@ void basic_menu_navigation(
634634
);
635635

636636
if (ret == 0){
637-
stream.log("basic_menu_navigation: Desired item selected.");
637+
stream.log("navigate_school_layout_menu: Desired item selected.");
638638
}else{
639639
OperationFailedException::fire(
640640
ErrorReport::SEND_ERROR_REPORT,
641-
"basic_menu_navigation: Failed to detect gradient arrow at expected end position.",
641+
"navigate_school_layout_menu: Failed to detect gradient arrow at expected end position.",
642642
stream
643643
);
644644
}

SerialPrograms/Source/PokemonSV/Programs/PokemonSV_MenuNavigation.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ void day_skip_from_overworld(VideoStream& stream, ProControllerContext& context)
2929
void press_Bs_to_back_to_overworld(const ProgramInfo& info, VideoStream& stream, ProControllerContext& context,
3030
uint16_t seconds_between_b_presses = 3);
3131

32+
// mashes A button by default
33+
void mash_button_till_overworld(
34+
VideoStream& stream,
35+
ProControllerContext& context,
36+
Button button = BUTTON_A,
37+
uint16_t seconds_run = 360
38+
);
39+
3240
// From overworld, open map. Will change map view from rotated to fixed if not already fixed.
3341
void open_map_from_overworld(
3442
const ProgramInfo& info,
@@ -52,14 +60,6 @@ void open_recently_battled_from_pokedex(const ProgramInfo& info, VideoStream& st
5260
// From any of the rotom phone apps (Map/Pokédex/Profile) go to overworld.
5361
void leave_phone_to_overworld(const ProgramInfo& info, VideoStream& stream, ProControllerContext& context);
5462

55-
// mashes A button by default
56-
void mash_button_till_overworld(
57-
VideoStream& stream,
58-
ProControllerContext& context,
59-
Button button = BUTTON_A,
60-
uint16_t seconds_run = 360
61-
);
62-
6363
// enter menu and move the cursor to the given side and index, then press the A button (without wait for A button to press)
6464
// if menu_index is -1, return once the menu is detected.
6565
void enter_menu_from_overworld(const ProgramInfo& info, VideoStream& stream, ProControllerContext& context,
@@ -85,13 +85,13 @@ void press_button_until_gradient_arrow(
8585
GradientArrowType arrow_type = GradientArrowType::RIGHT
8686
);
8787

88-
// navigate menus using only gradient arrow detection, without OCR
88+
// navigate school layout menu using only gradient arrow detection, without OCR
8989
// first, wait for the gradient arrow to appear within `arrow_box_start`.
9090
// then, press `dpad_button` a certain number of times, as per `num_button_presses`.
9191
// then, watch for the gradient arrow within `arrow_box_end`.
9292
// If arrow not seen, press `dpad_button` a maximum of 3 times, while still watching for the gradient arrow
9393
// If arrow still not seen, throw exception.
94-
void basic_menu_navigation(
94+
void navigate_school_layout_menu(
9595
const ProgramInfo& info,
9696
VideoStream& stream,
9797
ProControllerContext& context,

0 commit comments

Comments
 (0)