Skip to content

Commit 4af2ef1

Browse files
committed
Everyone uses the same start game mash duration since it's not game-specific.
1 parent 22e8481 commit 4af2ef1

20 files changed

+30
-55
lines changed

SerialPrograms/Source/NintendoSwitch/NintendoSwitch_Settings.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ ConsoleSettings::ConsoleSettings()
7575
LockMode::LOCK_WHILE_RUNNING,
7676
false
7777
)
78+
, START_GAME_MASH(
79+
"<b>1. Start Game Mash:</b><br>Mash A for this long to start the game.",
80+
LockMode::LOCK_WHILE_RUNNING,
81+
"2000 ms"
82+
)
7883
, SETTINGS_TO_HOME_DELAY0(
7984
"<b>Settings to Home Delay:</b><br>Delay from pressing home anywhere in the settings to return to the home menu.",
8085
LockMode::LOCK_WHILE_RUNNING,
@@ -137,6 +142,7 @@ ConsoleSettings::ConsoleSettings()
137142
{
138143
PA_ADD_OPTION(CONTROLLER_SETTINGS);
139144
PA_ADD_OPTION(TRUST_USER_CONSOLE_SELECTION);
145+
PA_ADD_OPTION(START_GAME_MASH);
140146
PA_ADD_OPTION(SETTINGS_TO_HOME_DELAY0);
141147
PA_ADD_OPTION(START_GAME_REQUIRES_INTERNET);
142148
PA_ADD_OPTION(START_GAME_INTERNET_CHECK_DELAY0);

SerialPrograms/Source/NintendoSwitch/NintendoSwitch_Settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ConsoleSettings : public BatchOption{
4343
ControllerSettingsTable CONTROLLER_SETTINGS;
4444

4545
BooleanCheckBoxOption TRUST_USER_CONSOLE_SELECTION;
46+
MillisecondsOption START_GAME_MASH;
4647
MillisecondsOption SETTINGS_TO_HOME_DELAY0;
4748
BooleanCheckBoxOption START_GAME_REQUIRES_INTERNET;
4849
MillisecondsOption START_GAME_INTERNET_CHECK_DELAY0;

SerialPrograms/Source/PokemonBDSP/PokemonBDSP_Settings.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ GameSettings::GameSettings()
3838
"1000 ms"
3939
)
4040
, m_start_game_timings("<font size=4><b>Start Game Timings:</b></font>")
41-
, START_GAME_MASH0(
42-
"<b>1. Start Game Mash:</b><br>Mash A for this long to start the game.",
43-
LockMode::LOCK_WHILE_RUNNING,
44-
"2000 ms"
45-
)
4641
, START_GAME_WAIT0(
4742
"<b>2. Start Game Wait:</b><br>Wait this long for the game to load.",
4843
LockMode::LOCK_WHILE_RUNNING,
@@ -145,7 +140,6 @@ GameSettings::GameSettings()
145140
PA_ADD_OPTION(GAME_TO_HOME_DELAY0);
146141

147142
PA_ADD_STATIC(m_start_game_timings);
148-
PA_ADD_OPTION(START_GAME_MASH0);
149143
PA_ADD_OPTION(START_GAME_WAIT0);
150144
PA_ADD_OPTION(ENTER_GAME_MASH0);
151145
PA_ADD_OPTION(ENTER_GAME_WAIT0);

SerialPrograms/Source/PokemonBDSP/PokemonBDSP_Settings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class GameSettings : public BatchOption{
2828
MillisecondsOption GAME_TO_HOME_DELAY0;
2929

3030
SectionDividerOption m_start_game_timings;
31-
MillisecondsOption START_GAME_MASH0;
3231
MillisecondsOption START_GAME_WAIT0;
3332
MillisecondsOption ENTER_GAME_MASH0;
3433
MillisecondsOption ENTER_GAME_WAIT0;

SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_GameEntry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ bool reset_game_from_home(
8585
context,
8686
tolerate_update_menu,
8787
0, 0,
88-
GameSettings::instance().START_GAME_MASH0
88+
ConsoleSettings::instance().START_GAME_MASH
8989
);
9090
}else{
9191
pbf_press_button(context, BUTTON_X, 50, 0);
92-
pbf_mash_button(context, BUTTON_A, GameSettings::instance().START_GAME_MASH0);
92+
pbf_mash_button(context, BUTTON_A, ConsoleSettings::instance().START_GAME_MASH);
9393
}
9494
bool ret = openedgame_to_ingame(
9595
env, console, context,

SerialPrograms/Source/PokemonLA/PokemonLA_Settings.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ GameSettings::GameSettings()
3939
"30 s"
4040
)
4141
, m_start_game_timings("<font size=4><b>Start Game Timings:</b></font>")
42-
, START_GAME_MASH0(
43-
"<b>1. Start Game Mash:</b><br>Mash A for this long to start the game.",
44-
LockMode::LOCK_WHILE_RUNNING,
45-
"2000 ms"
46-
)
4742
, START_GAME_WAIT1(
4843
"<b>2. Start Game Wait:</b><br>Wait this long for the game to load.",
4944
LockMode::LOCK_WHILE_RUNNING,
@@ -101,7 +96,6 @@ GameSettings::GameSettings()
10196
PA_ADD_OPTION(LOAD_REGION_TIMEOUT0);
10297

10398
PA_ADD_STATIC(m_start_game_timings);
104-
PA_ADD_OPTION(START_GAME_MASH0);
10599
PA_ADD_OPTION(START_GAME_WAIT1);
106100
PA_ADD_OPTION(ENTER_GAME_MASH0);
107101
PA_ADD_OPTION(ENTER_GAME_WAIT0);

SerialPrograms/Source/PokemonLA/PokemonLA_Settings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class GameSettings : public BatchOption{
3030
MillisecondsOption LOAD_REGION_TIMEOUT0;
3131

3232
SectionDividerOption m_start_game_timings;
33-
MillisecondsOption START_GAME_MASH0;
3433
MillisecondsOption START_GAME_WAIT1;
3534
MillisecondsOption ENTER_GAME_MASH0;
3635
MillisecondsOption ENTER_GAME_WAIT0;

SerialPrograms/Source/PokemonLA/Programs/PokemonLA_GameEntry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ bool reset_game_to_gamemenu(
4040
context,
4141
tolerate_update_menu,
4242
0, 0,
43-
GameSettings::instance().START_GAME_MASH0
43+
ConsoleSettings::instance().START_GAME_MASH
4444
);
4545
}else{
4646
pbf_press_button(context, BUTTON_X, 50, 0);
47-
pbf_mash_button(context, BUTTON_A, GameSettings::instance().START_GAME_MASH0);
47+
pbf_mash_button(context, BUTTON_A, ConsoleSettings::instance().START_GAME_MASH);
4848
}
4949

5050
// Now the game has opened:

SerialPrograms/Source/PokemonLA/Programs/PokemonLA_GameEntry.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,24 @@ namespace PokemonLA{
1919

2020

2121

22-
// From Switch Home menu, reset game and wait until the game menu screen (where
23-
// "Press A" is displayed to enter the game) is shown.
22+
// From Switch Home menu, reset game and wait until the game menu screen (where
23+
// "Press A" is displayed to enter the game) is shown.
2424
bool reset_game_to_gamemenu(
2525
ConsoleHandle& console, ProControllerContext& context,
2626
bool tolerate_update_menu
2727
);
2828

29-
// From the game menu screen (where "Press A" is displayed to enter the game),
30-
// mash A to enter the game and wait until the black screen is gone.
29+
// From the game menu screen (where "Press A" is displayed to enter the game),
30+
// mash A to enter the game and wait until the black screen is gone.
3131
bool gamemenu_to_ingame(
3232
VideoStream& stream, ProControllerContext& context,
3333
Milliseconds mash_duration, Milliseconds enter_game_timeout
3434
);
3535

36-
// From Switch Home menu, start game and wait until the player character appears in game.
37-
// post_wait_time: how many ticks to wait after the black screen (shown when loading the map) is over.
36+
// From Switch Home menu, start game and wait until the player character
37+
// appears in game.
38+
// post_wait_time: how many ticks to wait after the black screen
39+
// (shown when loading the map) is over.
3840
bool reset_game_from_home(
3941
ProgramEnvironment& env,
4042
ConsoleHandle& console, ProControllerContext& context,

SerialPrograms/Source/PokemonLGPE/PokemonLGPE_Settings.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ GameSettings::GameSettings()
2828
"1000 ms"
2929
)
3030
, m_start_game_timings("<font size=4><b>Start Game Timings:</b></font>")
31-
, START_GAME_MASH0(
32-
"<b>1. Start Game Mash:</b><br>Mash A for this long to start the game.",
33-
LockMode::LOCK_WHILE_RUNNING,
34-
"2000 ms"
35-
)
3631
, START_GAME_WAIT1(
3732
"<b>2. Start Game Wait:</b><br>Wait this long for the game to load.",
3833
LockMode::LOCK_WHILE_RUNNING,
@@ -66,7 +61,6 @@ GameSettings::GameSettings()
6661
PA_ADD_OPTION(GAME_TO_HOME_DELAY0);
6762

6863
PA_ADD_STATIC(m_start_game_timings);
69-
PA_ADD_OPTION(START_GAME_MASH0);
7064
PA_ADD_OPTION(START_GAME_WAIT1);
7165
PA_ADD_OPTION(ENTER_GAME_MASH0);
7266
PA_ADD_OPTION(ENTER_GAME_WAIT0);

0 commit comments

Comments
 (0)