From 9dbf5cd0005bcda2d63d2758e380031119f0de4e Mon Sep 17 00:00:00 2001 From: Ryan Conrad Date: Wed, 13 Apr 2022 11:03:34 -0500 Subject: [PATCH] Improve reading messages with choice prompts Pause before reading the choices as well as in between chioces --- soh/src/code/z_message_PAL.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 2439a8edd..2444771cd 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -3011,6 +3011,7 @@ void Message_Draw(GlobalContext* globalCtx) { void Message_TTS_Decode(u8* srcBuf, u8* dstBuf, u32 srcOffset, u32 size) { u32 dstIdx = 0; + bool isListingChoices = false; for (u32 i = 0; i < size; i++) { u8 currChar = srcBuf[i + srcOffset]; @@ -3018,7 +3019,12 @@ void Message_TTS_Decode(u8* srcBuf, u8* dstBuf, u32 srcOffset, u32 size) { if (currChar < ' ') { switch (currChar) { case MESSAGE_NEWLINE: - dstBuf[dstIdx++] = ' '; + dstBuf[dstIdx++] = (isListingChoices) ? '\n' : ' '; + break; + case MESSAGE_THREE_CHOICE: + case MESSAGE_TWO_CHOICE: + dstBuf[dstIdx++] = '\n'; + isListingChoices = true; break; case MESSAGE_COLOR: case MESSAGE_SHIFT: