1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-14 20:05:02 +00:00

[ntsc-1.0/1.1] Match "game engine" files (#2244)

* [ntsc-1.0/1.1] Match "game engine" files

* Use R_START_BTN_X/R_START_BTN_Y

* Comment obvious bugs

* Move Magic_Fill comments

* Move EVENTINF_HORSES_INDEX printf inside #if

* Replace "this function"
This commit is contained in:
cadmic 2024-09-30 12:52:38 -07:00 committed by GitHub
parent 80ed596c56
commit bdc11c2894
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 174 additions and 25 deletions

View file

@ -2074,8 +2074,9 @@ void Message_Decode(PlayState* play) {
decodedBufPos++;
msgCtx->msgBufPos++;
}
} else {
} else
#endif
{
// English text for NTSC, eng/ger/fra text for PAL
while (true) {
curChar = msgCtx->msgBufDecoded[decodedBufPos] = font->msgBuf[msgCtx->msgBufPos];
@ -2397,8 +2398,15 @@ void Message_Decode(PlayState* play) {
Message_LoadItemIcon(play, font->msgBuf[msgCtx->msgBufPos + 1], R_TEXTBOX_Y + 10);
} else if (curChar == MESSAGE_BACKGROUND) {
msgCtx->textboxBackgroundIdx = font->msgBuf[msgCtx->msgBufPos + 1] * 2;
#if OOT_VERSION < PAL_1_0
//! @bug Wrong shift amounts cause textboxBackgroundForeColorIdx and textboxBackgroundBackColorIdx
//! to always be 0. Fortunately MESSAGE_BACKGROUND is only present in unused messages.
msgCtx->textboxBackgroundForeColorIdx = (font->msgBuf[msgCtx->msgBufPos + 2] & 0xF0) >> 12;
msgCtx->textboxBackgroundBackColorIdx = (font->msgBuf[msgCtx->msgBufPos + 2] & 0xF) >> 8;
#else
msgCtx->textboxBackgroundForeColorIdx = (font->msgBuf[msgCtx->msgBufPos + 2] & 0xF0) >> 4;
msgCtx->textboxBackgroundBackColorIdx = font->msgBuf[msgCtx->msgBufPos + 2] & 0xF;
#endif
msgCtx->textboxBackgroundYOffsetIdx = (font->msgBuf[msgCtx->msgBufPos + 3] & 0xF0) >> 4;
msgCtx->textboxBackgroundUnkArg = font->msgBuf[msgCtx->msgBufPos + 3] & 0xF;
DMA_REQUEST_SYNC(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
@ -2448,9 +2456,7 @@ void Message_Decode(PlayState* play) {
decodedBufPos++;
msgCtx->msgBufPos++;
}
#if OOT_NTSC
}
#endif
}
void Message_OpenText(PlayState* play, u16 textId) {
@ -3062,9 +3068,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (msgCtx->ocarinaStaff->pos) {
PRINTF("locate=%d onpu_pt=%d\n", msgCtx->ocarinaStaff->pos, sOcarinaButtonIndexBufPos);
#if OOT_VERSION >= PAL_1_0
if (msgCtx->ocarinaStaff->pos == 1 && sOcarinaButtonIndexBufPos == 8) {
sOcarinaButtonIndexBufPos = 0;
}
#endif
if (sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
msgCtx->lastOcarinaButtonIndex = sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] =
msgCtx->ocarinaStaff->buttonIndex;