diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index ebdda902e..781060b4a 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -23,7 +23,7 @@ static BootCommand sCommands[] = { { "--skiplogo", BootCommands_Command_SkipLogo void BootCommands_Init() { CVar_RegisterS32("gDebugEnabled", 0); - CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French + CVar_RegisterS32("gLanguages", LANGUAGE_ENG); CVar_RegisterS32("gHudColors", 0); //0 = N64 / 1 = NGC / 2 = Custom CVar_RegisterS32("gInvertYAxis", 1); CVar_RegisterS32("gTrailDuration", 4); // 4 = Default trail duration diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 66824c219..8226e13cb 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -291,9 +291,9 @@ namespace GameMenuBar { UIWidgets::Spacer(0); if (ImGui::BeginMenu("Languages")) { - UIWidgets::EnhancementRadioButton("English", "gLanguages", 0); - UIWidgets::EnhancementRadioButton("German", "gLanguages", 1); - UIWidgets::EnhancementRadioButton("French", "gLanguages", 2); + UIWidgets::EnhancementRadioButton("English", "gLanguages", LANGUAGE_ENG); + UIWidgets::EnhancementRadioButton("German", "gLanguages", LANGUAGE_GER); + UIWidgets::EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA); ImGui::EndMenu(); } ImGui::EndMenu(); diff --git a/soh/soh/UIWidgets.cpp b/soh/soh/UIWidgets.cpp index 2ad9026ab..9f8681ab3 100644 --- a/soh/soh/UIWidgets.cpp +++ b/soh/soh/UIWidgets.cpp @@ -465,9 +465,9 @@ namespace UIWidgets { Second is the cvar name where MyID will be saved. Note: the CVar name should be the same to each Buddies. Example : - EnhancementRadioButton("English", "gLanguages", 0); - EnhancementRadioButton("German", "gLanguages", 1); - EnhancementRadioButton("French", "gLanguages", 2); + EnhancementRadioButton("English", "gLanguages", LANGUAGE_ENG); + EnhancementRadioButton("German", "gLanguages", LANGUAGE_GER); + EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA); */ std::string make_invisible = "##"; make_invisible += text; diff --git a/soh/src/code/game.c b/soh/src/code/game.c index 2b824c1ab..df8e8d98a 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -458,8 +458,7 @@ void GameState_Update(GameState* gameState) { } } - //since our CVar is same value and properly default to 0 there is not problems doing this in single line. - gSaveContext.language = CVar_GetS32("gLanguages", 0); + gSaveContext.language = CVar_GetS32("gLanguages", LANGUAGE_ENG); gameState->frames++; }