diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2026-07-27 16:13:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-27 16:13:57 -0500 |
| commit | 2c83cc890d70f4f68e1ca1e7bee753905efca467 (patch) | |
| tree | 6807f4b539320cac588e6523c874588deee01b58 /mm/src/code | |
| parent | e3310fe1b327c51a39e40a0f09d12b43bf7a0cb5 (diff) | |
Option to auto advance text to credits (#1821)
Diffstat (limited to 'mm/src/code')
| -rw-r--r-- | mm/src/code/z_message.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/mm/src/code/z_message.c b/mm/src/code/z_message.c index 1e0a6eed6..c1450cdf3 100644 --- a/mm/src/code/z_message.c +++ b/mm/src/code/z_message.c @@ -291,40 +291,48 @@ void Message_ResetOcarinaButtonState(PlayState* play) { bool Message_ShouldAdvance(PlayState* play) { MessageContext* msgCtx = &play->msgCtx; Input* controller = CONTROLLER1(&play->state); + bool shouldAdvance; if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE)) { if (CHECK_BTN_ALL(controller->press.button, BTN_A)) { Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS); } - return CHECK_BTN_ALL(controller->press.button, BTN_A); + shouldAdvance = CHECK_BTN_ALL(controller->press.button, BTN_A); } else { if (CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->press.button, BTN_B) || CHECK_BTN_ALL(controller->press.button, BTN_CUP)) { Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS); } - return CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->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(controller->cur.button, BTN_B)) || - CHECK_BTN_ALL(controller->press.button, BTN_CUP); + shouldAdvance = + CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->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(controller->cur.button, BTN_B)) || + CHECK_BTN_ALL(controller->press.button, BTN_CUP); } + + return GameInteractor_Should(VB_MSG_ADVANCE, shouldAdvance); } bool Message_ShouldAdvanceSilent(PlayState* play) { MessageContext* msgCtx = &play->msgCtx; Input* controller = CONTROLLER1(&play->state); + bool shouldAdvance; if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE)) { - return CHECK_BTN_ALL(controller->press.button, BTN_A); + shouldAdvance = CHECK_BTN_ALL(controller->press.button, BTN_A); } else { - return CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->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(controller->cur.button, BTN_B)) || - CHECK_BTN_ALL(controller->press.button, BTN_CUP); + shouldAdvance = + CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->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(controller->cur.button, BTN_B)) || + CHECK_BTN_ALL(controller->press.button, BTN_CUP); } + + return GameInteractor_Should(VB_MSG_ADVANCE, shouldAdvance); } void Message_CloseTextbox(PlayState* play) { |
