mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-02 09:51:44 -04:00
Rename multiple variables in MessageContext (#1837)
* Rename multiple variables in `MessageContext` * Fix errors * Better rename for price fields * Rename two more fields related to number inputs * More renames for text line positioning fields * Fix copy-paste error
This commit is contained in:
@@ -730,9 +730,9 @@ s16 Inventory_GetSkullTokenCount(s16 sceneIndex) {
|
||||
void Inventory_SaveLotteryCodeGuess(PlayState* play) {
|
||||
u16 lotteryCodeGuess;
|
||||
|
||||
lotteryCodeGuess = ((play->msgCtx.unk12054[0] & 0xF) << 8); // First Digit
|
||||
lotteryCodeGuess |= ((play->msgCtx.unk12054[1] & 0xF) << 4); // Second Digit
|
||||
lotteryCodeGuess |= (play->msgCtx.unk12054[2] & 0xF); // Third Digit
|
||||
lotteryCodeGuess = ((play->msgCtx.codeGuessDigits[0] & 0xF) << 8); // First Digit
|
||||
lotteryCodeGuess |= ((play->msgCtx.codeGuessDigits[1] & 0xF) << 4); // Second Digit
|
||||
lotteryCodeGuess |= (play->msgCtx.codeGuessDigits[2] & 0xF); // Third Digit
|
||||
HS_SET_LOTTERY_CODE_GUESS(lotteryCodeGuess);
|
||||
}
|
||||
|
||||
|
||||
+202
-196
@@ -29,9 +29,9 @@ s16 sOcarinaButtonIndexBufLen = 0;
|
||||
s16 sLastPlayedSong = 0xFF;
|
||||
|
||||
#if MM_VERSION >= N64_US
|
||||
#define MSGCTX_UNK120BE msgCtx->unk120BE
|
||||
#define MSGCTX_UNK120C0 msgCtx->unk120C0
|
||||
#define MSGCTX_UNK120C2 msgCtx->unk120C2
|
||||
#define MSGCTX_INPUT_LINE_NUMBER msgCtx->inputLineNumber
|
||||
#define MSGCTX_CODE_BUFFER_OFFSET msgCtx->codeBufOffset
|
||||
#define MSGCTX_INPUT_DIGIT_INDEX msgCtx->inputDigitIndex
|
||||
#define MSGCTX_UNK120C4 msgCtx->unk120C4
|
||||
#define MSGCTX_UNK120C8 msgCtx->unk120C8
|
||||
#define MSGCTX_UNK120CA msgCtx->unk120CA
|
||||
@@ -52,9 +52,9 @@ s16 D_801C1B1C_unknown = 0;
|
||||
s16 D_801C1B20_unknown = 0;
|
||||
s16 D_801C1B24_unknown = 0;
|
||||
|
||||
#define MSGCTX_UNK120BE D_801C1B00_unknown
|
||||
#define MSGCTX_UNK120C0 D_801C1B04_unknown
|
||||
#define MSGCTX_UNK120C2 D_801C1B08_unknown
|
||||
#define MSGCTX_INPUT_LINE_NUMBER D_801C1B00_unknown
|
||||
#define MSGCTX_CODE_BUFFER_OFFSET D_801C1B04_unknown
|
||||
#define MSGCTX_INPUT_DIGIT_INDEX D_801C1B08_unknown
|
||||
#define MSGCTX_UNK120C4 D_801C1B0C_unknown
|
||||
#define MSGCTX_UNK120C8 D_801C1B10_unknown
|
||||
#define MSGCTX_UNK120CA D_801C1B14_unknown
|
||||
@@ -602,34 +602,34 @@ void func_80148D64(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (play->msgCtx.stickAdjY <= -30) {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]--;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] < '0') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '9';
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] < '0') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '9';
|
||||
}
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if (msgCtx->stickAdjY >= 30) {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]++;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] > '9') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '0';
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] > '9') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '0';
|
||||
}
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2++;
|
||||
if (MSGCTX_UNK120C2 > 2) {
|
||||
MSGCTX_UNK120C2 = 2;
|
||||
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX > 2) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 2;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2--;
|
||||
if (MSGCTX_UNK120C2 < 0) {
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -637,33 +637,33 @@ void func_80148D64(PlayState* play) {
|
||||
sAnalogStickHeld = false;
|
||||
}
|
||||
|
||||
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0] - '0') * 100;
|
||||
msgCtx->rupeesSelected += (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + 1] - '0') * 10;
|
||||
msgCtx->rupeesSelected += msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + 2] - '0';
|
||||
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET] - '0') * 100;
|
||||
msgCtx->rupeesSelected += (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + 1] - '0') * 10;
|
||||
msgCtx->rupeesSelected += msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + 2] - '0';
|
||||
}
|
||||
|
||||
void func_80149048(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (msgCtx->stickAdjY <= -30) {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]--;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] < '0') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '9';
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] < '0') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '9';
|
||||
}
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if (msgCtx->stickAdjY >= 30) {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]++;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] > '9') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '0';
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] > '9') {
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '0';
|
||||
}
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
}
|
||||
|
||||
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0] - '0') * 10;
|
||||
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET] - '0') * 10;
|
||||
}
|
||||
|
||||
void func_801491DC(PlayState* play) {
|
||||
@@ -671,36 +671,38 @@ void func_801491DC(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (msgCtx->stickAdjY <= -30) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2]--;
|
||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] <= 0) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 5;
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] <= 0) {
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 5;
|
||||
}
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if (msgCtx->stickAdjY >= 30) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2]++;
|
||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] > 5) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 1;
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] > 5) {
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 1;
|
||||
}
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2++;
|
||||
if (MSGCTX_UNK120C2 > 4) {
|
||||
MSGCTX_UNK120C2 = 4;
|
||||
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX > 4) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 4;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2--;
|
||||
if (MSGCTX_UNK120C2 < 0) {
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -714,36 +716,38 @@ void func_80149454(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (msgCtx->stickAdjY <= -30) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2]--;
|
||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] < 0) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 9;
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] < 0) {
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 9;
|
||||
}
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if (msgCtx->stickAdjY >= 30) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2]++;
|
||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] > 9) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 0;
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] > 9) {
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 0;
|
||||
}
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2++;
|
||||
if (MSGCTX_UNK120C2 > 2) {
|
||||
MSGCTX_UNK120C2 = 2;
|
||||
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX > 2) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 2;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2--;
|
||||
if (MSGCTX_UNK120C2 < 0) {
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -757,36 +761,38 @@ void func_801496C8(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (play->msgCtx.stickAdjY <= -30) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2]--;
|
||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] < 0) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 3;
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] < 0) {
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 3;
|
||||
}
|
||||
msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
||||
Font_LoadChar(play, msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
msgCtx->decodedBuffer.wchar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||
Font_LoadChar(play, msgCtx->decodedBuffer.wchar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if (msgCtx->stickAdjY >= 30) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2]++;
|
||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] >= 4) {
|
||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 0;
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] >= 4) {
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 0;
|
||||
}
|
||||
msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
||||
Font_LoadChar(play, msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
||||
msgCtx->decodedBuffer.wchar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||
Font_LoadChar(play, msgCtx->decodedBuffer.wchar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2++;
|
||||
if (MSGCTX_UNK120C2 > 5) {
|
||||
MSGCTX_UNK120C2 = 5;
|
||||
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX > 5) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 5;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
MSGCTX_UNK120C2--;
|
||||
if (MSGCTX_UNK120C2 < 0) {
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -1152,8 +1158,8 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
|
||||
s16 prevB;
|
||||
u16 lookAheadCharacter;
|
||||
|
||||
play->msgCtx.textPosX = play->msgCtx.unk11F1A[0] + play->msgCtx.unk11FF8;
|
||||
play->msgCtx.textPosY = play->msgCtx.unk11FFA;
|
||||
play->msgCtx.textPosX = play->msgCtx.lineIndent[0] + play->msgCtx.textPosXTarget;
|
||||
play->msgCtx.textPosY = play->msgCtx.textPosYTarget;
|
||||
|
||||
sp130 = 0;
|
||||
if (play->msgCtx.itemId != MESSAGE_ITEM_NONE) {
|
||||
@@ -1248,11 +1254,11 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
|
||||
break;
|
||||
|
||||
case 0xA:
|
||||
msgCtx->textPosY += msgCtx->unk11FFC;
|
||||
msgCtx->textPosY += msgCtx->lineHeight;
|
||||
FALLTHROUGH;
|
||||
case 0xC:
|
||||
sp130++;
|
||||
msgCtx->textPosX = msgCtx->unk11F1A[sp130] + msgCtx->unk11FF8;
|
||||
msgCtx->textPosX = msgCtx->lineIndent[sp130] + msgCtx->textPosXTarget;
|
||||
if (msgCtx->choiceNum == 1) {
|
||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||
msgCtx->textPosX += 32;
|
||||
@@ -1907,48 +1913,48 @@ void Message_LoadItemIcon(PlayState* play, u16 itemId, s16 arg2) {
|
||||
u16* new_var2 = &itemId;
|
||||
|
||||
if (itemId == ITEM_RECOVERY_HEART) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF88[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF88[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 0xA);
|
||||
msgCtx->unk12014 = 0x10;
|
||||
} else if ((itemId >= ITEM_RUPEE_GREEN) && (itemId <= ITEM_RUPEE_HUGE)) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF88[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF88[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 0xA);
|
||||
msgCtx->unk12014 = 0x10;
|
||||
} else if (itemId == ITEM_STRAY_FAIRIES) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 0xA);
|
||||
msgCtx->unk12014 = 0x20;
|
||||
} else if ((itemId >= ITEM_SONG_SONATA) && (itemId <= ITEM_SONG_SUN)) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF88[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF88[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 0xA);
|
||||
msgCtx->unk12014 = 0x10;
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), ITEM_SONG_SONATA, msgCtx->textboxSegment + 0x1000,
|
||||
0x180);
|
||||
} else if (itemId == ITEM_BOMBERS_NOTEBOOK) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 6);
|
||||
msgCtx->unk12014 = 0x20;
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), ITEM_SONG_SONATA, msgCtx->textboxSegment + 0x1000,
|
||||
0x1000);
|
||||
} else if (itemId <= ITEM_REMAINS_TWINMOLD) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 6);
|
||||
msgCtx->unk12014 = 0x20;
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), itemId, msgCtx->textboxSegment + 0x1000, 0x1000);
|
||||
} else if (itemId == ITEM_CC) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 8);
|
||||
msgCtx->unk12014 = 0x20;
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(schedule_dma_static_yar), ITEM_POTION_BLUE, msgCtx->textboxSegment + 0x1000,
|
||||
0x400);
|
||||
} else if (itemId >= ITEM_B8) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF70[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 8);
|
||||
msgCtx->unk12014 = 0x20;
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(schedule_dma_static_yar), (itemId - ITEM_B8), msgCtx->textboxSegment + 0x1000,
|
||||
0x800);
|
||||
} else if (itemId >= ITEM_SKULL_TOKEN) {
|
||||
msgCtx->unk12010 = (msgCtx->unk11FF8 - D_801CFF7C[gSaveContext.options.language]);
|
||||
msgCtx->unk12010 = (msgCtx->textPosXTarget - D_801CFF7C[gSaveContext.options.language]);
|
||||
msgCtx->unk12012 = (arg2 + 0xA);
|
||||
msgCtx->unk12014 = 0x18;
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_24_static_yar), (itemId - ITEM_SKULL_TOKEN),
|
||||
@@ -2043,7 +2049,7 @@ void Message_DecodeHeader(PlayState* play) {
|
||||
font = &msgCtx->font;
|
||||
if (msgCtx->msgBufPos == 0) {
|
||||
if (font->msgBuf.schar[msgCtx->msgBufPos + 2] != 0xFE) {
|
||||
msgCtx->unk11F18 = 0;
|
||||
msgCtx->hasChoices = 0;
|
||||
if ((msgCtx->currentTextId == 0x176F) || (msgCtx->currentTextId == 0x1770) ||
|
||||
(msgCtx->currentTextId == 0x1771)) {
|
||||
msgCtx->itemId = ITEM_OCARINA_OF_TIME;
|
||||
@@ -2063,11 +2069,11 @@ void Message_DecodeHeader(PlayState* play) {
|
||||
msgCtx->nextTextId = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->nextTextId |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
|
||||
msgCtx->unk1206C = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->unk1206C |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
msgCtx->firstChoicePrice = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->firstChoicePrice |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
|
||||
msgCtx->unk12070 = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->unk12070 |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
msgCtx->secondChoicePrice = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->secondChoicePrice |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
|
||||
msgCtx->unk12074 = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->unk12074 |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
@@ -2242,7 +2248,7 @@ void Message_Decode(PlayState* play) {
|
||||
s16 numLines;
|
||||
s16 value;
|
||||
s16 digits[5];
|
||||
s16 spD2;
|
||||
s16 lineNum;
|
||||
f32 timeInSeconds;
|
||||
s32 charTexIndex;
|
||||
u8* fontBuf;
|
||||
@@ -2262,7 +2268,7 @@ void Message_Decode(PlayState* play) {
|
||||
font->unk_11D88 = (font->unk_11D88 ^ 1) & 1;
|
||||
|
||||
if ((gSaveContext.options.language == LANGUAGE_JPN) && !msgCtx->textIsCredits) {
|
||||
spD2 = 0;
|
||||
lineNum = 0;
|
||||
numLines = 0;
|
||||
decodedBufPos = 0;
|
||||
charTexIndex = 0;
|
||||
@@ -2277,18 +2283,18 @@ void Message_Decode(PlayState* play) {
|
||||
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
||||
msgCtx->textDrawPos = 1;
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 6;
|
||||
msgCtx->unk11F1A[spD2] = 0;
|
||||
if (msgCtx->unk11F18 == 0) {
|
||||
msgCtx->unk11F1A[spD2] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) / 2;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 6;
|
||||
msgCtx->lineIndent[lineNum] = 0;
|
||||
if (msgCtx->hasChoices == 0) {
|
||||
msgCtx->lineIndent[lineNum] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) / 2;
|
||||
}
|
||||
spC0 = 0.0f;
|
||||
if (curChar == 0xB) {
|
||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||
if (numLines < 2) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 0x16;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 0x16;
|
||||
} else if (numLines == 2) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 0xE;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 0xE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2296,9 +2302,9 @@ void Message_Decode(PlayState* play) {
|
||||
|
||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||
if (numLines == 0) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 0x16;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 0x16;
|
||||
} else if (numLines == 1) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 0xE;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 0xE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2355,17 +2361,17 @@ void Message_Decode(PlayState* play) {
|
||||
DmaMgr_RequestSync(msgCtx->textboxSegment + 0x1900, SEGMENT_ROM_START(message_texture_static) + 0x900,
|
||||
0x900);
|
||||
numLines = 2;
|
||||
spD2 = 2;
|
||||
lineNum = 2;
|
||||
msgCtx->unk12012 = msgCtx->textboxY + 8;
|
||||
msgCtx->unk11F18 = 1;
|
||||
msgCtx->hasChoices = 1;
|
||||
msgCtx->unk12010 = XREG(47);
|
||||
} else if (curChar == 0x202) {
|
||||
msgCtx->unk11F18 = 1;
|
||||
msgCtx->hasChoices = 1;
|
||||
msgCtx->choiceNum = 2;
|
||||
} else if (curChar == 0x203) {
|
||||
msgCtx->unk11F18 = 1;
|
||||
msgCtx->hasChoices = 1;
|
||||
msgCtx->choiceNum = 3;
|
||||
msgCtx->unk11FF8 += 0x16;
|
||||
msgCtx->textPosXTarget += 0x16;
|
||||
} else if (curChar == 0x204) {
|
||||
Message_GetTimerDigits(((void)0, gSaveContext.timerCurTimes[curChar - 0x204]), spAC);
|
||||
|
||||
@@ -2461,9 +2467,9 @@ void Message_Decode(PlayState* play) {
|
||||
Message_LoadChar(play, 0x9543, &charTexIndex, &spC0, decodedBufPos);
|
||||
} else if (curChar == 0x20C) {
|
||||
decodedBufPos++;
|
||||
MSGCTX_UNK120BE = spD2;
|
||||
MSGCTX_UNK120C0 = decodedBufPos;
|
||||
MSGCTX_UNK120C2 = 2;
|
||||
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 2;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
MSGCTX_UNK120C4 = charTexIndex;
|
||||
digits[0] = digits[1] = digits[2] = 0;
|
||||
@@ -2625,9 +2631,9 @@ void Message_Decode(PlayState* play) {
|
||||
decodedBufPos--;
|
||||
} else if (curChar == 0x220) {
|
||||
decodedBufPos++;
|
||||
MSGCTX_UNK120BE = spD2;
|
||||
MSGCTX_UNK120C0 = decodedBufPos;
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
MSGCTX_UNK120C4 = charTexIndex;
|
||||
digits[0] = digits[1] = digits[2] = 0;
|
||||
@@ -2638,14 +2644,14 @@ void Message_Decode(PlayState* play) {
|
||||
Message_LoadRupeesJPN(play, &decodedBufPos, &charTexIndex, &spC0);
|
||||
} else if (curChar == 0x221) {
|
||||
decodedBufPos++;
|
||||
MSGCTX_UNK120BE = spD2;
|
||||
MSGCTX_UNK120C0 = decodedBufPos;
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
MSGCTX_UNK120C4 = charTexIndex;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
msgCtx->unk12054[i] = 1;
|
||||
msgCtx->codeGuessDigits[i] = 1;
|
||||
Message_LoadChar(play, '1', &charTexIndex, &spC0, decodedBufPos);
|
||||
decodedBufPos++;
|
||||
}
|
||||
@@ -2671,14 +2677,14 @@ void Message_Decode(PlayState* play) {
|
||||
Message_LoadOwlWarpText(play, &charTexIndex, &spC0, &decodedBufPos);
|
||||
} else if (curChar == 0x225) {
|
||||
decodedBufPos++;
|
||||
MSGCTX_UNK120BE = spD2;
|
||||
MSGCTX_UNK120C0 = decodedBufPos;
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
MSGCTX_UNK120C4 = charTexIndex;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
msgCtx->unk12054[i] = 1;
|
||||
msgCtx->codeGuessDigits[i] = 1;
|
||||
Font_LoadChar(play, '1', charTexIndex);
|
||||
charTexIndex += FONT_CHAR_TEX_SIZE;
|
||||
msgCtx->decodedBuffer.wchar[decodedBufPos] = '1';
|
||||
@@ -3055,11 +3061,11 @@ void Message_Decode(PlayState* play) {
|
||||
}
|
||||
msgCtx->msgBufPos++;
|
||||
} else if ((curChar == 0xC) || (curChar == 0xA)) {
|
||||
msgCtx->unk11F1A[spD2] = 0;
|
||||
if (msgCtx->unk11F18 == 0) {
|
||||
msgCtx->unk11F1A[spD2] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) * 0.5f;
|
||||
msgCtx->lineIndent[lineNum] = 0;
|
||||
if (msgCtx->hasChoices == 0) {
|
||||
msgCtx->lineIndent[lineNum] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) * 0.5f;
|
||||
}
|
||||
spD2++;
|
||||
lineNum++;
|
||||
spC0 = 0.0f;
|
||||
if (curChar == 0xA) {
|
||||
numLines++;
|
||||
@@ -3220,28 +3226,28 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
if (play->pauseCtx.bombersNotebookOpen) {
|
||||
if (gSaveContext.options.language == LANGUAGE_JPN) {
|
||||
msgCtx->textCharScale = 1.4f;
|
||||
msgCtx->unk11FFC = 0x1E;
|
||||
msgCtx->unk11FF8 = 0x32;
|
||||
msgCtx->lineHeight = 0x1E;
|
||||
msgCtx->textPosXTarget = 0x32;
|
||||
var_fv0 = 1.4;
|
||||
} else {
|
||||
msgCtx->textCharScale = 1.4f;
|
||||
msgCtx->unk11FFC = 0x16;
|
||||
msgCtx->unk11FF8 = 0x32;
|
||||
msgCtx->lineHeight = 0x16;
|
||||
msgCtx->textPosXTarget = 0x32;
|
||||
var_fv0 = 1.4;
|
||||
}
|
||||
} else if (textId >= 0x4E20) {
|
||||
msgCtx->textIsCredits = true;
|
||||
msgCtx->textCharScale = 0.85f;
|
||||
msgCtx->unk11FFC = 6;
|
||||
msgCtx->unk11FF8 = 0x14;
|
||||
msgCtx->lineHeight = 6;
|
||||
msgCtx->textPosXTarget = 0x14;
|
||||
} else if (gSaveContext.options.language == LANGUAGE_JPN) {
|
||||
msgCtx->textCharScale = 0.88f;
|
||||
msgCtx->unk11FFC = 0x12;
|
||||
msgCtx->unk11FF8 = 0x32;
|
||||
msgCtx->lineHeight = 0x12;
|
||||
msgCtx->textPosXTarget = 0x32;
|
||||
} else {
|
||||
msgCtx->textCharScale = 0.75f;
|
||||
msgCtx->unk11FFC = 0xC;
|
||||
msgCtx->unk11FF8 = 0x41;
|
||||
msgCtx->lineHeight = 0xC;
|
||||
msgCtx->textPosXTarget = 0x41;
|
||||
}
|
||||
|
||||
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
||||
@@ -3274,13 +3280,13 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
msgCtx->msgBufPos = 0;
|
||||
msgCtx->decodedTextLen = 0;
|
||||
|
||||
msgCtx->unk11F08 = font->msgBuf.schar[msgCtx->msgBufPos] << 8;
|
||||
msgCtx->unk11F08 |= font->msgBuf.schar[msgCtx->msgBufPos + 1];
|
||||
msgCtx->textBoxProperties = font->msgBuf.schar[msgCtx->msgBufPos] << 8;
|
||||
msgCtx->textBoxProperties |= font->msgBuf.schar[msgCtx->msgBufPos + 1];
|
||||
|
||||
msgCtx->unk11F18 = (msgCtx->unk11F08 & 0xF000) >> 0xC;
|
||||
msgCtx->textBoxType = (msgCtx->unk11F08 & 0xF00) >> 8;
|
||||
msgCtx->textBoxPos = (msgCtx->unk11F08 & 0xF0) >> 4;
|
||||
msgCtx->unk11F0C = msgCtx->unk11F08 & 0xF;
|
||||
msgCtx->hasChoices = (msgCtx->textBoxProperties & 0xF000) >> 0xC;
|
||||
msgCtx->textBoxType = (msgCtx->textBoxProperties & 0xF00) >> 8;
|
||||
msgCtx->textBoxPos = (msgCtx->textBoxProperties & 0xF0) >> 4;
|
||||
msgCtx->unk11F0C = msgCtx->textBoxProperties & 0xF;
|
||||
|
||||
if ((msgCtx->unk11F0C == 1) || (msgCtx->unk11F0C == 3)) {
|
||||
msgCtx->textUnskippable = true;
|
||||
@@ -3331,12 +3337,12 @@ void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPo
|
||||
|
||||
if (gSaveContext.options.language == LANGUAGE_JPN) {
|
||||
msgCtx->textCharScale = 0.88f;
|
||||
msgCtx->unk11FFC = 0x12;
|
||||
msgCtx->unk11FF8 = 0x32;
|
||||
msgCtx->lineHeight = 0x12;
|
||||
msgCtx->textPosXTarget = 0x32;
|
||||
} else {
|
||||
msgCtx->textCharScale = 0.75f;
|
||||
msgCtx->unk11FFC = 0xC;
|
||||
msgCtx->unk11FF8 = 0x41;
|
||||
msgCtx->lineHeight = 0xC;
|
||||
msgCtx->textPosXTarget = 0x41;
|
||||
}
|
||||
|
||||
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
||||
@@ -3368,11 +3374,11 @@ void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPo
|
||||
msgCtx->textDrawPos = 0;
|
||||
msgCtx->msgBufPos = 0;
|
||||
msgCtx->decodedTextLen = 0;
|
||||
msgCtx->unk11F08 = font->msgBuf.wchar[msgCtx->msgBufPos];
|
||||
msgCtx->unk11F18 = (msgCtx->unk11F08 & 0xF000) >> 0xC;
|
||||
msgCtx->textBoxProperties = font->msgBuf.wchar[msgCtx->msgBufPos];
|
||||
msgCtx->hasChoices = (msgCtx->textBoxProperties & 0xF000) >> 0xC;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_PAUSE_INFO;
|
||||
msgCtx->textBoxPos = textBoxPos;
|
||||
msgCtx->unk11F0C = msgCtx->unk11F08 & 0xF;
|
||||
msgCtx->unk11F0C = msgCtx->textBoxProperties & 0xF;
|
||||
msgCtx->textUnskippable = true;
|
||||
DmaMgr_RequestSync(msgCtx->textboxSegment,
|
||||
SEGMENT_ROM_START(message_static) + (gTextBoxBackgroundTypes[0] * 0x1000), 0x1000);
|
||||
@@ -3454,7 +3460,7 @@ void Message_DisplaySceneTitleCard(PlayState* play, u16 textId) {
|
||||
XREG(75) = 0x1E;
|
||||
XREG(77) = 0x3C;
|
||||
XREG(76) = 0x1C;
|
||||
msgCtx->unk11F1A[0] = msgCtx->unk11F1A[1] = msgCtx->unk11F1A[2] = 0;
|
||||
msgCtx->lineIndent[0] = msgCtx->lineIndent[1] = msgCtx->lineIndent[2] = 0;
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
}
|
||||
}
|
||||
@@ -4178,9 +4184,9 @@ void Message_DrawSceneTitleCard(PlayState* play, Gfx** gfxP) {
|
||||
gDPSetEnvColor(gfx++, 0, 0, 0, 255);
|
||||
|
||||
if ((msgCtx->currentTextId < 0x1BB2) || (msgCtx->currentTextId >= 0x1BB7)) {
|
||||
msgCtx->unk11FF8 = XREG(75);
|
||||
msgCtx->textPosXTarget = XREG(75);
|
||||
}
|
||||
msgCtx->unk11FFA = XREG(74);
|
||||
msgCtx->textPosYTarget = XREG(74);
|
||||
MESSAGE_DRAW_TEXT(play, &gfx, 0);
|
||||
*gfxP = gfx++;
|
||||
}
|
||||
@@ -4247,8 +4253,8 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
|
||||
u16 buttonIndexPos;
|
||||
u8 ocarinaError;
|
||||
s32 j;
|
||||
s16 temp_v0_33;
|
||||
s16 temp;
|
||||
s16 lineNum;
|
||||
s16 inputLineY;
|
||||
|
||||
gfx = *gfxP;
|
||||
|
||||
@@ -5063,51 +5069,51 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
|
||||
case MSGMODE_TEXT_DONE:
|
||||
switch (msgCtx->textboxEndType) {
|
||||
case TEXTBOX_ENDTYPE_INPUT_BANK:
|
||||
temp_v0_33 = MSGCTX_UNK120BE;
|
||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->unk11F1A[temp_v0_33] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 5)) - 1,
|
||||
temp);
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
func_80148D64(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET:
|
||||
temp_v0_33 = MSGCTX_UNK120BE;
|
||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80148558(play, &gfx,
|
||||
msgCtx->unk11F1A[temp_v0_33] + (s32)(16.0f * msgCtx->textCharScale * 5.0f) - 1,
|
||||
temp);
|
||||
msgCtx->lineIndent[lineNum] + (s32)(16.0f * msgCtx->textCharScale * 5.0f) - 1,
|
||||
inputLineY);
|
||||
func_80149048(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE:
|
||||
temp_v0_33 = MSGCTX_UNK120BE;
|
||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->unk11F1A[temp_v0_33] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 5)) - 1,
|
||||
temp);
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
func_801491DC(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE:
|
||||
temp_v0_33 = MSGCTX_UNK120BE;
|
||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->unk11F1A[temp_v0_33] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 5)) - 1,
|
||||
temp);
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
func_80149454(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_64:
|
||||
temp_v0_33 = MSGCTX_UNK120BE;
|
||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->unk11F1A[temp_v0_33] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 4)) - 6,
|
||||
temp);
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 4)) - 6,
|
||||
inputLineY);
|
||||
func_801496C8(play);
|
||||
break;
|
||||
|
||||
@@ -6129,9 +6135,9 @@ void Message_Init(PlayState* play) {
|
||||
msgCtx->ocarinaSongEffectActive = false;
|
||||
|
||||
#if MM_VERSION >= N64_US
|
||||
MSGCTX_UNK120BE = 0;
|
||||
MSGCTX_UNK120C0 = 0;
|
||||
MSGCTX_UNK120C2 = 0;
|
||||
MSGCTX_INPUT_LINE_NUMBER = 0;
|
||||
MSGCTX_CODE_BUFFER_OFFSET = 0;
|
||||
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||
MSGCTX_UNK120C4 = 0;
|
||||
MSGCTX_UNK120C8 = 0;
|
||||
MSGCTX_UNK120CA = 0;
|
||||
|
||||
+54
-54
@@ -424,17 +424,17 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
u16 stateTimerHi;
|
||||
Gfx* gfx = *gfxP;
|
||||
u16 character;
|
||||
s16 sp130;
|
||||
s16 lineNum;
|
||||
s16 prevR;
|
||||
s16 prevG;
|
||||
s16 prevB;
|
||||
|
||||
msgCtx->textPosX = msgCtx->unk11F1A[0] + msgCtx->unk11FF8;
|
||||
msgCtx->textPosY = msgCtx->unk11FFA;
|
||||
msgCtx->textPosX = msgCtx->lineIndent[0] + msgCtx->textPosXTarget;
|
||||
msgCtx->textPosY = msgCtx->textPosYTarget;
|
||||
|
||||
sp130 = 0;
|
||||
lineNum = 0;
|
||||
if (!msgCtx->textIsCredits) {
|
||||
msgCtx->textPosY = msgCtx->unk11FFA;
|
||||
msgCtx->textPosY = msgCtx->textPosYTarget;
|
||||
} else {
|
||||
msgCtx->textPosY = 48;
|
||||
}
|
||||
@@ -536,12 +536,12 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
break;
|
||||
|
||||
case MESSAGE_NEWLINE:
|
||||
msgCtx->textPosY += msgCtx->unk11FFC;
|
||||
msgCtx->textPosY += msgCtx->lineHeight;
|
||||
FALLTHROUGH;
|
||||
case MESSAGE_CARRIAGE_RETURN:
|
||||
sp130++;
|
||||
lineNum++;
|
||||
|
||||
msgCtx->textPosX = msgCtx->unk11F1A[sp130] + msgCtx->unk11FF8;
|
||||
msgCtx->textPosX = msgCtx->lineIndent[lineNum] + msgCtx->textPosXTarget;
|
||||
if (msgCtx->choiceNum == 1) {
|
||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||
msgCtx->textPosX += 16;
|
||||
@@ -549,13 +549,13 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
msgCtx->textPosX += 50;
|
||||
}
|
||||
} else if (msgCtx->choiceNum == 2) {
|
||||
if (msgCtx->unk120D8 != 3) {
|
||||
if (msgCtx->lineCount != 3) {
|
||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||
msgCtx->textPosX += 10;
|
||||
} else {
|
||||
msgCtx->textPosX += 57;
|
||||
}
|
||||
} else if (sp130 >= 2) {
|
||||
} else if (lineNum >= 2) {
|
||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||
msgCtx->textPosX += 10;
|
||||
} else {
|
||||
@@ -746,7 +746,7 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
msgCtx->choiceTextId = msgCtx->currentTextId;
|
||||
msgCtx->stateTimer = 4;
|
||||
Font_LoadMessageBoxEndIcon(font, 2);
|
||||
if (msgCtx->unk120D8 != 3) {
|
||||
if (msgCtx->lineCount != 3) {
|
||||
msgCtx->choicePosY[0] = (s16)(msgCtx->textboxYTarget + 14);
|
||||
msgCtx->choicePosY[1] = (s16)(msgCtx->textboxYTarget + 26);
|
||||
msgCtx->choicePosY[2] = (s16)(msgCtx->textboxYTarget + 38);
|
||||
@@ -761,7 +761,7 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
msgCtx->choiceTextId = msgCtx->currentTextId;
|
||||
msgCtx->stateTimer = 4;
|
||||
Font_LoadMessageBoxEndIcon(font, 2);
|
||||
if (msgCtx->unk120D8 != 3) {
|
||||
if (msgCtx->lineCount != 3) {
|
||||
msgCtx->choicePosY[0] = (s16)(msgCtx->textboxYTarget + 14);
|
||||
msgCtx->choicePosY[1] = (s16)(msgCtx->textboxYTarget + 26);
|
||||
msgCtx->choicePosY[2] = (s16)(msgCtx->textboxYTarget + 38);
|
||||
@@ -934,14 +934,14 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE) && (i >= msgCtx->unk120C0) &&
|
||||
((msgCtx->unk120C0 + 4) >= i)) ||
|
||||
if (((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE) &&
|
||||
(i >= msgCtx->codeBufOffset) && ((msgCtx->codeBufOffset + 4) >= i)) ||
|
||||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE) &&
|
||||
(i >= msgCtx->unk120C0) && ((msgCtx->unk120C0 + 2) >= i)) ||
|
||||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BANK) && (i >= msgCtx->unk120C0) &&
|
||||
((msgCtx->unk120C0 + 2) >= i)) ||
|
||||
(i >= msgCtx->codeBufOffset) && ((msgCtx->codeBufOffset + 2) >= i)) ||
|
||||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BANK) && (i >= msgCtx->codeBufOffset) &&
|
||||
((msgCtx->codeBufOffset + 2) >= i)) ||
|
||||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET) &&
|
||||
(i >= msgCtx->unk120C0) && ((msgCtx->unk120C0 + 1) >= i))) {
|
||||
(i >= msgCtx->codeBufOffset) && ((msgCtx->codeBufOffset + 1) >= i))) {
|
||||
msgCtx->textPosX += (s32)(16.0f * msgCtx->textCharScale);
|
||||
} else {
|
||||
msgCtx->textPosX += (s32)(sNESFontWidths[character - ' '] * msgCtx->textCharScale);
|
||||
@@ -1022,7 +1022,7 @@ void Message_DecodeNES(PlayState* play) {
|
||||
#define numLines (forceLayout.numLines)
|
||||
#define digits (forceLayout.digits)
|
||||
#endif
|
||||
s16 spC6 = 0;
|
||||
s16 lineNum = 0;
|
||||
u16 sfxHi;
|
||||
f32 var_fs0;
|
||||
s32 charTexIndex = 0;
|
||||
@@ -1054,13 +1054,13 @@ void Message_DecodeNES(PlayState* play) {
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
||||
msgCtx->textDrawPos = 1;
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_OCARINA) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 2;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 2;
|
||||
} else {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 8;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 8;
|
||||
}
|
||||
msgCtx->unk11F1A[spC6] = 0;
|
||||
if (msgCtx->unk11F18 != 0) {
|
||||
msgCtx->unk11F1A[spC6] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) / 2;
|
||||
msgCtx->lineIndent[lineNum] = 0;
|
||||
if (msgCtx->hasChoices != 0) {
|
||||
msgCtx->lineIndent[lineNum] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) / 2;
|
||||
}
|
||||
|
||||
spA4 = 0.0f;
|
||||
@@ -1068,21 +1068,21 @@ void Message_DecodeNES(PlayState* play) {
|
||||
if (curChar == MESSAGE_BOX_BREAK2) {
|
||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||
if (numLines < 2) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(10);
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(10);
|
||||
} else if (numLines == 2) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(11);
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(11);
|
||||
} else if (numLines == 3) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(12);
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(12);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||
if (numLines == 0) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(13) + XREG(10);
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(13) + XREG(10);
|
||||
} else if (numLines == 1) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(13) + XREG(11);
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(13) + XREG(11);
|
||||
} else if (numLines == 2) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(13) + XREG(12);
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(13) + XREG(12);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1100,7 +1100,7 @@ void Message_DecodeNES(PlayState* play) {
|
||||
}
|
||||
|
||||
msgCtx->decodedTextLen = decodedBufPos;
|
||||
msgCtx->unk120D8 = numLines;
|
||||
msgCtx->lineCount = numLines;
|
||||
if (msgCtx->textboxSkipped || (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) ||
|
||||
(msgCtx->textBoxType == TEXTBOX_TYPE_OCARINA) || (msgCtx->textBoxType == TEXTBOX_TYPE_DISPLAY_ALL) ||
|
||||
(msgCtx->textBoxType == TEXTBOX_TYPE_BLUE) || (msgCtx->textBoxType == TEXTBOX_TYPE_PAUSE_INFO) ||
|
||||
@@ -1151,17 +1151,17 @@ void Message_DecodeNES(PlayState* play) {
|
||||
DmaMgr_RequestSync(msgCtx->textboxSegment + 0x1900, SEGMENT_ROM_START(message_texture_static) + 0x900,
|
||||
0x900);
|
||||
numLines = 2;
|
||||
spC6 = 2;
|
||||
lineNum = 2;
|
||||
msgCtx->unk12012 = msgCtx->textboxY + 8;
|
||||
msgCtx->unk11F18 = 1;
|
||||
msgCtx->hasChoices = 1;
|
||||
msgCtx->unk12010 = XREG(47);
|
||||
} else if (curChar == MESSAGE_TWO_CHOICE) {
|
||||
msgCtx->unk11F18 = 0;
|
||||
msgCtx->hasChoices = 0;
|
||||
msgCtx->choiceNum = 2;
|
||||
} else if (curChar == MESSAGE_THREE_CHOICE) {
|
||||
msgCtx->unk11F18 = 0;
|
||||
msgCtx->hasChoices = 0;
|
||||
msgCtx->choiceNum = 3;
|
||||
msgCtx->unk11FF8 += 22;
|
||||
msgCtx->textPosXTarget += 22;
|
||||
} else if (curChar == MESSAGE_TIMER_POSTMAN) {
|
||||
Message_GetTimerDigitsNES(((void)0, gSaveContext.timerCurTimes[curChar - MESSAGE_TIMER_POSTMAN]), spA8);
|
||||
|
||||
@@ -1257,9 +1257,9 @@ void Message_DecodeNES(PlayState* play) {
|
||||
decodedBufPos--;
|
||||
} else if (curChar == MESSAGE_INPUT_BANK) {
|
||||
decodedBufPos++;
|
||||
msgCtx->unk120BE = spC6;
|
||||
msgCtx->unk120C0 = decodedBufPos;
|
||||
msgCtx->unk120C2 = 2;
|
||||
msgCtx->inputLineNumber = lineNum;
|
||||
msgCtx->codeBufOffset = decodedBufPos;
|
||||
msgCtx->inputDigitIndex = 2;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
msgCtx->unk120C4 = charTexIndex;
|
||||
digits[0] = digits[1] = digits[2] = 0;
|
||||
@@ -1466,9 +1466,9 @@ void Message_DecodeNES(PlayState* play) {
|
||||
decodedBufPos--;
|
||||
} else if (curChar == MESSAGE_INPUT_DOGGY_RACETRACK_BET) {
|
||||
decodedBufPos++;
|
||||
msgCtx->unk120BE = spC6;
|
||||
msgCtx->unk120C0 = decodedBufPos;
|
||||
msgCtx->unk120C2 = 0;
|
||||
msgCtx->inputLineNumber = lineNum;
|
||||
msgCtx->codeBufOffset = decodedBufPos;
|
||||
msgCtx->inputDigitIndex = 0;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
msgCtx->unk120C4 = charTexIndex;
|
||||
digits[0] = digits[1] = digits[2] = 0;
|
||||
@@ -1479,14 +1479,14 @@ void Message_DecodeNES(PlayState* play) {
|
||||
Message_LoadPluralRupeesNES(play, &decodedBufPos, &charTexIndex, &spA4);
|
||||
} else if (curChar == MESSAGE_INPUT_BOMBER_CODE) {
|
||||
decodedBufPos++;
|
||||
msgCtx->unk120BE = spC6;
|
||||
msgCtx->unk120C0 = decodedBufPos;
|
||||
msgCtx->unk120C2 = 0;
|
||||
msgCtx->inputLineNumber = lineNum;
|
||||
msgCtx->codeBufOffset = decodedBufPos;
|
||||
msgCtx->inputDigitIndex = 0;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
msgCtx->unk120C4 = charTexIndex;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
msgCtx->unk12054[i] = 1;
|
||||
msgCtx->codeGuessDigits[i] = 1;
|
||||
Message_LoadCharNES(play, '1', &charTexIndex, &spA4, decodedBufPos);
|
||||
decodedBufPos++;
|
||||
}
|
||||
@@ -1512,14 +1512,14 @@ void Message_DecodeNES(PlayState* play) {
|
||||
Message_LoadOwlWarpTextNES(play, &charTexIndex, &spA4, &decodedBufPos);
|
||||
} else if (curChar == MESSAGE_INPUT_LOTTERY_CODE) {
|
||||
decodedBufPos++;
|
||||
msgCtx->unk120BE = spC6;
|
||||
msgCtx->unk120C0 = decodedBufPos;
|
||||
msgCtx->unk120C2 = 0;
|
||||
msgCtx->inputLineNumber = lineNum;
|
||||
msgCtx->codeBufOffset = decodedBufPos;
|
||||
msgCtx->inputDigitIndex = 0;
|
||||
msgCtx->rupeesSelected = 0;
|
||||
msgCtx->unk120C4 = charTexIndex;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
msgCtx->unk12054[i] = 1;
|
||||
msgCtx->codeGuessDigits[i] = 1;
|
||||
Font_LoadCharNES(play, '1', charTexIndex);
|
||||
charTexIndex += FONT_CHAR_TEX_SIZE;
|
||||
msgCtx->decodedBuffer.schar[decodedBufPos] = '1';
|
||||
@@ -1913,11 +1913,11 @@ void Message_DecodeNES(PlayState* play) {
|
||||
}
|
||||
msgCtx->msgBufPos++;
|
||||
} else if ((curChar == MESSAGE_CARRIAGE_RETURN) || (curChar == MESSAGE_NEWLINE)) {
|
||||
msgCtx->unk11F1A[spC6] = 0;
|
||||
if (msgCtx->unk11F18 != 0) {
|
||||
msgCtx->unk11F1A[spC6] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) * 0.5f;
|
||||
msgCtx->lineIndent[lineNum] = 0;
|
||||
if (msgCtx->hasChoices != 0) {
|
||||
msgCtx->lineIndent[lineNum] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) * 0.5f;
|
||||
}
|
||||
spC6++;
|
||||
lineNum++;
|
||||
spA4 = 0.0f;
|
||||
if (curChar == MESSAGE_NEWLINE) {
|
||||
numLines++;
|
||||
|
||||
@@ -48,10 +48,10 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
|
||||
Font* font = &msgCtx->font;
|
||||
Gfx* gfx = *gfxP;
|
||||
|
||||
msgCtx->textPosX = msgCtx->unk11FF8;
|
||||
msgCtx->textPosX = msgCtx->textPosXTarget;
|
||||
|
||||
if (!msgCtx->textIsCredits) {
|
||||
msgCtx->textPosY = msgCtx->unk11FFA;
|
||||
msgCtx->textPosY = msgCtx->textPosYTarget;
|
||||
} else {
|
||||
msgCtx->textPosY = 48;
|
||||
}
|
||||
@@ -69,14 +69,14 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
|
||||
|
||||
switch (character) {
|
||||
case MESSAGE_NEWLINE:
|
||||
msgCtx->textPosX = msgCtx->unk11FF8;
|
||||
msgCtx->textPosX = msgCtx->textPosXTarget;
|
||||
if ((msgCtx->choiceNum == 1) || (msgCtx->choiceNum == 3)) {
|
||||
msgCtx->textPosX += 32;
|
||||
}
|
||||
if ((msgCtx->choiceNum == 2) && (msgCtx->textPosY != msgCtx->unk11FFA)) {
|
||||
if ((msgCtx->choiceNum == 2) && (msgCtx->textPosY != msgCtx->textPosYTarget)) {
|
||||
msgCtx->textPosX += 32;
|
||||
}
|
||||
msgCtx->textPosY += msgCtx->unk11FFC;
|
||||
msgCtx->textPosY += msgCtx->lineHeight;
|
||||
break;
|
||||
|
||||
case MESSAGE_COLOR:
|
||||
@@ -356,15 +356,15 @@ void Message_DecodeCredits(PlayState* play) {
|
||||
// Textbox decoding ends with any of the above text control characters
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
||||
msgCtx->textDrawPos = 1;
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 8;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 8;
|
||||
|
||||
if (msgCtx->textBoxType != TEXTBOX_TYPE_4) {
|
||||
if (numLines == 0) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 26;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 26;
|
||||
} else if (numLines == 1) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 20;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 20;
|
||||
} else if (numLines == 2) {
|
||||
msgCtx->unk11FFA = msgCtx->textboxY + 16;
|
||||
msgCtx->textPosYTarget = msgCtx->textboxY + 16;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user