Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void walk_to_safarizonewest(ProControllerContext& context){
// total duration: 52930ms
}

void activate_roamer(ProControllerContext& context, const uint64_t& ingame_delay){
void activate_roamer(ProControllerContext& context, const Language& language, const uint64_t& ingame_delay){
// a lot of dialogue while Celio inserts the Sapphire
pbf_press_button(context, BUTTON_A, 200ms, 5300ms);
pbf_press_button(context, BUTTON_A, 200ms, 1300ms);
Expand All @@ -419,6 +419,9 @@ void activate_roamer(ProControllerContext& context, const uint64_t& ingame_delay
pbf_press_button(context, BUTTON_A, 200ms, 5300ms);
pbf_press_button(context, BUTTON_A, 200ms, 1300ms);
pbf_press_button(context, BUTTON_A, 200ms, 1300ms);
if (language == Language::Spanish){ // "de HOENN!" gets pushed to a new line
pbf_press_button(context, BUTTON_A, 200ms, 1300ms);
}
pbf_press_button(context, BUTTON_A, 200ms, 1300ms);
pbf_press_button(context, BUTTON_A, 200ms, 1300ms);
pbf_press_button(context, BUTTON_A, 200ms, std::chrono::milliseconds(ingame_delay - 26700)); //5500ms + 4*1500ms + 3500ms + 5500ms + 4*1500ms + 200
Expand Down Expand Up @@ -721,6 +724,7 @@ void check_timings(

void perform_blind_sequence(
ProControllerContext& context,
const Language& language,
PokemonFRLG_RngTarget target,
const SeedButton& seed_button,
const BlackoutButton& extra_button,
Expand Down Expand Up @@ -854,7 +858,7 @@ void perform_blind_sequence(
case PokemonFRLG_RngTarget::entei:
case PokemonFRLG_RngTarget::suicune:
case PokemonFRLG_RngTarget::roaming:
activate_roamer(context, timings.ingame_delay);
activate_roamer(context, language, timings.ingame_delay);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ namespace PokemonFRLG{

// performs the blind sequence between launching the game and arriving at the RNG manipulation target
void perform_blind_sequence(
ProControllerContext& context,
ProControllerContext& context,
const Language& language,
PokemonFRLG_RngTarget target,
const SeedButton& seed_button,
const BlackoutButton& extra_button,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ bool EggRng::reset_and_check_seed(
// Step 1: reset and perform blind sequence
env.log("Resetting Game...");
reset_and_perform_blind_sequence(
env.console, context, target,
env.console, context, LANGUAGE, target,
SEED_BUTTON, EXTRA_BUTTON,
timings, launch_delay, false, PROFILE
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void GiftRng::program(SingleSwitchProgramEnvironment& env, ProControllerContext&

env.log("Resetting Game...");
reset_and_perform_blind_sequence(
env.console, context, TARGET,
env.console, context, LANGUAGE, TARGET,
SEED_BUTTON, EXTRA_BUTTON, timings,
launch_delay, false, PROFILE
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ void rng_reset_and_return_home(
void reset_and_perform_blind_sequence(
ConsoleHandle& console,
ProControllerContext& context,
const Language& language,
PokemonFRLG_RngTarget target,
const SeedButton& seed_button,
const BlackoutButton& extra_button,
Expand Down Expand Up @@ -218,8 +219,8 @@ void reset_and_perform_blind_sequence(
context.wait_for_all_requests();
int ret = run_until<ProControllerContext>(
console, context,
[target, seed_button, extra_button, timings, safari_zone, console_type](ProControllerContext& context) {
perform_blind_sequence(context, target, seed_button, extra_button, timings, safari_zone, console_type);
[language, target, seed_button, extra_button, timings, safari_zone, console_type](ProControllerContext& context) {
perform_blind_sequence(context, language, target, seed_button, extra_button, timings, safari_zone, console_type);
},
{ update_detector, user_selection_detector },
5000ms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ static const Milliseconds INITIAL_LAUNCH_DELAY = 950ms;
void reset_and_perform_blind_sequence(
ConsoleHandle& console,
ProControllerContext& context,
const Language& language,
PokemonFRLG_RngTarget target,
const SeedButton& seed_button,
const BlackoutButton& extra_button,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ void RngHelper::program(SingleSwitchProgramEnvironment& env, ProControllerContex

// handle the blind part
reset_and_perform_blind_sequence(
env.console, context, TARGET,
env.console, context,
LANGUAGE, TARGET,
SEED_BUTTON, EXTRA_BUTTON,
timings, launch_delay,
SAFARI_ZONE, PROFILE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void RoamingLegendaryRng::program(SingleSwitchProgramEnvironment& env, ProContro

env.log("Resetting Game...");
reset_and_perform_blind_sequence(
env.console, context, TARGET,
env.console, context, LANGUAGE, TARGET,
SEED_BUTTON, EXTRA_BUTTON, timings,
launch_delay, false, PROFILE
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@ void StarterRng::program(SingleSwitchProgramEnvironment& env, ProControllerConte

env.log("Resetting Game...");
reset_and_perform_blind_sequence(
env.console, context, PokemonFRLG_RngTarget::starters,
env.console, context,
LANGUAGE, PokemonFRLG_RngTarget::starters,
SEED_BUTTON, EXTRA_BUTTON, timings,
launch_delay, false, PROFILE
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ void StaticRng::program(SingleSwitchProgramEnvironment& env, ProControllerContex

env.log("Resetting Game...");
reset_and_perform_blind_sequence(
env.console, context, TARGET,
env.console, context, LANGUAGE, TARGET,
SEED_BUTTON, EXTRA_BUTTON, timings,
launch_delay, false, PROFILE
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ void WildRng::program(SingleSwitchProgramEnvironment& env, ProControllerContext&

env.log("Resetting Game...");
reset_and_perform_blind_sequence(
env.console, context, TARGET,
env.console, context, LANGUAGE, TARGET,
SEED_BUTTON, EXTRA_BUTTON, timings,
launch_delay, safari_zone, PROFILE
);
Expand Down
Loading