mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 13:53:49 -07:00
Adhere to static naming convention
This commit is contained in:
parent
db69cdf20d
commit
5958a0fbf4
1 changed files with 18 additions and 18 deletions
|
@ -118,10 +118,10 @@ s16 sOcarinaNoteCEnvR;
|
||||||
s16 sOcarinaNoteCEnvB;
|
s16 sOcarinaNoteCEnvB;
|
||||||
s16 sOcarinaNoteCEnvG;
|
s16 sOcarinaNoteCEnvG;
|
||||||
|
|
||||||
static u8 ttsHasNewMessage;
|
static u8 sTtsHasNewMessage;
|
||||||
static u8 ttsHasMessage;
|
static u8 sTtsHasMessage;
|
||||||
static s8 ttsCurrentChoice;
|
static s8 sTtsCurrentChoice;
|
||||||
static u8 ttsMessageBuf[256];
|
static u8 sTtsMessageBuf[256];
|
||||||
|
|
||||||
void Message_ResetOcarinaNoteState(void) {
|
void Message_ResetOcarinaNoteState(void) {
|
||||||
R_OCARINA_NOTES_YPOS(0) = 189;
|
R_OCARINA_NOTES_YPOS(0) = 189;
|
||||||
|
@ -3048,22 +3048,22 @@ void Message_TTS_Update(GlobalContext* globalCtx) {
|
||||||
|
|
||||||
if (msgCtx->msgMode == MSGMODE_TEXT_NEXT_MSG || msgCtx->msgMode == MSGMODE_DISPLAY_SONG_PLAYED_TEXT_BEGIN ||
|
if (msgCtx->msgMode == MSGMODE_TEXT_NEXT_MSG || msgCtx->msgMode == MSGMODE_DISPLAY_SONG_PLAYED_TEXT_BEGIN ||
|
||||||
(msgCtx->msgMode == MSGMODE_TEXT_CONTINUING && msgCtx->stateTimer == 1)) {
|
(msgCtx->msgMode == MSGMODE_TEXT_CONTINUING && msgCtx->stateTimer == 1)) {
|
||||||
ttsHasNewMessage = 1;
|
sTtsHasNewMessage = 1;
|
||||||
} else if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING || msgCtx->msgMode == MSGMODE_OCARINA_STARTING ||
|
} else if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING || msgCtx->msgMode == MSGMODE_OCARINA_STARTING ||
|
||||||
msgCtx->msgMode == MSGMODE_OCARINA_PLAYING || msgCtx->msgMode == MSGMODE_TEXT_AWAIT_NEXT ||
|
msgCtx->msgMode == MSGMODE_OCARINA_PLAYING || msgCtx->msgMode == MSGMODE_TEXT_AWAIT_NEXT ||
|
||||||
msgCtx->msgMode == MSGMODE_TEXT_DONE || msgCtx->msgMode == MSGMODE_DISPLAY_SONG_PLAYED_TEXT ||
|
msgCtx->msgMode == MSGMODE_TEXT_DONE || msgCtx->msgMode == MSGMODE_DISPLAY_SONG_PLAYED_TEXT ||
|
||||||
msgCtx->msgMode == MSGMODE_TEXT_DELAYED_BREAK) {
|
msgCtx->msgMode == MSGMODE_TEXT_DELAYED_BREAK) {
|
||||||
if (ttsHasNewMessage == 1) {
|
if (sTtsHasNewMessage == 1) {
|
||||||
ttsHasNewMessage = 0;
|
sTtsHasNewMessage = 0;
|
||||||
ttsHasMessage = 1;
|
sTtsHasMessage = 1;
|
||||||
ttsCurrentChoice = 0;
|
sTtsCurrentChoice = 0;
|
||||||
|
|
||||||
u32 size = msgCtx->decodedTextLen;
|
u32 size = msgCtx->decodedTextLen;
|
||||||
Message_TTS_Decode(msgCtx->msgBufDecoded, ttsMessageBuf, 0, size);
|
Message_TTS_Decode(msgCtx->msgBufDecoded, sTtsMessageBuf, 0, size);
|
||||||
OTRTextToSpeechCallback(ttsMessageBuf);
|
OTRTextToSpeechCallback(sTtsMessageBuf);
|
||||||
} else if (msgCtx->msgMode == MSGMODE_TEXT_DONE && msgCtx->choiceNum > 0 &&
|
} else if (msgCtx->msgMode == MSGMODE_TEXT_DONE && msgCtx->choiceNum > 0 &&
|
||||||
msgCtx->choiceIndex != ttsCurrentChoice) {
|
msgCtx->choiceIndex != sTtsCurrentChoice) {
|
||||||
ttsCurrentChoice = msgCtx->choiceIndex;
|
sTtsCurrentChoice = msgCtx->choiceIndex;
|
||||||
u32 startOffset = 0;
|
u32 startOffset = 0;
|
||||||
u32 endOffset = 0;
|
u32 endOffset = 0;
|
||||||
while (startOffset < msgCtx->decodedTextLen) {
|
while (startOffset < msgCtx->decodedTextLen) {
|
||||||
|
@ -3095,14 +3095,14 @@ void Message_TTS_Update(GlobalContext* globalCtx) {
|
||||||
|
|
||||||
if (startOffset < msgCtx->decodedTextLen && startOffset != endOffset) {
|
if (startOffset < msgCtx->decodedTextLen && startOffset != endOffset) {
|
||||||
u32 size = endOffset - startOffset;
|
u32 size = endOffset - startOffset;
|
||||||
Message_TTS_Decode(msgCtx->msgBufDecoded, ttsMessageBuf, startOffset, size);
|
Message_TTS_Decode(msgCtx->msgBufDecoded, sTtsMessageBuf, startOffset, size);
|
||||||
OTRTextToSpeechCallback(ttsMessageBuf);
|
OTRTextToSpeechCallback(sTtsMessageBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ttsHasMessage == 1) {
|
} else if (sTtsHasMessage == 1) {
|
||||||
ttsHasMessage = 0;
|
sTtsHasMessage = 0;
|
||||||
ttsHasNewMessage = 0;
|
sTtsHasNewMessage = 0;
|
||||||
OTRTextToSpeechCallback(""); // cancel current speech
|
OTRTextToSpeechCallback(""); // cancel current speech
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue