From b7a2a10e4631ea36b8a0fef9b3c22e4b5e374346 Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Sat, 23 Apr 2022 17:42:55 +0100 Subject: [PATCH] Makes text speed function correctly Checks if gtextspeed is 0, and if it is, sets it to 1, so that text still progresses normally if you don't change it in the enhancements menu. --- soh/src/code/z_message_PAL.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index a767ede79..879ea50aa 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -951,7 +951,10 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } i = j - 1; - msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + if (CVar_GetS32("gTextSpeed", 1) > 0) + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + else + CVar_SetS32("gTextSpeed", 1); if (character) {} } @@ -1144,7 +1147,10 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + if (CVar_GetS32("gTextSpeed", 1) > 0) + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + else + CVar_SetS32("gTextSpeed", 1); msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--;