mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 09:22:18 -05:00
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:
parent
65fbf2cc41
commit
68fcc5921b
@ -835,6 +835,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||||||
u16 i;
|
u16 i;
|
||||||
u16 sfxHi;
|
u16 sfxHi;
|
||||||
u16 charTexIdx;
|
u16 charTexIdx;
|
||||||
|
int gTextSpeed;
|
||||||
Font* font = &play->msgCtx.font;
|
Font* font = &play->msgCtx.font;
|
||||||
Gfx* gfx = *gfxP;
|
Gfx* gfx = *gfxP;
|
||||||
|
|
||||||
@ -1115,11 +1116,17 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||||||
break;
|
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;
|
msgCtx->textDelayTimer = msgCtx->textDelay;
|
||||||
|
} else if (msgCtx->textDelayTimer <= gTextSpeed) {
|
||||||
|
msgCtx->textDelayTimer = 0;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textDelayTimer--;
|
msgCtx->textDelayTimer -= gTextSpeed;
|
||||||
}
|
}
|
||||||
*gfxP = gfx;
|
*gfxP = gfx;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user