Fix Fast Text Not Working on Instant Textboxes (#662)

* Fix Fast Text Not Working on Instant Textboxes

* format
This commit is contained in:
inspectredc
2024-06-14 20:55:24 -04:00
committed by GitHub
parent df81f97e43
commit a383b4b330
+9 -6
View File
@@ -5638,12 +5638,7 @@ void Message_Update(PlayState* play) {
case MSGMODE_TEXT_DISPLAYING:
if (msgCtx->textBoxType != TEXTBOX_TYPE_4) {
if ((CHECK_BTN_ALL(input->press.button, BTN_B) ||
// 2S2H [Enhancement] When fast text is on, we want to check if B is held instead of only if it was
// just pressed
(CVarGetInteger("gEnhancements.Dialogue.FastText", 0) &&
CHECK_BTN_ALL(input->cur.button, BTN_B))) &&
!msgCtx->textUnskippable) {
if (CHECK_BTN_ALL(input->press.button, BTN_B) && !msgCtx->textUnskippable) {
msgCtx->textboxSkipped = true;
msgCtx->textDrawPos = msgCtx->decodedTextLen;
} else if (CHECK_BTN_ALL(input->press.button, BTN_A) && !msgCtx->textUnskippable) {
@@ -5657,6 +5652,14 @@ void Message_Update(PlayState* play) {
}
msgCtx->textDrawPos++;
}
// 2S2H [Enhancement] When fast text is on, we want to check if B is held instead of only if it was
// just pressed. Has an additional check that the textbox hasnt been skipped already to prevent the
// message from failing to continue.
} else if ((CVarGetInteger("gEnhancements.Dialogue.FastText", 0) &&
CHECK_BTN_ALL(input->cur.button, BTN_B)) &&
!msgCtx->textUnskippable && !msgCtx->textboxSkipped) {
msgCtx->textboxSkipped = true;
msgCtx->textDrawPos = msgCtx->decodedTextLen;
}
} else if (CHECK_BTN_ALL(input->press.button, BTN_A) && (msgCtx->textUnskippable == 0)) {
while (true) {