Skip to content

Commit ef1c5ab

Browse files
committed
setting and panel
1 parent 88d0f36 commit ef1c5ab

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

SerialPrograms/Source/PokemonLGPE/PokemonLGPE_Panels.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "Programs/ShinyHunting/PokemonLGPE_FossilRevival.h"
1515
#include "Programs/ShinyHunting/PokemonLGPE_GiftReset.h"
1616

17+
#include "Programs/TestPrograms/PokemonLGPE_SoundListener.h"
18+
1719
namespace PokemonAutomation{
1820
namespace NintendoSwitch{
1921
namespace PokemonLGPE{
@@ -36,6 +38,11 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
3638
ret.emplace_back(make_single_switch_program<FossilRevival_Descriptor, FossilRevival>());
3739
ret.emplace_back(make_single_switch_program<GiftReset_Descriptor, GiftReset>());
3840

41+
if (PreloadSettings::instance().DEVELOPER_MODE){
42+
ret.emplace_back("---- Developer Tools ----");
43+
ret.emplace_back(make_single_switch_program<SoundListener_Descriptor, SoundListener>());
44+
}
45+
3946
return ret;
4047
}
4148

SerialPrograms/Source/PokemonLGPE/PokemonLGPE_Settings.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ GameSettings::GameSettings()
4848
LockMode::LOCK_WHILE_RUNNING,
4949
"15 s"
5050
)
51+
, m_shiny_audio_settings("<font size=4><b>Shiny Audio Settings:</b></font>")
52+
, SHINY_SOUND_THRESHOLD(
53+
"<b>Shiny Sound Threshold:</b><br>Maximum error coefficient to trigger a shiny detection.",
54+
LockMode::LOCK_WHILE_RUNNING,
55+
0.95, 0, 1.0
56+
)
57+
, SHINY_SOUND_LOW_FREQUENCY(
58+
"<b>Shiny Sound Low Frequency (Hz):</b><br>High pass filter frequency for shiny sound.",
59+
LockMode::LOCK_WHILE_RUNNING,
60+
1000, 0, 48000
61+
)
5162
{
5263
PA_ADD_STATIC(m_general);
5364

@@ -59,6 +70,10 @@ GameSettings::GameSettings()
5970
PA_ADD_OPTION(START_GAME_WAIT1);
6071
PA_ADD_OPTION(ENTER_GAME_MASH0);
6172
PA_ADD_OPTION(ENTER_GAME_WAIT0);
73+
74+
PA_ADD_STATIC(m_shiny_audio_settings);
75+
PA_ADD_OPTION(SHINY_SOUND_THRESHOLD);
76+
PA_ADD_OPTION(SHINY_SOUND_LOW_FREQUENCY);
6277
}
6378

6479

SerialPrograms/Source/PokemonLGPE/PokemonLGPE_Settings.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ class GameSettings : public BatchOption{
3232
MillisecondsOption START_GAME_WAIT1;
3333
MillisecondsOption ENTER_GAME_MASH0;
3434
MillisecondsOption ENTER_GAME_WAIT0;
35+
36+
SectionDividerOption m_shiny_audio_settings;
37+
FloatingPointOption SHINY_SOUND_THRESHOLD;
38+
FloatingPointOption SHINY_SOUND_LOW_FREQUENCY;
3539
};
3640

3741

SerialPrograms/Source/PokemonLGPE/Programs/TestPrograms/PokemonLGPE_SoundListener.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SoundListener_Descriptor::SoundListener_Descriptor()
3535
"",
3636
"Test sound detectors listening to audio stream.",
3737
FeedbackType::REQUIRED, AllowCommandsWhenRunning::ENABLE_COMMANDS,
38-
{ControllerFeature::NintendoSwitch_ProController}
38+
{ControllerFeature::NintendoSwitch_RightJoycon}
3939
)
4040
{}
4141

0 commit comments

Comments
 (0)