diff --git a/src/dusk/imgui/ImGuiMenuGame.cpp b/src/dusk/imgui/ImGuiMenuGame.cpp index 4e046ccf51..dc4f4fc2ba 100644 --- a/src/dusk/imgui/ImGuiMenuGame.cpp +++ b/src/dusk/imgui/ImGuiMenuGame.cpp @@ -14,16 +14,9 @@ #include "dusk/settings.h" #include "dusk/livesplit.h" #include "m_Do/m_Do_controller_pad.h" -#include "m_Do/m_Do_graphic.h" - -#include -#include - #include "m_Do/m_Do_main.h" -namespace { -constexpr int kInternalResolutionScaleMax = 12; -} // namespace +#include namespace dusk { void ImGuiMenuGame::ToggleFullscreen() { @@ -36,7 +29,6 @@ namespace dusk { void ImGuiMenuGame::draw() { if (ImGui::BeginMenu("Settings")) { - drawAudioMenu(); drawCheatsMenu(); drawGameplayMenu(); drawInputMenu(); @@ -253,64 +245,6 @@ namespace dusk { } } - void ImGuiMenuGame::drawAudioMenu() { - if (ImGui::BeginMenu("Audio")) { - - ImGui::SeparatorText("Volume"); - - ImGui::Text("Master Volume"); - if (config::ImGuiSliderInt("##masterVolume", getSettings().audio.masterVolume, 0, 100)) { - dusk::audio::SetMasterVolume(getSettings().audio.masterVolume / 100.0f); - } - - /* - // TODO: Implement additional settings - ImGui::Text("Main Music Volume"); - ImGui::SliderFloat("##mainMusicVolume", &getSettings().audio.mainMusicVolume, 0, 100); - - ImGui::Text("Sub Music Volume"); - ImGui::SliderFloat("##subMusicVolume", &getSettings().audio.subMusicVolume, 0, 100); - - ImGui::Text("Sound Effects Volume"); - ImGui::SliderFloat("##soundEffectsVolume", &getSettings().audio.soundEffectsVolume, 0, 100); - - ImGui::Text("Fanfare Volume"); - ImGui::SliderFloat("##fanfareVolume", &getSettings().audio.fanfareVolume, 0, 100); - - Z2AudioMgr* audioMgr = Z2AudioMgr::getInterface(); - if (audioMgr != nullptr) { - } - */ - - ImGui::SeparatorText("Effects"); - - if (config::ImGuiCheckbox("Enable Reverb", getSettings().audio.enableReverb)) { - dusk::audio::SetEnableReverb(getSettings().audio.enableReverb); - } - - if (config::ImGuiCheckbox("Spatial Sound", getSettings().audio.enableHrtf)) { - dusk::audio::EnableHrtf = getSettings().audio.enableHrtf; - } - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Emulate surround sound via HRTF (for headphone use only)!"); - } - - ImGui::SeparatorText("Tweaks"); - - config::ImGuiCheckbox("No Low HP Sound", getSettings().game.noLowHpSound); - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Disable the beeping sound when having low health."); - } - - config::ImGuiCheckbox("Non-Stop Midna's Lament", getSettings().game.midnasLamentNonStop); - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Prevents enemy music while Midna's Lament is playing."); - } - - ImGui::EndMenu(); - } - } - void ImGuiMenuGame::drawInputMenu() { if (ImGui::BeginMenu("Input")) { ImGui::SeparatorText("Controller"); diff --git a/src/dusk/imgui/ImGuiMenuGame.hpp b/src/dusk/imgui/ImGuiMenuGame.hpp index 85eb78d23e..d51b059cf8 100644 --- a/src/dusk/imgui/ImGuiMenuGame.hpp +++ b/src/dusk/imgui/ImGuiMenuGame.hpp @@ -55,7 +55,6 @@ namespace dusk { static void resetForSpeedrunMode(); private: - void drawAudioMenu(); void drawInputMenu(); void drawGameplayMenu(); void drawCheatsMenu(); diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index 4da727b3a5..5af598ffcd 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -5,6 +5,7 @@ #include "aurora/gfx.h" #include "bool_button.hpp" #include "dusk/audio/DuskAudioSystem.h" +#include "dusk/audio/DuskDsp.hpp" #include "dusk/config.hpp" #include "dusk/livesplit.h" #include "m_Do/m_Do_main.h" @@ -144,6 +145,7 @@ SettingsWindow::SettingsWindow() { auto& leftPane = add_child(content, Pane::Type::Controlled); auto& rightPane = add_child(content, Pane::Type::Uncontrolled); + // TODO: Individual sliders for Main Music, Sub Music, Sound Effects, and Fanfare. leftPane.add_section("Volume"); leftPane .add_child(NumberButton::Props{ @@ -170,6 +172,12 @@ SettingsWindow::SettingsWindow() { .helpText = "Enables the reverb effect in game audio.", .onChange = [](bool value) { audio::SetEnableReverb(value); }, }); + config_bool_select(leftPane, rightPane, getSettings().audio.enableHrtf, + { + .key = "Enable Spatial Sound", + .helpText = "Emulate surround sound via HRTF. Recommended only for use with headphones!", + .onChange = [](bool value) { audio::EnableHrtf = value; }, + }); leftPane.add_section("Tweaks"); config_bool_select(leftPane, rightPane, getSettings().game.noLowHpSound,