From 39bf387e58342e5e2f090c823f3a09bc174ccd30 Mon Sep 17 00:00:00 2001 From: Sonic Dreamcaster Date: Thu, 30 Apr 2026 19:21:33 -0300 Subject: [PATCH] Accomodate menu for the Spanish audio romhack support --- src/port/Engine.h | 1 + src/port/ui/ImguiUI.cpp | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/port/Engine.h b/src/port/Engine.h index bbb50c60..b937e9db 100644 --- a/src/port/Engine.h +++ b/src/port/Engine.h @@ -6,6 +6,7 @@ typedef enum { SF64_VER_US = 0x94F1D5A7, SF64_VER_EU = 0x6EE9ADE7, + SF64_VER_EU_SPA = 0x3964945f, SF64_VER_JP = 0x3728D3E1 } SF64Version; diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index b9bc2c32..5874ac2a 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -115,6 +115,9 @@ static const char* filters[3] = { static const char* voiceLangs[] = { "Original", /*"Japanese",*/ "Lylat" }; +static const char* voiceLangsSPA[] = { + "EspaƱol", /*"Japanese",*/ "Lylat" +}; void DrawSpeakerPositionEditor() { static ImVec2 lastCanvasPos; @@ -309,15 +312,26 @@ void DrawSettingsMenu(){ UIWidgets::Spacer(0); if (UIWidgets::BeginMenu("Language")) { ImGui::Dummy(ImVec2(150, 0.0f)); - if (!GameEngine::HasVersion(SF64_VER_JP) && GameEngine::HasVersion(SF64_VER_EU)){ - //UIWidgets::Spacer(0); - if (UIWidgets::CVarCombobox("Voices", "gVoiceLanguage", voiceLangs, - { - .tooltip = "Changes the language of the voice acting in the game", - .defaultIndex = 0, - })) { - Audio_SetVoiceLanguage(CVarGetInteger("gVoiceLanguage", 0)); - }; + if (!GameEngine::HasVersion(SF64_VER_JP) && (GameEngine::HasVersion(SF64_VER_EU) || GameEngine::HasVersion(SF64_VER_EU_SPA))) { + if (GameEngine::HasVersion(SF64_VER_EU_SPA)) { + //UIWidgets::Spacer(0); + if (UIWidgets::CVarCombobox("Voices", "gVoiceLanguage", voiceLangsSPA, + { + .tooltip = "Changes the language of the voice acting in the game", + .defaultIndex = 0, + })) { + Audio_SetVoiceLanguage(CVarGetInteger("gVoiceLanguage", 0)); + }; + } else { + //UIWidgets::Spacer(0); + if (UIWidgets::CVarCombobox("Voices", "gVoiceLanguage", voiceLangs, + { + .tooltip = "Changes the language of the voice acting in the game", + .defaultIndex = 0, + })) { + Audio_SetVoiceLanguage(CVarGetInteger("gVoiceLanguage", 0)); + }; + } } else { if (UIWidgets::Button("Install JP/EU Audio")) { if (GameEngine::GenAssetFile(false)){