Skip to content

Commit 863f85a

Browse files
committed
migration
1 parent 532812e commit 863f85a

File tree

74 files changed

+339
-339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+339
-339
lines changed

SerialPrograms/Source/PokemonBDSP/Programs/Eggs/PokemonBDSP_EggRoutines.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void egg_spin(ProControllerContext& context, Milliseconds duration){
2222
pbf_move_left_joystick(context, 255, 0, 40ms, 0ms);
2323
pbf_move_left_joystick(context, 255, 128, 40ms, 0ms);
2424
pbf_move_left_joystick(context, 255, 255, 40ms, 0ms);
25-
pbf_move_left_joystick(context, 128, 255, 40ms, 0ms);
25+
pbf_move_left_joystick(context, {0, -1}, 40ms, 0ms);
2626
pbf_move_left_joystick(context, {-1, -1}, 48ms, 0ms);
2727
pbf_move_left_joystick(context, {-1, 0}, 48ms, 0ms);
2828
}
@@ -35,7 +35,7 @@ void egg_spin_with_A(ProControllerContext& context, Milliseconds duration){
3535
pbf_move_left_joystick(context, 255, 0, 40ms, 0ms);
3636
pbf_move_left_joystick(context, 255, 128, 40ms, 0ms);
3737
pbf_move_left_joystick(context, 255, 255, 40ms, 0ms);
38-
pbf_move_left_joystick(context, 128, 255, 40ms, 0ms);
38+
pbf_move_left_joystick(context, {0, -1}, 40ms, 0ms);
3939
pbf_move_left_joystick(context, {-1, -1}, 48ms, 0ms);
4040
pbf_move_left_joystick(context, {-1, 0}, 48ms, 0ms);
4141
}

SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute210.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -255,23 +255,23 @@ void MoneyFarmerRoute210::heal_at_center_and_return(
255255
pbf_mash_button(context, BUTTON_B, 10000ms);
256256

257257
logger.log("Returning to trainers...");
258-
pbf_move_left_joystick(context, 128, 255, 6000ms, 0ms);
258+
pbf_move_left_joystick(context, {0, -1}, 6000ms, 0ms);
259259
pbf_move_left_joystick(context, 255, 128, 60, 0);
260260
pbf_move_left_joystick(context, 128, 0, 200, 0);
261261
pbf_move_left_joystick(context, 255, 128, 750, 0);
262262

263263
pbf_press_button(context, BUTTON_R, 10, 150);
264264
pbf_mash_button(context, BUTTON_ZL, 6000ms);
265265

266-
pbf_move_left_joystick(context, 128, 255, 30, 0);
267-
pbf_move_left_joystick(context, 0, 128, 30, 0);
268-
pbf_move_left_joystick(context, 128, 255, 80, 0);
269-
pbf_move_left_joystick(context, 255, 128, 110, 0);
270-
pbf_move_left_joystick(context, 128, 255, 1000ms, 0ms);
271-
pbf_move_left_joystick(context, 255, 128, 105, 0);
272-
pbf_move_left_joystick(context, 128, 0, 375, 0);
273-
pbf_move_left_joystick(context, 255, 128, 300, 0);
274-
pbf_move_left_joystick(context, 128, 255, 375, 0);
266+
pbf_move_left_joystick(context, {0, -1}, 240ms, 0ms);
267+
pbf_move_left_joystick(context, 0, 128, 240ms, 0ms);
268+
pbf_move_left_joystick(context, {0, -1}, 640ms, 0ms);
269+
pbf_move_left_joystick(context, 255, 128, 880ms, 0ms);
270+
pbf_move_left_joystick(context, {0, -1}, 1000ms, 0ms);
271+
pbf_move_left_joystick(context, 255, 128, 840ms, 0ms);
272+
pbf_move_left_joystick(context, 128, 0, 3000ms, 0ms);
273+
pbf_move_left_joystick(context, 255, 128, 2400ms, 0ms);
274+
pbf_move_left_joystick(context, {0, -1}, 3000ms, 0ms);
275275

276276
pbf_press_dpad(context, DPAD_RIGHT, 375, 0);
277277
pbf_press_dpad(context, DPAD_LEFT, 375, 0);

SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute212.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -221,24 +221,24 @@ void MoneyFarmerRoute212::heal_at_center_and_return(VideoStream& stream, ProCont
221221
stream.overlay().add_log("Heal complete", COLOR_WHITE);
222222
stream.overlay().add_log("To rich couple", COLOR_WHITE);
223223
stream.log("Returning to rich couple location...");
224-
pbf_move_left_joystick(context, 128, 255, 8000ms, 0ms);
225-
pbf_move_left_joystick(context, 255, 128, 380, 0);
226-
pbf_move_left_joystick(context, 128, 255, 300, 0);
227-
pbf_move_left_joystick(context, 0, 128, 600, 0);
228-
pbf_move_left_joystick(context, 255, 128, 75, 0);
229-
pbf_move_left_joystick(context, 128, 255, 1375, 0);
224+
pbf_move_left_joystick(context, {0, -1}, 8000ms, 0ms);
225+
pbf_move_left_joystick(context, 255, 128, 3040ms, 0ms);
226+
pbf_move_left_joystick(context, {0, -1}, 2400ms, 0ms);
227+
pbf_move_left_joystick(context, 0, 128, 4800ms, 0ms);
228+
pbf_move_left_joystick(context, 255, 128, 600ms, 0ms);
229+
pbf_move_left_joystick(context, {0, -1}, 11000ms, 0ms);
230230
pbf_move_left_joystick(context, 255, 128, 1000ms, 0ms);
231-
pbf_move_left_joystick(context, 128, 255, 200, 0);
232-
pbf_move_left_joystick(context, 0, 128, 200, 0);
233-
pbf_move_left_joystick(context, 128, 255, 50, 0);
231+
pbf_move_left_joystick(context, {0, -1}, 1600ms, 0ms);
232+
pbf_move_left_joystick(context, 0, 128, 1600ms, 0ms);
233+
pbf_move_left_joystick(context, {0, -1}, 400ms, 0ms);
234234
pbf_move_left_joystick(context, 0, 128, 1000ms, 0ms);
235-
pbf_move_left_joystick(context, 128, 255, 1000ms, 0ms);
236-
pbf_move_left_joystick(context, 255, 128, 250, 0);
237-
pbf_move_left_joystick(context, 128, 255, 200, 0);
238-
pbf_move_left_joystick(context, 0, 128, 90, 0);
239-
pbf_move_left_joystick(context, 128, 255, 200, 0);
235+
pbf_move_left_joystick(context, {0, -1}, 1000ms, 0ms);
236+
pbf_move_left_joystick(context, 255, 128, 2000ms, 0ms);
237+
pbf_move_left_joystick(context, {0, -1}, 1600ms, 0ms);
238+
pbf_move_left_joystick(context, 0, 128, 720ms, 0ms);
239+
pbf_move_left_joystick(context, {0, -1}, 1600ms, 0ms);
240240
pbf_move_left_joystick(context, 255, 128, 1000ms, 0ms);
241-
pbf_move_left_joystick(context, 128, 255, 200, 0);
241+
pbf_move_left_joystick(context, {0, -1}, 1600ms, 0ms);
242242

243243
pp[0] = MOVE1_PP;
244244
pp[1] = MOVE2_PP;
@@ -393,7 +393,7 @@ void MoneyFarmerRoute212::program(SingleSwitchProgramEnvironment& env, ProContro
393393

394394
if (woman){
395395
// pbf_move_left_joystick(context, {-1, 0}, 416ms, 0ms);
396-
pbf_move_left_joystick(context, 128, 255, 80ms, 0ms);
396+
pbf_move_left_joystick(context, {0, -1}, 80ms, 0ms);
397397

398398
// Battle woman.
399399
if(battle(env, context, pp, false)){
@@ -417,10 +417,10 @@ void MoneyFarmerRoute212::program(SingleSwitchProgramEnvironment& env, ProContro
417417

418418
// if (woman){
419419
pbf_move_left_joystick(context, {-1, 0}, 416ms, 0ms);
420-
pbf_move_left_joystick(context, 128, 255, 80ms, 0ms);
420+
pbf_move_left_joystick(context, {0, -1}, 80ms, 0ms);
421421
// }else{
422422
// pbf_move_left_joystick(context, {-1, 0}, 840ms, 0ms);
423-
// pbf_move_left_joystick(context, 128, 255, 80ms, 0ms);
423+
// pbf_move_left_joystick(context, {0, -1}, 80ms, 0ms);
424424
// }
425425

426426
// Battle man.

SerialPrograms/Source/PokemonBDSP/Programs/Glitches/PokemonBDSP_ActivateMenuGlitch-1.1.2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void ActivateMenuGlitch112::program(SingleSwitchProgramEnvironment& env, ProCont
154154
}
155155
stream.log("Leaving " + STRING_POKEMON + " center detected!", COLOR_BLUE);
156156
}
157-
pbf_move_left_joystick(context, 128, 255, 1000ms, 4000ms);
157+
pbf_move_left_joystick(context, {0, -1}, 1000ms, 4000ms);
158158

159159
// Center cursor.
160160
pbf_press_button(context, BUTTON_X, 160ms, GameSettings::instance().OVERWORLD_TO_MENU_DELAY0);
@@ -170,7 +170,7 @@ void ActivateMenuGlitch112::program(SingleSwitchProgramEnvironment& env, ProCont
170170
// Enter Pokemon center.
171171
pbf_press_dpad(context, DPAD_UP, 400ms, 5000ms);
172172
pbf_move_left_joystick(context, 255, 128, 1000ms, 0ms);
173-
pbf_move_left_joystick(context, 128, 255, 125, 125);
173+
pbf_move_left_joystick(context, {0, -1}, 1000ms, 1000ms);
174174

175175
// Move cursor back to default location for "Pokemon".
176176
pbf_move_right_joystick(context, {0, +1}, 160ms, 160ms);

SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_BoxRelease.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void detach_box(ProControllerContext& context, Milliseconds box_scroll_delay){
4141

4242

4343
void release(ProControllerContext& context){
44-
pbf_press_button(context, BUTTON_ZL, 20, 50);
44+
pbf_press_button(context, BUTTON_ZL, 160ms, 400ms);
4545
pbf_move_right_joystick(context, {0, +1}, 160ms, 80ms);
4646
pbf_move_right_joystick(context, {0, +1}, 160ms, 80ms);
4747
pbf_press_button(context, BUTTON_ZL, 160ms, 840ms);

SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_OverworldTrigger.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ void OverworldTrigger::run_trigger(ProControllerContext& context) const{
8787
case TriggerMethod::VERTICAL_NO_BIAS:
8888
ssf_press_left_joystick(context, 128, 0, 0ms, normal_duration);
8989
ssf_mash1_button(context, BUTTON_B, mash_duration);
90-
ssf_press_left_joystick(context, 128, 255, 0ms, normal_duration);
90+
ssf_press_left_joystick(context, {0, -1}, 0ms, normal_duration);
9191
ssf_mash1_button(context, BUTTON_B, mash_duration);
9292
break;
9393
case TriggerMethod::VERTICAL_BIAS_UP:
9494
ssf_press_left_joystick(context, 128, 0, 0ms, biased_duration);
9595
ssf_mash1_button(context, BUTTON_B, mash_duration);
96-
ssf_press_left_joystick(context, 128, 255, 0ms, normal_duration);
96+
ssf_press_left_joystick(context, {0, -1}, 0ms, normal_duration);
9797
ssf_mash1_button(context, BUTTON_B, mash_duration);
9898
break;
9999
case TriggerMethod::VERTICAL_BIAS_DOWN:
100-
ssf_press_left_joystick(context, 128, 255, 0ms, biased_duration);
100+
ssf_press_left_joystick(context, {0, -1}, 0ms, biased_duration);
101101
ssf_mash1_button(context, BUTTON_B, mash_duration);
102102
ssf_press_left_joystick(context, 128, 0, 0ms, normal_duration);
103103
ssf_mash1_button(context, BUTTON_B, mash_duration);

SerialPrograms/Source/PokemonBDSP/Programs/ShinyHunting/PokemonBDSP_ShinyHunt-Shaymin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ void ShinyHuntShaymin::program(SingleSwitchProgramEnvironment& env, ProControlle
176176

177177
// Hop on bike, ride down to seabreak path
178178
// SHORTCUT.run(env.console, 0);
179-
pbf_move_left_joystick(context, 128, 255, 360, 0);
180-
pbf_move_left_joystick(context, 128, 0, 400, 0);
179+
pbf_move_left_joystick(context, {0, -1}, 2880ms, 0ms);
180+
pbf_move_left_joystick(context, 128, 0, 3200ms, 0ms);
181181
}
182182

183183
send_program_finished_notification(env, NOTIFICATION_PROGRAM_FINISH);

SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_TenacityCandyFarmer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ bool TenacityCandyFarmer::run_iteration(SingleSwitchProgramEnvironment& env, Pro
103103
// Press A to start talking
104104
pbf_press_button(context, BUTTON_A, 20, 100);
105105
// Press A to show battle type selection menu box
106-
pbf_press_button(context, BUTTON_A, 20, 50);
106+
pbf_press_button(context, BUTTON_A, 160ms, 400ms);
107107
// Move down the menu box to select Path of Tenacity
108108
pbf_press_dpad(context, DPAD_DOWN, 10, 50);
109109
// Press A to select Path of Tenacity

SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_ApplyGrits.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ void ApplyGrits::ApplyGritsOnOnePokemon(SingleSwitchProgramEnvironment& env, Pro
6969

7070
if (grit_index > 0){
7171
// Move to the next Grit item
72-
pbf_press_dpad(context, DPAD_RIGHT, 20, 50);
72+
pbf_press_dpad(context, DPAD_RIGHT, 160ms, 400ms);
7373
}
7474

7575
// Press A to open the item menu of Grit Dust
76-
pbf_press_button(context, BUTTON_A, 20, 50);
76+
pbf_press_button(context, BUTTON_A, 160ms, 400ms);
7777
// Press A again to use the item
78-
pbf_press_button(context, BUTTON_A, 20, 50);
78+
pbf_press_button(context, BUTTON_A, 160ms, 400ms);
7979

8080
// Move down the pokemon list
8181
for(size_t i = 0; i < pokemon_index; i++){
@@ -89,7 +89,7 @@ void ApplyGrits::ApplyGritsOnOnePokemon(SingleSwitchProgramEnvironment& env, Pro
8989
for(size_t attr_index = 0; attr_index < 6; attr_index++){
9090
if (attr_index > 0){
9191
// Move to the next attribute
92-
pbf_press_dpad(context, DPAD_DOWN, 20, 50);
92+
pbf_press_dpad(context, DPAD_DOWN, 160ms, 400ms);
9393
}
9494
for(size_t i = 0; i < grit_level_increase[grit_index]; i++){
9595
// One press to apply the Grit item
@@ -100,14 +100,14 @@ void ApplyGrits::ApplyGritsOnOnePokemon(SingleSwitchProgramEnvironment& env, Pro
100100
}
101101

102102
// Press B twice to back to item selection
103-
pbf_press_button(context, BUTTON_B, 20, 50);
104-
pbf_press_button(context, BUTTON_B, 20, 50);
103+
pbf_press_button(context, BUTTON_B, 160ms, 400ms);
104+
pbf_press_button(context, BUTTON_B, 160ms, 400ms);
105105
}
106106

107107
// Move back to hovering over Grit Dust
108-
pbf_press_dpad(context, DPAD_LEFT, 20, 50);
109-
pbf_press_dpad(context, DPAD_LEFT, 20, 50);
110-
pbf_press_dpad(context, DPAD_LEFT, 20, 50);
108+
pbf_press_dpad(context, DPAD_LEFT, 160ms, 400ms);
109+
pbf_press_dpad(context, DPAD_LEFT, 160ms, 400ms);
110+
pbf_press_dpad(context, DPAD_LEFT, 160ms, 400ms);
111111

112112
context.wait_for_all_requests();
113113
}

SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_MMORoutines.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ std::set<std::string> enter_region_and_read_MMO(
131131
);
132132
}
133133
if (zoom_level == 0){
134-
pbf_press_button(context, BUTTON_ZR, 50, 50);
134+
pbf_press_button(context, BUTTON_ZR, 400ms, 400ms);
135135
context.wait_for_all_requests();
136136
question_mark_image = env.console.video().snapshot();
137137
}else if (zoom_level == 2){
138-
pbf_press_button(context, BUTTON_ZL, 50, 50);
138+
pbf_press_button(context, BUTTON_ZL, 400ms, 400ms);
139139
context.wait_for_all_requests();
140140
question_mark_image = env.console.video().snapshot();
141141
}
@@ -175,7 +175,7 @@ std::set<std::string> enter_region_and_read_MMO(
175175
}
176176

177177
// Leave map view, back to overworld
178-
pbf_press_button(context, BUTTON_B, 20, 50);
178+
pbf_press_button(context, BUTTON_B, 160ms, 400ms);
179179

180180
// Now go to Mai to see the reviewed map
181181
goto_Mai_from_camp(env.logger(), context, camp);
@@ -195,7 +195,7 @@ std::set<std::string> enter_region_and_read_MMO(
195195
);
196196
}
197197
}
198-
pbf_press_button(context, BUTTON_B, 50, 50);
198+
pbf_press_button(context, BUTTON_B, 400ms, 400ms);
199199

200200
while (true){
201201
EventDialogDetector event_dialog_detector(env.logger(), env.console.overlay(), true);

0 commit comments

Comments
 (0)