Fix text speed enhancement with slowed down text (#4072)
* Correct behaviour of text speed enhancement The text speed enhancement increases the size of the text crawl in the number of characters displayed in each step. This messes up certain parts of dialogue that were meant to be displayed in a certain way (like Ganondorf's "Heh heh heh..."), and in places where the text crawl is meant to be slower than normal, it just looks clunky. The text crawl speed enhancement is a wonderful feature, but smoothing out should be easily doable, and is a more correct implementation. * Fix text speed for normal text * Flatten if statements
This commit is contained in:
@@ -835,6 +835,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
||||
u16 i;
|
||||
u16 sfxHi;
|
||||
u16 charTexIdx;
|
||||
int gTextSpeed;
|
||||
Font* font = &play->msgCtx.font;
|
||||
Gfx* gfx = *gfxP;
|
||||
|
||||
@@ -1115,11 +1116,17 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (msgCtx->textDelayTimer == 0) {
|
||||
msgCtx->textDrawPos = i + CVarGetInteger(CVAR_ENHANCEMENT("TextSpeed"), 1);
|
||||
|
||||
gTextSpeed = CVarGetInteger(CVAR_ENHANCEMENT("TextSpeed"), 1);
|
||||
if (msgCtx->textDelay == 0) {
|
||||
msgCtx->textDrawPos = i + gTextSpeed;
|
||||
} else if (msgCtx->textDelayTimer == 0) {
|
||||
msgCtx->textDrawPos = i + 1;
|
||||
msgCtx->textDelayTimer = msgCtx->textDelay;
|
||||
} else if (msgCtx->textDelayTimer <= gTextSpeed) {
|
||||
msgCtx->textDelayTimer = 0;
|
||||
} else {
|
||||
msgCtx->textDelayTimer--;
|
||||
msgCtx->textDelayTimer -= gTextSpeed;
|
||||
}
|
||||
*gfxP = gfx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user