diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index fff182242..10c6fdcca 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -52,8 +52,8 @@ namespace Game { Settings.enhancements.skip_text = stob(Conf[EnhancementSection]["skip_text"]); CVar_SetS32("gSkipText", Settings.enhancements.skip_text); - Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]); - CVar_SetS32("gFastText", Settings.enhancements.fast_text); + Settings.enhancements.text_speed = Ship::stoi(Conf[EnhancementSection]["text_speed"]); + CVar_SetS32("gTextSpeed", Settings.enhancements.text_speed); Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]); CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod); @@ -152,7 +152,7 @@ namespace Game { // Enhancements Conf[EnhancementSection]["skip_text"] = std::to_string(Settings.enhancements.skip_text); - Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text); + Conf[EnhancementSection]["text_speed"] = std::to_string(Settings.enhancements.text_speed); Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index a935c4ef0..28a17928d 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -20,8 +20,8 @@ struct SoHConfigType { // Enhancements struct { + int text_speed = 1; bool skip_text = false; - bool fast_text = false; bool disable_lod = false; bool animated_pause_menu = false; bool minimal_ui = false; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 9bbd437ca..caea0abd1 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -378,13 +378,13 @@ namespace SohImGui { ImGui::Text("Gameplay"); ImGui::Separator(); - if (ImGui::Checkbox("Skip Text", &Game::Settings.enhancements.skip_text)) { - CVar_SetS32("gSkipText", Game::Settings.enhancements.skip_text); + ImGui::Text("Text Speed", Game::Settings.enhancements.text_speed); + if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5)) { needs_save = true; } - if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) { - CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text); + if (ImGui::Checkbox("Skip Text", &Game::Settings.enhancements.skip_text)) { + CVar_SetS32("gSkipText", Game::Settings.enhancements.skip_text); needs_save = true; } diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 39ca6f1db..e72da578d 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -37,10 +37,6 @@ MessageTableEntry* sStaffMessageEntryTablePtr; char* _message_0xFFFC_nes; -const int fastText = 5; -const int slowText = 1; -bool textSpeed = 1; - //MessageTableEntry sNesMessageEntryTable[] = { //#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \ // { textId, (_SHIFTL(type, 4, 8) | _SHIFTL(yPos, 0, 8)), _message_##textId##_nes }, @@ -957,11 +953,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } i = j - 1; - if (CVar_GetS32("gFastText", 0) !=0) - textSpeed = fastText; - else - textSpeed = slowText; - msgCtx->textDrawPos = i + textSpeed; + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); if (character) {} } @@ -1154,11 +1146,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - if (CVar_GetS32("gFastText", 0) !=0) - textSpeed = fastText; - else - textSpeed = slowText; - msgCtx->textDrawPos = i + textSpeed; + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--;