mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-23 01:42:19 -05:00
Fixes laggy text boxes in Switch (#1527)
* Refactors message texture invalidation to remove lag on Switch. * Removes unneeded commented out function calls.
This commit is contained in:
parent
b5b5a58302
commit
c5acef2957
@ -1281,7 +1281,9 @@ void Message_Decode(GlobalContext* globalCtx) {
|
|||||||
MessageContext* msgCtx = &globalCtx->msgCtx;
|
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||||
Font* font = &globalCtx->msgCtx.font;
|
Font* font = &globalCtx->msgCtx.font;
|
||||||
|
|
||||||
gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyOpa.p++, NULL);
|
for (u32 i = 0; i < FONT_CHAR_TEX_SIZE * 120; i += FONT_CHAR_TEX_SIZE) {
|
||||||
|
gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyOpa.p++, &font->charTexBuf[i]);
|
||||||
|
}
|
||||||
|
|
||||||
globalCtx->msgCtx.textDelayTimer = 0;
|
globalCtx->msgCtx.textDelayTimer = 0;
|
||||||
globalCtx->msgCtx.textUnskippable = globalCtx->msgCtx.textDelay = globalCtx->msgCtx.textDelayTimer = 0;
|
globalCtx->msgCtx.textUnskippable = globalCtx->msgCtx.textDelay = globalCtx->msgCtx.textDelayTimer = 0;
|
||||||
@ -1678,7 +1680,6 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sMessageHasSetSfx = D_8014B2F4 = sTextboxSkipped = sTextIsCredits = 0;
|
sMessageHasSetSfx = D_8014B2F4 = sTextboxSkipped = sTextIsCredits = 0;
|
||||||
gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyOpa.p++, NULL);
|
|
||||||
|
|
||||||
if (textId >= 0x0500 && textId < 0x0600) { // text ids 0500 to 0600 are reserved for credits
|
if (textId >= 0x0500 && textId < 0x0600) { // text ids 0500 to 0600 are reserved for credits
|
||||||
sTextIsCredits = true;
|
sTextIsCredits = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user