|
10 | 10 | #include "Common/Cpp/PrettyPrint.h" |
11 | 11 | #include "CommonFramework/VideoPipeline/VideoOverlay.h" |
12 | 12 | #include "CommonTools/Async/InferenceRoutines.h" |
13 | | -// #include "CommonTools/VisualDetectors/BlackScreenDetector.h" |
| 13 | +#include "CommonTools/VisualDetectors/BlackScreenDetector.h" |
14 | 14 | #include "NintendoSwitch/Programs/NintendoSwitch_GameEntry.h" |
15 | 15 | #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" |
16 | | -// #include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h" |
| 16 | +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h" |
17 | 17 | #include "Pokemon/Pokemon_Strings.h" |
18 | 18 | #include "PokemonLA/Inference/Sounds/PokemonLA_ShinySoundDetector.h" |
19 | 19 | #include "PokemonLZA/Programs/PokemonLZA_BasicNavigation.h" |
@@ -87,7 +87,42 @@ namespace { |
87 | 87 |
|
88 | 88 |
|
89 | 89 | void route_alpha_pidgeot(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ |
90 | | -//TODO |
| 90 | + int ret = -1; |
| 91 | + { |
| 92 | + BlackScreenOverWatcher black_screen(COLOR_BLUE); |
| 93 | + ret = run_until<ProControllerContext>( |
| 94 | + env.console, context, |
| 95 | + [](ProControllerContext& context){ |
| 96 | + ssf_press_button(context, BUTTON_B, 0ms, 500ms, 0ms); |
| 97 | + pbf_move_left_joystick(context, 128, 0, 4000ms, 0ms); |
| 98 | + pbf_move_left_joystick(context, 128, 255, 4500ms, 0ms); |
| 99 | + pbf_wait(context, 500ms); |
| 100 | + }, |
| 101 | + {black_screen} |
| 102 | + ); |
| 103 | + } |
| 104 | + if (ret == 0){ |
| 105 | + wait_until_overworld(env.console, context, 50s); |
| 106 | + open_map(env.console, context, false); |
| 107 | + pbf_move_left_joystick(context, 148, 108, 100ms, 200ms); |
| 108 | + if (fly_from_map(env.console, context) == FastTravelState::NOT_AT_FLY_SPOT) { |
| 109 | + OperationFailedException::fire( |
| 110 | + ErrorReport::SEND_ERROR_REPORT, |
| 111 | + "fly_from_map(): Unable to fast travel", |
| 112 | + env.console); |
| 113 | + } |
| 114 | + wait_until_overworld(env.console, context); |
| 115 | + ssf_press_button(context, BUTTON_B, 0ms, 500ms, 0ms); |
| 116 | + pbf_move_left_joystick(context, 255, 128, 800ms, 0ms); |
| 117 | + pbf_move_left_joystick(context, 128, 0, 4400ms, 0ms); |
| 118 | + pbf_move_left_joystick(context, 0, 128, 300ms, 0ms); |
| 119 | + pbf_press_button(context, BUTTON_A, 500ms, 2500ms); // elevator up |
| 120 | + ssf_press_button(context, BUTTON_B, 0ms, 500ms, 0ms); |
| 121 | + pbf_move_left_joystick(context, 128, 0, 900ms, 0ms); |
| 122 | + pbf_move_left_joystick(context, 0, 128, 2000ms, 0ms); |
| 123 | + pbf_move_left_joystick(context, 255, 128, 200ms, 200ms); |
| 124 | + pbf_press_button(context, BUTTON_L, 100ms, 200ms); |
| 125 | + } |
91 | 126 | } |
92 | 127 |
|
93 | 128 | void route_wild_zone_3_tower(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ |
|
0 commit comments