summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2023-01-23 16:47:54 -0600
committerGitHub <noreply@github.com>2023-01-23 17:47:54 -0500
commit0629140357b8c6f15e0389aa0782eb07b13ab679 (patch)
treec7d35595567558cb305f57054811a953b3de9f60 /soh/src/code
parentbeb414eb0a53b3fdf732803ac604b150f9fad955 (diff)
Don't require input for credits textboxes (#2193)
* Don't require input for credits textboxes * Use cvar instead of rando flag
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_message_PAL.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c
index 0cd2bfd66..922832571 100644
--- a/soh/src/code/z_message_PAL.c
+++ b/soh/src/code/z_message_PAL.c
@@ -1180,6 +1180,23 @@ void Message_Decode(PlayState* play) {
while (true) {
phi_s1 = temp_s2 = msgCtx->msgBufDecoded[decodedBufPos] = font->msgBuf[msgCtx->msgBufPos];
+ // Don't require input for credits textboxes in randomizer
+ if (CVarGetInteger("gNoInputForCredits", 0) && (
+ msgCtx->textId == 0x706F ||
+ msgCtx->textId == 0x7091 ||
+ msgCtx->textId == 0x7092 ||
+ msgCtx->textId == 0x7093 ||
+ msgCtx->textId == 0x7094 ||
+ msgCtx->textId == 0x7095
+ )) {
+ if (temp_s2 == MESSAGE_BOX_BREAK) {
+ phi_s1 = temp_s2 = msgCtx->msgBufDecoded[decodedBufPos] = font->msgBuf[msgCtx->msgBufPos] = MESSAGE_BOX_BREAK_DELAYED;
+ } else if (temp_s2 == MESSAGE_END) {
+ phi_s1 = temp_s2 = msgCtx->msgBufDecoded[decodedBufPos] = font->msgBuf[msgCtx->msgBufPos] = MESSAGE_FADE2;
+ phi_s1 = temp_s2 = msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos] = MESSAGE_END;
+ }
+ }
+
if (temp_s2 == MESSAGE_BOX_BREAK || temp_s2 == MESSAGE_TEXTID || temp_s2 == MESSAGE_BOX_BREAK_DELAYED ||
temp_s2 == MESSAGE_EVENT || temp_s2 == MESSAGE_END) {
// Textbox decoding ends with any of the above text control characters