more cleanup

This commit is contained in:
Christopher Leggett 2022-07-17 15:29:02 -04:00
parent 98c771cf2c
commit ee1270f346
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79

View File

@ -1515,11 +1515,12 @@ extern "C" int Randomizer_GetCustomGetItemMessage(GetItemID giid, char* buffer,
extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx; MessageContext* msgCtx = &globalCtx->msgCtx;
uint16_t textId = msgCtx->textId;
Font* font = &msgCtx->font; Font* font = &msgCtx->font;
char* buffer = font->msgBuf; char* buffer = font->msgBuf;
const int maxBufferSize = sizeof(font->msgBuf); const int maxBufferSize = sizeof(font->msgBuf);
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
if (msgCtx->textId == 0xF8) { if (textId == 0xF8) {
if (msgCtx->msgLength = font->msgLength = Randomizer_GetCustomGetItemMessage( if (msgCtx->msgLength = font->msgLength = Randomizer_GetCustomGetItemMessage(
(GetItemID)GET_PLAYER(globalCtx)->getItemId, buffer, maxBufferSize)) { (GetItemID)GET_PLAYER(globalCtx)->getItemId, buffer, maxBufferSize)) {
font->charTexBuf[0] = 0x23; font->charTexBuf[0] = 0x23;
@ -1528,15 +1529,15 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) {
switch (gSaveContext.language) { switch (gSaveContext.language) {
case LANGUAGE_FRA: case LANGUAGE_FRA:
return msgCtx->msgLength = font->msgLength = CopyStringToCharBuffer( return msgCtx->msgLength = font->msgLength = CopyStringToCharBuffer(
"Il n'y a pas de message personnalisé pour cet élément.", buffer, maxBufferSize); "Il n'y a pas de message personnalisé pour cet élément.\x02", buffer, maxBufferSize);
case LANGUAGE_GER: case LANGUAGE_GER:
return msgCtx->msgLength = font->msgLength = CopyStringToCharBuffer( return msgCtx->msgLength = font->msgLength = CopyStringToCharBuffer(
"Für diesen Artikel gibt es keine benutzerdefinierte Nachricht.", buffer, "Für diesen Artikel gibt es keine benutzerdefinierte Nachricht.\x02", buffer,
maxBufferSize); maxBufferSize);
case LANGUAGE_ENG: case LANGUAGE_ENG:
default: default:
return msgCtx->msgLength = font->msgLength = CopyStringToCharBuffer( return msgCtx->msgLength = font->msgLength = CopyStringToCharBuffer(
"There is no custom message for this item.", buffer, maxBufferSize); "There is no custom message for this item.\x02", buffer, maxBufferSize);
} }
} }
} }