Adds text speed default to ConfigFile.cpp
+ removes workaround
This commit is contained in:
parent
43cbd5a9fa
commit
f410b30402
|
@ -2,6 +2,7 @@
|
|||
#include "spdlog/spdlog.h"
|
||||
#include "GlobalCtx2.h"
|
||||
#include "Window.h"
|
||||
#include "GameSettings.h"
|
||||
|
||||
namespace Ship {
|
||||
ConfigFile::ConfigFile(std::shared_ptr<GlobalCtx2> Context, const std::string& Path) : Context(Context), Path(Path), File(Path.c_str()) {
|
||||
|
@ -149,6 +150,8 @@ namespace Ship {
|
|||
(*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKDOWN)] = std::to_string(0x01F);
|
||||
(*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKUP)] = std::to_string(0x011);
|
||||
|
||||
(*this)["ENHANCEMENT SETTINGS"]["TEXT_SPEED"] = "1";
|
||||
|
||||
(*this)["SDL CONTROLLER 1"]["GUID"] = "";
|
||||
(*this)["SDL CONTROLLER 2"]["GUID"] = "";
|
||||
(*this)["SDL CONTROLLER 3"]["GUID"] = "";
|
||||
|
|
|
@ -951,10 +951,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
}
|
||||
}
|
||||
i = j - 1;
|
||||
if (CVar_GetS32("gTextSpeed", 1) > 0)
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
else
|
||||
CVar_SetS32("gTextSpeed", 1);
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
|
||||
if (character) {}
|
||||
}
|
||||
|
@ -1147,10 +1144,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
}
|
||||
}
|
||||
if (msgCtx->textDelayTimer == 0) {
|
||||
if (CVar_GetS32("gTextSpeed", 1) > 0)
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
else
|
||||
CVar_SetS32("gTextSpeed", 1);
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
msgCtx->textDelayTimer = msgCtx->textDelay;
|
||||
} else {
|
||||
msgCtx->textDelayTimer--;
|
||||
|
|
Loading…
Reference in New Issue