mirror of https://github.com/zeldaret/mm
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:
parent
18a8a1bea7
commit
311cdd9db0
|
|
@ -123,8 +123,8 @@
|
||||||
{ __VA_ARGS__ END }
|
{ __VA_ARGS__ END }
|
||||||
|
|
||||||
// Not a control command, used to define the data that begins every message
|
// Not a control command, used to define the data that begins every message
|
||||||
#define HEADER(unk11F08, itemId, nextTextId, unk1206C, unk12070, unk12074) \
|
#define HEADER(textBoxProperties, itemId, nextTextId, firstChoicePrice, secondChoicePrice, unk12074) \
|
||||||
ARG2(unk11F08) ARG1(itemId) ARG2(nextTextId) ARG2(unk1206C) ARG2(unk12070) ARG2(unk12074)
|
ARG2(textBoxProperties) ARG1(itemId) ARG2(nextTextId) ARG2(firstChoicePrice) ARG2(secondChoicePrice) ARG2(unk12074)
|
||||||
|
|
||||||
#define COLOR_DEFAULT CTRL_BASE(COLOR_DEFAULT)
|
#define COLOR_DEFAULT CTRL_BASE(COLOR_DEFAULT)
|
||||||
#define COLOR_RED CTRL_BASE(COLOR_RED)
|
#define COLOR_RED CTRL_BASE(COLOR_RED)
|
||||||
|
|
|
||||||
|
|
@ -197,15 +197,15 @@ typedef struct MessageContext {
|
||||||
/* 0x11F00 */ struct OcarinaStaff* ocarinaStaff;
|
/* 0x11F00 */ struct OcarinaStaff* ocarinaStaff;
|
||||||
/* 0x11F04 */ u16 currentTextId;
|
/* 0x11F04 */ u16 currentTextId;
|
||||||
/* 0x11F06 */ u16 choiceTextId; // s16?
|
/* 0x11F06 */ u16 choiceTextId; // s16?
|
||||||
/* 0x11F08 */ u16 unk11F08;
|
/* 0x11F08 */ u16 textBoxProperties;
|
||||||
/* 0x11F0A */ u8 textBoxType;
|
/* 0x11F0A */ u8 textBoxType;
|
||||||
/* 0x11F0B */ u8 textBoxPos;
|
/* 0x11F0B */ u8 textBoxPos;
|
||||||
/* 0x11F0C */ u8 unk11F0C;
|
/* 0x11F0C */ u8 unk11F0C;
|
||||||
/* 0x11F10 */ s32 msgLength;
|
/* 0x11F10 */ s32 msgLength;
|
||||||
/* 0x11F14 */ u16 nextTextId;
|
/* 0x11F14 */ u16 nextTextId;
|
||||||
/* 0x11F16 */ u16 itemId;
|
/* 0x11F16 */ u16 itemId;
|
||||||
/* 0x11F18 */ u8 unk11F18;
|
/* 0x11F18 */ u8 hasChoices;
|
||||||
/* 0x11F1A */ s16 unk11F1A[3];
|
/* 0x11F1A */ s16 lineIndent[3];
|
||||||
/* 0x11F20 */ UNK_TYPE1 unk11F20[0x2];
|
/* 0x11F20 */ UNK_TYPE1 unk11F20[0x2];
|
||||||
/* 0x11F22 */ u8 msgMode;
|
/* 0x11F22 */ u8 msgMode;
|
||||||
/* 0x11F23 */ UNK_TYPE1 unk11F23;
|
/* 0x11F23 */ UNK_TYPE1 unk11F23;
|
||||||
|
|
@ -219,9 +219,9 @@ typedef struct MessageContext {
|
||||||
/* 0x11FF2 */ u16 textUnskippable;
|
/* 0x11FF2 */ u16 textUnskippable;
|
||||||
/* 0x11FF4 */ s16 textPosX;
|
/* 0x11FF4 */ s16 textPosX;
|
||||||
/* 0x11FF6 */ s16 textPosY;
|
/* 0x11FF6 */ s16 textPosY;
|
||||||
/* 0x11FF8 */ s16 unk11FF8;
|
/* 0x11FF8 */ s16 textPosXTarget;
|
||||||
/* 0x11FFA */ s16 unk11FFA;
|
/* 0x11FFA */ s16 textPosYTarget;
|
||||||
/* 0x11FFC */ s16 unk11FFC;
|
/* 0x11FFC */ s16 lineHeight;
|
||||||
/* 0x11FFE */ s16 choicePosY[0x3];
|
/* 0x11FFE */ s16 choicePosY[0x3];
|
||||||
/* 0x12004 */ s16 textboxXTarget;
|
/* 0x12004 */ s16 textboxXTarget;
|
||||||
/* 0x12006 */ s16 textboxYTarget;
|
/* 0x12006 */ s16 textboxYTarget;
|
||||||
|
|
@ -260,12 +260,12 @@ typedef struct MessageContext {
|
||||||
/* 0x12046 */ s16 blockSunsSong;
|
/* 0x12046 */ s16 blockSunsSong;
|
||||||
/* 0x12048 */ u8 ocarinaButtonIndex;
|
/* 0x12048 */ u8 ocarinaButtonIndex;
|
||||||
/* 0x1204A */ s16 ocarinaButtonsPosY[5];
|
/* 0x1204A */ s16 ocarinaButtonsPosY[5];
|
||||||
/* 0x12054 */ s16 unk12054[6]; // First, second and third digits in lottery code guess
|
/* 0x12054 */ s16 codeGuessDigits[6];
|
||||||
/* 0x1205A */ UNK_TYPE1 unk12060[0x8];
|
/* 0x1205A */ UNK_TYPE1 unk12060[0x8];
|
||||||
/* 0x12068 */ s16 textboxX;
|
/* 0x12068 */ s16 textboxX;
|
||||||
/* 0x1206A */ s16 textboxY;
|
/* 0x1206A */ s16 textboxY;
|
||||||
/* 0x1206C */ s32 unk1206C;
|
/* 0x1206C */ s32 firstChoicePrice;
|
||||||
/* 0x12070 */ s32 unk12070;
|
/* 0x12070 */ s32 secondChoicePrice;
|
||||||
/* 0x12074 */ s32 unk12074;
|
/* 0x12074 */ s32 unk12074;
|
||||||
/* 0x12078 */ s32 rupeesSelected; // Used for bank and doggy racetrack bet
|
/* 0x12078 */ s32 rupeesSelected; // Used for bank and doggy racetrack bet
|
||||||
/* 0x1207C */ s32 rupeesTotal; // Used for bank and doggy racetrack bet
|
/* 0x1207C */ s32 rupeesTotal; // Used for bank and doggy racetrack bet
|
||||||
|
|
@ -292,9 +292,9 @@ typedef struct MessageContext {
|
||||||
/* 0x120B2 */ u8 bombersNotebookEventQueue[10];
|
/* 0x120B2 */ u8 bombersNotebookEventQueue[10];
|
||||||
/* 0x120BC */ u16 hudVisibility;
|
/* 0x120BC */ u16 hudVisibility;
|
||||||
#if MM_VERSION >= N64_US
|
#if MM_VERSION >= N64_US
|
||||||
/* 0x120BE */ s16 unk120BE;
|
/* 0x120BE */ s16 inputLineNumber;
|
||||||
/* 0x120C0 */ s16 unk120C0;
|
/* 0x120C0 */ s16 codeBufOffset;
|
||||||
/* 0x120C2 */ s16 unk120C2;
|
/* 0x120C2 */ s16 inputDigitIndex;
|
||||||
/* 0x120C4 */ s32 unk120C4;
|
/* 0x120C4 */ s32 unk120C4;
|
||||||
/* 0x120C8 */ s16 unk120C8;
|
/* 0x120C8 */ s16 unk120C8;
|
||||||
/* 0x120CA */ s16 unk120CA;
|
/* 0x120CA */ s16 unk120CA;
|
||||||
|
|
@ -304,7 +304,7 @@ typedef struct MessageContext {
|
||||||
/* 0x120D2 */ s16 unk120D2;
|
/* 0x120D2 */ s16 unk120D2;
|
||||||
/* 0x120D4 */ s16 unk120D4;
|
/* 0x120D4 */ s16 unk120D4;
|
||||||
/* 0x120D6 */ s16 unk120D6;
|
/* 0x120D6 */ s16 unk120D6;
|
||||||
/* 0x120D8 */ s16 unk120D8;
|
/* 0x120D8 */ s16 lineCount;
|
||||||
/* 0x120DA */ UNK_TYPE1 unk_120DA[0x6];
|
/* 0x120DA */ UNK_TYPE1 unk_120DA[0x6];
|
||||||
#endif
|
#endif
|
||||||
} MessageContext; // size = 0x120E0
|
} MessageContext; // size = 0x120E0
|
||||||
|
|
|
||||||
|
|
@ -730,9 +730,9 @@ s16 Inventory_GetSkullTokenCount(s16 sceneIndex) {
|
||||||
void Inventory_SaveLotteryCodeGuess(PlayState* play) {
|
void Inventory_SaveLotteryCodeGuess(PlayState* play) {
|
||||||
u16 lotteryCodeGuess;
|
u16 lotteryCodeGuess;
|
||||||
|
|
||||||
lotteryCodeGuess = ((play->msgCtx.unk12054[0] & 0xF) << 8); // First Digit
|
lotteryCodeGuess = ((play->msgCtx.codeGuessDigits[0] & 0xF) << 8); // First Digit
|
||||||
lotteryCodeGuess |= ((play->msgCtx.unk12054[1] & 0xF) << 4); // Second Digit
|
lotteryCodeGuess |= ((play->msgCtx.codeGuessDigits[1] & 0xF) << 4); // Second Digit
|
||||||
lotteryCodeGuess |= (play->msgCtx.unk12054[2] & 0xF); // Third Digit
|
lotteryCodeGuess |= (play->msgCtx.codeGuessDigits[2] & 0xF); // Third Digit
|
||||||
HS_SET_LOTTERY_CODE_GUESS(lotteryCodeGuess);
|
HS_SET_LOTTERY_CODE_GUESS(lotteryCodeGuess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,9 @@ s16 sOcarinaButtonIndexBufLen = 0;
|
||||||
s16 sLastPlayedSong = 0xFF;
|
s16 sLastPlayedSong = 0xFF;
|
||||||
|
|
||||||
#if MM_VERSION >= N64_US
|
#if MM_VERSION >= N64_US
|
||||||
#define MSGCTX_UNK120BE msgCtx->unk120BE
|
#define MSGCTX_INPUT_LINE_NUMBER msgCtx->inputLineNumber
|
||||||
#define MSGCTX_UNK120C0 msgCtx->unk120C0
|
#define MSGCTX_CODE_BUFFER_OFFSET msgCtx->codeBufOffset
|
||||||
#define MSGCTX_UNK120C2 msgCtx->unk120C2
|
#define MSGCTX_INPUT_DIGIT_INDEX msgCtx->inputDigitIndex
|
||||||
#define MSGCTX_UNK120C4 msgCtx->unk120C4
|
#define MSGCTX_UNK120C4 msgCtx->unk120C4
|
||||||
#define MSGCTX_UNK120C8 msgCtx->unk120C8
|
#define MSGCTX_UNK120C8 msgCtx->unk120C8
|
||||||
#define MSGCTX_UNK120CA msgCtx->unk120CA
|
#define MSGCTX_UNK120CA msgCtx->unk120CA
|
||||||
|
|
@ -52,9 +52,9 @@ s16 D_801C1B1C_unknown = 0;
|
||||||
s16 D_801C1B20_unknown = 0;
|
s16 D_801C1B20_unknown = 0;
|
||||||
s16 D_801C1B24_unknown = 0;
|
s16 D_801C1B24_unknown = 0;
|
||||||
|
|
||||||
#define MSGCTX_UNK120BE D_801C1B00_unknown
|
#define MSGCTX_INPUT_LINE_NUMBER D_801C1B00_unknown
|
||||||
#define MSGCTX_UNK120C0 D_801C1B04_unknown
|
#define MSGCTX_CODE_BUFFER_OFFSET D_801C1B04_unknown
|
||||||
#define MSGCTX_UNK120C2 D_801C1B08_unknown
|
#define MSGCTX_INPUT_DIGIT_INDEX D_801C1B08_unknown
|
||||||
#define MSGCTX_UNK120C4 D_801C1B0C_unknown
|
#define MSGCTX_UNK120C4 D_801C1B0C_unknown
|
||||||
#define MSGCTX_UNK120C8 D_801C1B10_unknown
|
#define MSGCTX_UNK120C8 D_801C1B10_unknown
|
||||||
#define MSGCTX_UNK120CA D_801C1B14_unknown
|
#define MSGCTX_UNK120CA D_801C1B14_unknown
|
||||||
|
|
@ -602,34 +602,34 @@ void func_80148D64(PlayState* play) {
|
||||||
MessageContext* msgCtx = &play->msgCtx;
|
MessageContext* msgCtx = &play->msgCtx;
|
||||||
|
|
||||||
if (play->msgCtx.stickAdjY <= -30) {
|
if (play->msgCtx.stickAdjY <= -30) {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]--;
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] < '0') {
|
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] < '0') {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '9';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '9';
|
||||||
}
|
}
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if (msgCtx->stickAdjY >= 30) {
|
} else if (msgCtx->stickAdjY >= 30) {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]++;
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] > '9') {
|
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] > '9') {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '0';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '0';
|
||||||
}
|
}
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2++;
|
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||||
if (MSGCTX_UNK120C2 > 2) {
|
if (MSGCTX_INPUT_DIGIT_INDEX > 2) {
|
||||||
MSGCTX_UNK120C2 = 2;
|
MSGCTX_INPUT_DIGIT_INDEX = 2;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2--;
|
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||||
if (MSGCTX_UNK120C2 < 0) {
|
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
|
|
@ -637,33 +637,33 @@ void func_80148D64(PlayState* play) {
|
||||||
sAnalogStickHeld = false;
|
sAnalogStickHeld = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0] - '0') * 100;
|
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET] - '0') * 100;
|
||||||
msgCtx->rupeesSelected += (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + 1] - '0') * 10;
|
msgCtx->rupeesSelected += (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + 1] - '0') * 10;
|
||||||
msgCtx->rupeesSelected += msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + 2] - '0';
|
msgCtx->rupeesSelected += msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + 2] - '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80149048(PlayState* play) {
|
void func_80149048(PlayState* play) {
|
||||||
MessageContext* msgCtx = &play->msgCtx;
|
MessageContext* msgCtx = &play->msgCtx;
|
||||||
|
|
||||||
if (msgCtx->stickAdjY <= -30) {
|
if (msgCtx->stickAdjY <= -30) {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]--;
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] < '0') {
|
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] < '0') {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '9';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '9';
|
||||||
}
|
}
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if (msgCtx->stickAdjY >= 30) {
|
} else if (msgCtx->stickAdjY >= 30) {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2]++;
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||||
if (msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] > '9') {
|
if (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] > '9') {
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = '0';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] = '0';
|
||||||
}
|
}
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX],
|
||||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
MSGCTX_UNK120C4 + (MSGCTX_INPUT_DIGIT_INDEX << 7));
|
||||||
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
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) {
|
void func_801491DC(PlayState* play) {
|
||||||
|
|
@ -671,36 +671,38 @@ void func_801491DC(PlayState* play) {
|
||||||
MessageContext* msgCtx = &play->msgCtx;
|
MessageContext* msgCtx = &play->msgCtx;
|
||||||
|
|
||||||
if (msgCtx->stickAdjY <= -30) {
|
if (msgCtx->stickAdjY <= -30) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2]--;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] <= 0) {
|
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] <= 0) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 5;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 5;
|
||||||
}
|
}
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||||
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);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if (msgCtx->stickAdjY >= 30) {
|
} else if (msgCtx->stickAdjY >= 30) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2]++;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] > 5) {
|
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] > 5) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 1;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 1;
|
||||||
}
|
}
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||||
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);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2++;
|
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||||
if (MSGCTX_UNK120C2 > 4) {
|
if (MSGCTX_INPUT_DIGIT_INDEX > 4) {
|
||||||
MSGCTX_UNK120C2 = 4;
|
MSGCTX_INPUT_DIGIT_INDEX = 4;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2--;
|
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||||
if (MSGCTX_UNK120C2 < 0) {
|
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
|
|
@ -714,36 +716,38 @@ void func_80149454(PlayState* play) {
|
||||||
MessageContext* msgCtx = &play->msgCtx;
|
MessageContext* msgCtx = &play->msgCtx;
|
||||||
|
|
||||||
if (msgCtx->stickAdjY <= -30) {
|
if (msgCtx->stickAdjY <= -30) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2]--;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] < 0) {
|
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] < 0) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 9;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 9;
|
||||||
}
|
}
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||||
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);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if (msgCtx->stickAdjY >= 30) {
|
} else if (msgCtx->stickAdjY >= 30) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2]++;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] > 9) {
|
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] > 9) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 0;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 0;
|
||||||
}
|
}
|
||||||
msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||||
Font_LoadCharNES(play, msgCtx->decodedBuffer.schar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||||
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);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2++;
|
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||||
if (MSGCTX_UNK120C2 > 2) {
|
if (MSGCTX_INPUT_DIGIT_INDEX > 2) {
|
||||||
MSGCTX_UNK120C2 = 2;
|
MSGCTX_INPUT_DIGIT_INDEX = 2;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2--;
|
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||||
if (MSGCTX_UNK120C2 < 0) {
|
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
|
|
@ -757,36 +761,38 @@ void func_801496C8(PlayState* play) {
|
||||||
MessageContext* msgCtx = &play->msgCtx;
|
MessageContext* msgCtx = &play->msgCtx;
|
||||||
|
|
||||||
if (play->msgCtx.stickAdjY <= -30) {
|
if (play->msgCtx.stickAdjY <= -30) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2]--;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]--;
|
||||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] < 0) {
|
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] < 0) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 3;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 3;
|
||||||
}
|
}
|
||||||
msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
msgCtx->decodedBuffer.wchar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||||
Font_LoadChar(play, msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
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);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if (msgCtx->stickAdjY >= 30) {
|
} else if (msgCtx->stickAdjY >= 30) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2]++;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX]++;
|
||||||
if (msgCtx->unk12054[MSGCTX_UNK120C2] >= 4) {
|
if (msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] >= 4) {
|
||||||
msgCtx->unk12054[MSGCTX_UNK120C2] = 0;
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] = 0;
|
||||||
}
|
}
|
||||||
msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2] = msgCtx->unk12054[MSGCTX_UNK120C2] + '0';
|
msgCtx->decodedBuffer.wchar[MSGCTX_CODE_BUFFER_OFFSET + MSGCTX_INPUT_DIGIT_INDEX] =
|
||||||
Font_LoadChar(play, msgCtx->decodedBuffer.wchar[MSGCTX_UNK120C0 + MSGCTX_UNK120C2],
|
msgCtx->codeGuessDigits[MSGCTX_INPUT_DIGIT_INDEX] + '0';
|
||||||
MSGCTX_UNK120C4 + (MSGCTX_UNK120C2 << 7));
|
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);
|
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
|
||||||
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX >= 30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2++;
|
MSGCTX_INPUT_DIGIT_INDEX++;
|
||||||
if (MSGCTX_UNK120C2 > 5) {
|
if (MSGCTX_INPUT_DIGIT_INDEX > 5) {
|
||||||
MSGCTX_UNK120C2 = 5;
|
MSGCTX_INPUT_DIGIT_INDEX = 5;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
} else if ((msgCtx->stickAdjX <= -30) && !sAnalogStickHeld) {
|
||||||
sAnalogStickHeld = true;
|
sAnalogStickHeld = true;
|
||||||
MSGCTX_UNK120C2--;
|
MSGCTX_INPUT_DIGIT_INDEX--;
|
||||||
if (MSGCTX_UNK120C2 < 0) {
|
if (MSGCTX_INPUT_DIGIT_INDEX < 0) {
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||||
}
|
}
|
||||||
|
|
@ -1152,8 +1158,8 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
|
||||||
s16 prevB;
|
s16 prevB;
|
||||||
u16 lookAheadCharacter;
|
u16 lookAheadCharacter;
|
||||||
|
|
||||||
play->msgCtx.textPosX = play->msgCtx.unk11F1A[0] + play->msgCtx.unk11FF8;
|
play->msgCtx.textPosX = play->msgCtx.lineIndent[0] + play->msgCtx.textPosXTarget;
|
||||||
play->msgCtx.textPosY = play->msgCtx.unk11FFA;
|
play->msgCtx.textPosY = play->msgCtx.textPosYTarget;
|
||||||
|
|
||||||
sp130 = 0;
|
sp130 = 0;
|
||||||
if (play->msgCtx.itemId != MESSAGE_ITEM_NONE) {
|
if (play->msgCtx.itemId != MESSAGE_ITEM_NONE) {
|
||||||
|
|
@ -1248,11 +1254,11 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xA:
|
case 0xA:
|
||||||
msgCtx->textPosY += msgCtx->unk11FFC;
|
msgCtx->textPosY += msgCtx->lineHeight;
|
||||||
FALLTHROUGH;
|
FALLTHROUGH;
|
||||||
case 0xC:
|
case 0xC:
|
||||||
sp130++;
|
sp130++;
|
||||||
msgCtx->textPosX = msgCtx->unk11F1A[sp130] + msgCtx->unk11FF8;
|
msgCtx->textPosX = msgCtx->lineIndent[sp130] + msgCtx->textPosXTarget;
|
||||||
if (msgCtx->choiceNum == 1) {
|
if (msgCtx->choiceNum == 1) {
|
||||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||||
msgCtx->textPosX += 32;
|
msgCtx->textPosX += 32;
|
||||||
|
|
@ -1907,48 +1913,48 @@ void Message_LoadItemIcon(PlayState* play, u16 itemId, s16 arg2) {
|
||||||
u16* new_var2 = &itemId;
|
u16* new_var2 = &itemId;
|
||||||
|
|
||||||
if (itemId == ITEM_RECOVERY_HEART) {
|
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->unk12012 = (arg2 + 0xA);
|
||||||
msgCtx->unk12014 = 0x10;
|
msgCtx->unk12014 = 0x10;
|
||||||
} else if ((itemId >= ITEM_RUPEE_GREEN) && (itemId <= ITEM_RUPEE_HUGE)) {
|
} 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->unk12012 = (arg2 + 0xA);
|
||||||
msgCtx->unk12014 = 0x10;
|
msgCtx->unk12014 = 0x10;
|
||||||
} else if (itemId == ITEM_STRAY_FAIRIES) {
|
} 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->unk12012 = (arg2 + 0xA);
|
||||||
msgCtx->unk12014 = 0x20;
|
msgCtx->unk12014 = 0x20;
|
||||||
} else if ((itemId >= ITEM_SONG_SONATA) && (itemId <= ITEM_SONG_SUN)) {
|
} 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->unk12012 = (arg2 + 0xA);
|
||||||
msgCtx->unk12014 = 0x10;
|
msgCtx->unk12014 = 0x10;
|
||||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), ITEM_SONG_SONATA, msgCtx->textboxSegment + 0x1000,
|
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), ITEM_SONG_SONATA, msgCtx->textboxSegment + 0x1000,
|
||||||
0x180);
|
0x180);
|
||||||
} else if (itemId == ITEM_BOMBERS_NOTEBOOK) {
|
} 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->unk12012 = (arg2 + 6);
|
||||||
msgCtx->unk12014 = 0x20;
|
msgCtx->unk12014 = 0x20;
|
||||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), ITEM_SONG_SONATA, msgCtx->textboxSegment + 0x1000,
|
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), ITEM_SONG_SONATA, msgCtx->textboxSegment + 0x1000,
|
||||||
0x1000);
|
0x1000);
|
||||||
} else if (itemId <= ITEM_REMAINS_TWINMOLD) {
|
} 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->unk12012 = (arg2 + 6);
|
||||||
msgCtx->unk12014 = 0x20;
|
msgCtx->unk12014 = 0x20;
|
||||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), itemId, msgCtx->textboxSegment + 0x1000, 0x1000);
|
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), itemId, msgCtx->textboxSegment + 0x1000, 0x1000);
|
||||||
} else if (itemId == ITEM_CC) {
|
} 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->unk12012 = (arg2 + 8);
|
||||||
msgCtx->unk12014 = 0x20;
|
msgCtx->unk12014 = 0x20;
|
||||||
CmpDma_LoadFile(SEGMENT_ROM_START(schedule_dma_static_yar), ITEM_POTION_BLUE, msgCtx->textboxSegment + 0x1000,
|
CmpDma_LoadFile(SEGMENT_ROM_START(schedule_dma_static_yar), ITEM_POTION_BLUE, msgCtx->textboxSegment + 0x1000,
|
||||||
0x400);
|
0x400);
|
||||||
} else if (itemId >= ITEM_B8) {
|
} 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->unk12012 = (arg2 + 8);
|
||||||
msgCtx->unk12014 = 0x20;
|
msgCtx->unk12014 = 0x20;
|
||||||
CmpDma_LoadFile(SEGMENT_ROM_START(schedule_dma_static_yar), (itemId - ITEM_B8), msgCtx->textboxSegment + 0x1000,
|
CmpDma_LoadFile(SEGMENT_ROM_START(schedule_dma_static_yar), (itemId - ITEM_B8), msgCtx->textboxSegment + 0x1000,
|
||||||
0x800);
|
0x800);
|
||||||
} else if (itemId >= ITEM_SKULL_TOKEN) {
|
} 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->unk12012 = (arg2 + 0xA);
|
||||||
msgCtx->unk12014 = 0x18;
|
msgCtx->unk12014 = 0x18;
|
||||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_24_static_yar), (itemId - ITEM_SKULL_TOKEN),
|
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;
|
font = &msgCtx->font;
|
||||||
if (msgCtx->msgBufPos == 0) {
|
if (msgCtx->msgBufPos == 0) {
|
||||||
if (font->msgBuf.schar[msgCtx->msgBufPos + 2] != 0xFE) {
|
if (font->msgBuf.schar[msgCtx->msgBufPos + 2] != 0xFE) {
|
||||||
msgCtx->unk11F18 = 0;
|
msgCtx->hasChoices = 0;
|
||||||
if ((msgCtx->currentTextId == 0x176F) || (msgCtx->currentTextId == 0x1770) ||
|
if ((msgCtx->currentTextId == 0x176F) || (msgCtx->currentTextId == 0x1770) ||
|
||||||
(msgCtx->currentTextId == 0x1771)) {
|
(msgCtx->currentTextId == 0x1771)) {
|
||||||
msgCtx->itemId = ITEM_OCARINA_OF_TIME;
|
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] << 8;
|
||||||
msgCtx->nextTextId |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
msgCtx->nextTextId |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||||
|
|
||||||
msgCtx->unk1206C = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
msgCtx->firstChoicePrice = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||||
msgCtx->unk1206C |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
msgCtx->firstChoicePrice |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||||
|
|
||||||
msgCtx->unk12070 = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
msgCtx->secondChoicePrice = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||||
msgCtx->unk12070 |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
msgCtx->secondChoicePrice |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||||
|
|
||||||
msgCtx->unk12074 = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
msgCtx->unk12074 = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||||
msgCtx->unk12074 |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
msgCtx->unk12074 |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||||
|
|
@ -2242,7 +2248,7 @@ void Message_Decode(PlayState* play) {
|
||||||
s16 numLines;
|
s16 numLines;
|
||||||
s16 value;
|
s16 value;
|
||||||
s16 digits[5];
|
s16 digits[5];
|
||||||
s16 spD2;
|
s16 lineNum;
|
||||||
f32 timeInSeconds;
|
f32 timeInSeconds;
|
||||||
s32 charTexIndex;
|
s32 charTexIndex;
|
||||||
u8* fontBuf;
|
u8* fontBuf;
|
||||||
|
|
@ -2262,7 +2268,7 @@ void Message_Decode(PlayState* play) {
|
||||||
font->unk_11D88 = (font->unk_11D88 ^ 1) & 1;
|
font->unk_11D88 = (font->unk_11D88 ^ 1) & 1;
|
||||||
|
|
||||||
if ((gSaveContext.options.language == LANGUAGE_JPN) && !msgCtx->textIsCredits) {
|
if ((gSaveContext.options.language == LANGUAGE_JPN) && !msgCtx->textIsCredits) {
|
||||||
spD2 = 0;
|
lineNum = 0;
|
||||||
numLines = 0;
|
numLines = 0;
|
||||||
decodedBufPos = 0;
|
decodedBufPos = 0;
|
||||||
charTexIndex = 0;
|
charTexIndex = 0;
|
||||||
|
|
@ -2277,18 +2283,18 @@ void Message_Decode(PlayState* play) {
|
||||||
|
|
||||||
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
||||||
msgCtx->textDrawPos = 1;
|
msgCtx->textDrawPos = 1;
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 6;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 6;
|
||||||
msgCtx->unk11F1A[spD2] = 0;
|
msgCtx->lineIndent[lineNum] = 0;
|
||||||
if (msgCtx->unk11F18 == 0) {
|
if (msgCtx->hasChoices == 0) {
|
||||||
msgCtx->unk11F1A[spD2] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) / 2;
|
msgCtx->lineIndent[lineNum] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) / 2;
|
||||||
}
|
}
|
||||||
spC0 = 0.0f;
|
spC0 = 0.0f;
|
||||||
if (curChar == 0xB) {
|
if (curChar == 0xB) {
|
||||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||||
if (numLines < 2) {
|
if (numLines < 2) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 0x16;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 0x16;
|
||||||
} else if (numLines == 2) {
|
} else if (numLines == 2) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 0xE;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 0xE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2296,9 +2302,9 @@ void Message_Decode(PlayState* play) {
|
||||||
|
|
||||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||||
if (numLines == 0) {
|
if (numLines == 0) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 0x16;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 0x16;
|
||||||
} else if (numLines == 1) {
|
} 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,
|
DmaMgr_RequestSync(msgCtx->textboxSegment + 0x1900, SEGMENT_ROM_START(message_texture_static) + 0x900,
|
||||||
0x900);
|
0x900);
|
||||||
numLines = 2;
|
numLines = 2;
|
||||||
spD2 = 2;
|
lineNum = 2;
|
||||||
msgCtx->unk12012 = msgCtx->textboxY + 8;
|
msgCtx->unk12012 = msgCtx->textboxY + 8;
|
||||||
msgCtx->unk11F18 = 1;
|
msgCtx->hasChoices = 1;
|
||||||
msgCtx->unk12010 = XREG(47);
|
msgCtx->unk12010 = XREG(47);
|
||||||
} else if (curChar == 0x202) {
|
} else if (curChar == 0x202) {
|
||||||
msgCtx->unk11F18 = 1;
|
msgCtx->hasChoices = 1;
|
||||||
msgCtx->choiceNum = 2;
|
msgCtx->choiceNum = 2;
|
||||||
} else if (curChar == 0x203) {
|
} else if (curChar == 0x203) {
|
||||||
msgCtx->unk11F18 = 1;
|
msgCtx->hasChoices = 1;
|
||||||
msgCtx->choiceNum = 3;
|
msgCtx->choiceNum = 3;
|
||||||
msgCtx->unk11FF8 += 0x16;
|
msgCtx->textPosXTarget += 0x16;
|
||||||
} else if (curChar == 0x204) {
|
} else if (curChar == 0x204) {
|
||||||
Message_GetTimerDigits(((void)0, gSaveContext.timerCurTimes[curChar - 0x204]), spAC);
|
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);
|
Message_LoadChar(play, 0x9543, &charTexIndex, &spC0, decodedBufPos);
|
||||||
} else if (curChar == 0x20C) {
|
} else if (curChar == 0x20C) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
MSGCTX_UNK120BE = spD2;
|
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||||
MSGCTX_UNK120C0 = decodedBufPos;
|
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||||
MSGCTX_UNK120C2 = 2;
|
MSGCTX_INPUT_DIGIT_INDEX = 2;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
MSGCTX_UNK120C4 = charTexIndex;
|
MSGCTX_UNK120C4 = charTexIndex;
|
||||||
digits[0] = digits[1] = digits[2] = 0;
|
digits[0] = digits[1] = digits[2] = 0;
|
||||||
|
|
@ -2625,9 +2631,9 @@ void Message_Decode(PlayState* play) {
|
||||||
decodedBufPos--;
|
decodedBufPos--;
|
||||||
} else if (curChar == 0x220) {
|
} else if (curChar == 0x220) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
MSGCTX_UNK120BE = spD2;
|
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||||
MSGCTX_UNK120C0 = decodedBufPos;
|
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
MSGCTX_UNK120C4 = charTexIndex;
|
MSGCTX_UNK120C4 = charTexIndex;
|
||||||
digits[0] = digits[1] = digits[2] = 0;
|
digits[0] = digits[1] = digits[2] = 0;
|
||||||
|
|
@ -2638,14 +2644,14 @@ void Message_Decode(PlayState* play) {
|
||||||
Message_LoadRupeesJPN(play, &decodedBufPos, &charTexIndex, &spC0);
|
Message_LoadRupeesJPN(play, &decodedBufPos, &charTexIndex, &spC0);
|
||||||
} else if (curChar == 0x221) {
|
} else if (curChar == 0x221) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
MSGCTX_UNK120BE = spD2;
|
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||||
MSGCTX_UNK120C0 = decodedBufPos;
|
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
MSGCTX_UNK120C4 = charTexIndex;
|
MSGCTX_UNK120C4 = charTexIndex;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < 5; i++) {
|
||||||
msgCtx->unk12054[i] = 1;
|
msgCtx->codeGuessDigits[i] = 1;
|
||||||
Message_LoadChar(play, '1', &charTexIndex, &spC0, decodedBufPos);
|
Message_LoadChar(play, '1', &charTexIndex, &spC0, decodedBufPos);
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
}
|
}
|
||||||
|
|
@ -2671,14 +2677,14 @@ void Message_Decode(PlayState* play) {
|
||||||
Message_LoadOwlWarpText(play, &charTexIndex, &spC0, &decodedBufPos);
|
Message_LoadOwlWarpText(play, &charTexIndex, &spC0, &decodedBufPos);
|
||||||
} else if (curChar == 0x225) {
|
} else if (curChar == 0x225) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
MSGCTX_UNK120BE = spD2;
|
MSGCTX_INPUT_LINE_NUMBER = lineNum;
|
||||||
MSGCTX_UNK120C0 = decodedBufPos;
|
MSGCTX_CODE_BUFFER_OFFSET = decodedBufPos;
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
MSGCTX_UNK120C4 = charTexIndex;
|
MSGCTX_UNK120C4 = charTexIndex;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
msgCtx->unk12054[i] = 1;
|
msgCtx->codeGuessDigits[i] = 1;
|
||||||
Font_LoadChar(play, '1', charTexIndex);
|
Font_LoadChar(play, '1', charTexIndex);
|
||||||
charTexIndex += FONT_CHAR_TEX_SIZE;
|
charTexIndex += FONT_CHAR_TEX_SIZE;
|
||||||
msgCtx->decodedBuffer.wchar[decodedBufPos] = '1';
|
msgCtx->decodedBuffer.wchar[decodedBufPos] = '1';
|
||||||
|
|
@ -3055,11 +3061,11 @@ void Message_Decode(PlayState* play) {
|
||||||
}
|
}
|
||||||
msgCtx->msgBufPos++;
|
msgCtx->msgBufPos++;
|
||||||
} else if ((curChar == 0xC) || (curChar == 0xA)) {
|
} else if ((curChar == 0xC) || (curChar == 0xA)) {
|
||||||
msgCtx->unk11F1A[spD2] = 0;
|
msgCtx->lineIndent[lineNum] = 0;
|
||||||
if (msgCtx->unk11F18 == 0) {
|
if (msgCtx->hasChoices == 0) {
|
||||||
msgCtx->unk11F1A[spD2] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) * 0.5f;
|
msgCtx->lineIndent[lineNum] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spC0) * 0.5f;
|
||||||
}
|
}
|
||||||
spD2++;
|
lineNum++;
|
||||||
spC0 = 0.0f;
|
spC0 = 0.0f;
|
||||||
if (curChar == 0xA) {
|
if (curChar == 0xA) {
|
||||||
numLines++;
|
numLines++;
|
||||||
|
|
@ -3220,28 +3226,28 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||||
if (play->pauseCtx.bombersNotebookOpen) {
|
if (play->pauseCtx.bombersNotebookOpen) {
|
||||||
if (gSaveContext.options.language == LANGUAGE_JPN) {
|
if (gSaveContext.options.language == LANGUAGE_JPN) {
|
||||||
msgCtx->textCharScale = 1.4f;
|
msgCtx->textCharScale = 1.4f;
|
||||||
msgCtx->unk11FFC = 0x1E;
|
msgCtx->lineHeight = 0x1E;
|
||||||
msgCtx->unk11FF8 = 0x32;
|
msgCtx->textPosXTarget = 0x32;
|
||||||
var_fv0 = 1.4;
|
var_fv0 = 1.4;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textCharScale = 1.4f;
|
msgCtx->textCharScale = 1.4f;
|
||||||
msgCtx->unk11FFC = 0x16;
|
msgCtx->lineHeight = 0x16;
|
||||||
msgCtx->unk11FF8 = 0x32;
|
msgCtx->textPosXTarget = 0x32;
|
||||||
var_fv0 = 1.4;
|
var_fv0 = 1.4;
|
||||||
}
|
}
|
||||||
} else if (textId >= 0x4E20) {
|
} else if (textId >= 0x4E20) {
|
||||||
msgCtx->textIsCredits = true;
|
msgCtx->textIsCredits = true;
|
||||||
msgCtx->textCharScale = 0.85f;
|
msgCtx->textCharScale = 0.85f;
|
||||||
msgCtx->unk11FFC = 6;
|
msgCtx->lineHeight = 6;
|
||||||
msgCtx->unk11FF8 = 0x14;
|
msgCtx->textPosXTarget = 0x14;
|
||||||
} else if (gSaveContext.options.language == LANGUAGE_JPN) {
|
} else if (gSaveContext.options.language == LANGUAGE_JPN) {
|
||||||
msgCtx->textCharScale = 0.88f;
|
msgCtx->textCharScale = 0.88f;
|
||||||
msgCtx->unk11FFC = 0x12;
|
msgCtx->lineHeight = 0x12;
|
||||||
msgCtx->unk11FF8 = 0x32;
|
msgCtx->textPosXTarget = 0x32;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textCharScale = 0.75f;
|
msgCtx->textCharScale = 0.75f;
|
||||||
msgCtx->unk11FFC = 0xC;
|
msgCtx->lineHeight = 0xC;
|
||||||
msgCtx->unk11FF8 = 0x41;
|
msgCtx->textPosXTarget = 0x41;
|
||||||
}
|
}
|
||||||
|
|
||||||
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
||||||
|
|
@ -3274,13 +3280,13 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||||
msgCtx->msgBufPos = 0;
|
msgCtx->msgBufPos = 0;
|
||||||
msgCtx->decodedTextLen = 0;
|
msgCtx->decodedTextLen = 0;
|
||||||
|
|
||||||
msgCtx->unk11F08 = font->msgBuf.schar[msgCtx->msgBufPos] << 8;
|
msgCtx->textBoxProperties = font->msgBuf.schar[msgCtx->msgBufPos] << 8;
|
||||||
msgCtx->unk11F08 |= font->msgBuf.schar[msgCtx->msgBufPos + 1];
|
msgCtx->textBoxProperties |= font->msgBuf.schar[msgCtx->msgBufPos + 1];
|
||||||
|
|
||||||
msgCtx->unk11F18 = (msgCtx->unk11F08 & 0xF000) >> 0xC;
|
msgCtx->hasChoices = (msgCtx->textBoxProperties & 0xF000) >> 0xC;
|
||||||
msgCtx->textBoxType = (msgCtx->unk11F08 & 0xF00) >> 8;
|
msgCtx->textBoxType = (msgCtx->textBoxProperties & 0xF00) >> 8;
|
||||||
msgCtx->textBoxPos = (msgCtx->unk11F08 & 0xF0) >> 4;
|
msgCtx->textBoxPos = (msgCtx->textBoxProperties & 0xF0) >> 4;
|
||||||
msgCtx->unk11F0C = msgCtx->unk11F08 & 0xF;
|
msgCtx->unk11F0C = msgCtx->textBoxProperties & 0xF;
|
||||||
|
|
||||||
if ((msgCtx->unk11F0C == 1) || (msgCtx->unk11F0C == 3)) {
|
if ((msgCtx->unk11F0C == 1) || (msgCtx->unk11F0C == 3)) {
|
||||||
msgCtx->textUnskippable = true;
|
msgCtx->textUnskippable = true;
|
||||||
|
|
@ -3331,12 +3337,12 @@ void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPo
|
||||||
|
|
||||||
if (gSaveContext.options.language == LANGUAGE_JPN) {
|
if (gSaveContext.options.language == LANGUAGE_JPN) {
|
||||||
msgCtx->textCharScale = 0.88f;
|
msgCtx->textCharScale = 0.88f;
|
||||||
msgCtx->unk11FFC = 0x12;
|
msgCtx->lineHeight = 0x12;
|
||||||
msgCtx->unk11FF8 = 0x32;
|
msgCtx->textPosXTarget = 0x32;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textCharScale = 0.75f;
|
msgCtx->textCharScale = 0.75f;
|
||||||
msgCtx->unk11FFC = 0xC;
|
msgCtx->lineHeight = 0xC;
|
||||||
msgCtx->unk11FF8 = 0x41;
|
msgCtx->textPosXTarget = 0x41;
|
||||||
}
|
}
|
||||||
|
|
||||||
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
||||||
|
|
@ -3368,11 +3374,11 @@ void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPo
|
||||||
msgCtx->textDrawPos = 0;
|
msgCtx->textDrawPos = 0;
|
||||||
msgCtx->msgBufPos = 0;
|
msgCtx->msgBufPos = 0;
|
||||||
msgCtx->decodedTextLen = 0;
|
msgCtx->decodedTextLen = 0;
|
||||||
msgCtx->unk11F08 = font->msgBuf.wchar[msgCtx->msgBufPos];
|
msgCtx->textBoxProperties = font->msgBuf.wchar[msgCtx->msgBufPos];
|
||||||
msgCtx->unk11F18 = (msgCtx->unk11F08 & 0xF000) >> 0xC;
|
msgCtx->hasChoices = (msgCtx->textBoxProperties & 0xF000) >> 0xC;
|
||||||
msgCtx->textBoxType = TEXTBOX_TYPE_PAUSE_INFO;
|
msgCtx->textBoxType = TEXTBOX_TYPE_PAUSE_INFO;
|
||||||
msgCtx->textBoxPos = textBoxPos;
|
msgCtx->textBoxPos = textBoxPos;
|
||||||
msgCtx->unk11F0C = msgCtx->unk11F08 & 0xF;
|
msgCtx->unk11F0C = msgCtx->textBoxProperties & 0xF;
|
||||||
msgCtx->textUnskippable = true;
|
msgCtx->textUnskippable = true;
|
||||||
DmaMgr_RequestSync(msgCtx->textboxSegment,
|
DmaMgr_RequestSync(msgCtx->textboxSegment,
|
||||||
SEGMENT_ROM_START(message_static) + (gTextBoxBackgroundTypes[0] * 0x1000), 0x1000);
|
SEGMENT_ROM_START(message_static) + (gTextBoxBackgroundTypes[0] * 0x1000), 0x1000);
|
||||||
|
|
@ -3454,7 +3460,7 @@ void Message_DisplaySceneTitleCard(PlayState* play, u16 textId) {
|
||||||
XREG(75) = 0x1E;
|
XREG(75) = 0x1E;
|
||||||
XREG(77) = 0x3C;
|
XREG(77) = 0x3C;
|
||||||
XREG(76) = 0x1C;
|
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);
|
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4178,9 +4184,9 @@ void Message_DrawSceneTitleCard(PlayState* play, Gfx** gfxP) {
|
||||||
gDPSetEnvColor(gfx++, 0, 0, 0, 255);
|
gDPSetEnvColor(gfx++, 0, 0, 0, 255);
|
||||||
|
|
||||||
if ((msgCtx->currentTextId < 0x1BB2) || (msgCtx->currentTextId >= 0x1BB7)) {
|
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);
|
MESSAGE_DRAW_TEXT(play, &gfx, 0);
|
||||||
*gfxP = gfx++;
|
*gfxP = gfx++;
|
||||||
}
|
}
|
||||||
|
|
@ -4247,8 +4253,8 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
|
||||||
u16 buttonIndexPos;
|
u16 buttonIndexPos;
|
||||||
u8 ocarinaError;
|
u8 ocarinaError;
|
||||||
s32 j;
|
s32 j;
|
||||||
s16 temp_v0_33;
|
s16 lineNum;
|
||||||
s16 temp;
|
s16 inputLineY;
|
||||||
|
|
||||||
gfx = *gfxP;
|
gfx = *gfxP;
|
||||||
|
|
||||||
|
|
@ -5063,51 +5069,51 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
|
||||||
case MSGMODE_TEXT_DONE:
|
case MSGMODE_TEXT_DONE:
|
||||||
switch (msgCtx->textboxEndType) {
|
switch (msgCtx->textboxEndType) {
|
||||||
case TEXTBOX_ENDTYPE_INPUT_BANK:
|
case TEXTBOX_ENDTYPE_INPUT_BANK:
|
||||||
temp_v0_33 = MSGCTX_UNK120BE;
|
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||||
func_80147F18(play, &gfx,
|
func_80147F18(play, &gfx,
|
||||||
msgCtx->unk11F1A[temp_v0_33] +
|
msgCtx->lineIndent[lineNum] +
|
||||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 5)) - 1,
|
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||||
temp);
|
inputLineY);
|
||||||
func_80148D64(play);
|
func_80148D64(play);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET:
|
case TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET:
|
||||||
temp_v0_33 = MSGCTX_UNK120BE;
|
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||||
func_80148558(play, &gfx,
|
func_80148558(play, &gfx,
|
||||||
msgCtx->unk11F1A[temp_v0_33] + (s32)(16.0f * msgCtx->textCharScale * 5.0f) - 1,
|
msgCtx->lineIndent[lineNum] + (s32)(16.0f * msgCtx->textCharScale * 5.0f) - 1,
|
||||||
temp);
|
inputLineY);
|
||||||
func_80149048(play);
|
func_80149048(play);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE:
|
case TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE:
|
||||||
temp_v0_33 = MSGCTX_UNK120BE;
|
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||||
func_80147F18(play, &gfx,
|
func_80147F18(play, &gfx,
|
||||||
msgCtx->unk11F1A[temp_v0_33] +
|
msgCtx->lineIndent[lineNum] +
|
||||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 5)) - 1,
|
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||||
temp);
|
inputLineY);
|
||||||
func_801491DC(play);
|
func_801491DC(play);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE:
|
case TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE:
|
||||||
temp_v0_33 = MSGCTX_UNK120BE;
|
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||||
func_80147F18(play, &gfx,
|
func_80147F18(play, &gfx,
|
||||||
msgCtx->unk11F1A[temp_v0_33] +
|
msgCtx->lineIndent[lineNum] +
|
||||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 5)) - 1,
|
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||||
temp);
|
inputLineY);
|
||||||
func_80149454(play);
|
func_80149454(play);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEXTBOX_ENDTYPE_64:
|
case TEXTBOX_ENDTYPE_64:
|
||||||
temp_v0_33 = MSGCTX_UNK120BE;
|
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||||
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
|
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||||
func_80147F18(play, &gfx,
|
func_80147F18(play, &gfx,
|
||||||
msgCtx->unk11F1A[temp_v0_33] +
|
msgCtx->lineIndent[lineNum] +
|
||||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_UNK120C2 + 4)) - 6,
|
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 4)) - 6,
|
||||||
temp);
|
inputLineY);
|
||||||
func_801496C8(play);
|
func_801496C8(play);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -6129,9 +6135,9 @@ void Message_Init(PlayState* play) {
|
||||||
msgCtx->ocarinaSongEffectActive = false;
|
msgCtx->ocarinaSongEffectActive = false;
|
||||||
|
|
||||||
#if MM_VERSION >= N64_US
|
#if MM_VERSION >= N64_US
|
||||||
MSGCTX_UNK120BE = 0;
|
MSGCTX_INPUT_LINE_NUMBER = 0;
|
||||||
MSGCTX_UNK120C0 = 0;
|
MSGCTX_CODE_BUFFER_OFFSET = 0;
|
||||||
MSGCTX_UNK120C2 = 0;
|
MSGCTX_INPUT_DIGIT_INDEX = 0;
|
||||||
MSGCTX_UNK120C4 = 0;
|
MSGCTX_UNK120C4 = 0;
|
||||||
MSGCTX_UNK120C8 = 0;
|
MSGCTX_UNK120C8 = 0;
|
||||||
MSGCTX_UNK120CA = 0;
|
MSGCTX_UNK120CA = 0;
|
||||||
|
|
|
||||||
|
|
@ -424,17 +424,17 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||||
u16 stateTimerHi;
|
u16 stateTimerHi;
|
||||||
Gfx* gfx = *gfxP;
|
Gfx* gfx = *gfxP;
|
||||||
u16 character;
|
u16 character;
|
||||||
s16 sp130;
|
s16 lineNum;
|
||||||
s16 prevR;
|
s16 prevR;
|
||||||
s16 prevG;
|
s16 prevG;
|
||||||
s16 prevB;
|
s16 prevB;
|
||||||
|
|
||||||
msgCtx->textPosX = msgCtx->unk11F1A[0] + msgCtx->unk11FF8;
|
msgCtx->textPosX = msgCtx->lineIndent[0] + msgCtx->textPosXTarget;
|
||||||
msgCtx->textPosY = msgCtx->unk11FFA;
|
msgCtx->textPosY = msgCtx->textPosYTarget;
|
||||||
|
|
||||||
sp130 = 0;
|
lineNum = 0;
|
||||||
if (!msgCtx->textIsCredits) {
|
if (!msgCtx->textIsCredits) {
|
||||||
msgCtx->textPosY = msgCtx->unk11FFA;
|
msgCtx->textPosY = msgCtx->textPosYTarget;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textPosY = 48;
|
msgCtx->textPosY = 48;
|
||||||
}
|
}
|
||||||
|
|
@ -536,12 +536,12 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MESSAGE_NEWLINE:
|
case MESSAGE_NEWLINE:
|
||||||
msgCtx->textPosY += msgCtx->unk11FFC;
|
msgCtx->textPosY += msgCtx->lineHeight;
|
||||||
FALLTHROUGH;
|
FALLTHROUGH;
|
||||||
case MESSAGE_CARRIAGE_RETURN:
|
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 (msgCtx->choiceNum == 1) {
|
||||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||||
msgCtx->textPosX += 16;
|
msgCtx->textPosX += 16;
|
||||||
|
|
@ -549,13 +549,13 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||||
msgCtx->textPosX += 50;
|
msgCtx->textPosX += 50;
|
||||||
}
|
}
|
||||||
} else if (msgCtx->choiceNum == 2) {
|
} else if (msgCtx->choiceNum == 2) {
|
||||||
if (msgCtx->unk120D8 != 3) {
|
if (msgCtx->lineCount != 3) {
|
||||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||||
msgCtx->textPosX += 10;
|
msgCtx->textPosX += 10;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textPosX += 57;
|
msgCtx->textPosX += 57;
|
||||||
}
|
}
|
||||||
} else if (sp130 >= 2) {
|
} else if (lineNum >= 2) {
|
||||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||||
msgCtx->textPosX += 10;
|
msgCtx->textPosX += 10;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -746,7 +746,7 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||||
msgCtx->choiceTextId = msgCtx->currentTextId;
|
msgCtx->choiceTextId = msgCtx->currentTextId;
|
||||||
msgCtx->stateTimer = 4;
|
msgCtx->stateTimer = 4;
|
||||||
Font_LoadMessageBoxEndIcon(font, 2);
|
Font_LoadMessageBoxEndIcon(font, 2);
|
||||||
if (msgCtx->unk120D8 != 3) {
|
if (msgCtx->lineCount != 3) {
|
||||||
msgCtx->choicePosY[0] = (s16)(msgCtx->textboxYTarget + 14);
|
msgCtx->choicePosY[0] = (s16)(msgCtx->textboxYTarget + 14);
|
||||||
msgCtx->choicePosY[1] = (s16)(msgCtx->textboxYTarget + 26);
|
msgCtx->choicePosY[1] = (s16)(msgCtx->textboxYTarget + 26);
|
||||||
msgCtx->choicePosY[2] = (s16)(msgCtx->textboxYTarget + 38);
|
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->choiceTextId = msgCtx->currentTextId;
|
||||||
msgCtx->stateTimer = 4;
|
msgCtx->stateTimer = 4;
|
||||||
Font_LoadMessageBoxEndIcon(font, 2);
|
Font_LoadMessageBoxEndIcon(font, 2);
|
||||||
if (msgCtx->unk120D8 != 3) {
|
if (msgCtx->lineCount != 3) {
|
||||||
msgCtx->choicePosY[0] = (s16)(msgCtx->textboxYTarget + 14);
|
msgCtx->choicePosY[0] = (s16)(msgCtx->textboxYTarget + 14);
|
||||||
msgCtx->choicePosY[1] = (s16)(msgCtx->textboxYTarget + 26);
|
msgCtx->choicePosY[1] = (s16)(msgCtx->textboxYTarget + 26);
|
||||||
msgCtx->choicePosY[2] = (s16)(msgCtx->textboxYTarget + 38);
|
msgCtx->choicePosY[2] = (s16)(msgCtx->textboxYTarget + 38);
|
||||||
|
|
@ -934,14 +934,14 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE) && (i >= msgCtx->unk120C0) &&
|
if (((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE) &&
|
||||||
((msgCtx->unk120C0 + 4) >= i)) ||
|
(i >= msgCtx->codeBufOffset) && ((msgCtx->codeBufOffset + 4) >= i)) ||
|
||||||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE) &&
|
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE) &&
|
||||||
(i >= msgCtx->unk120C0) && ((msgCtx->unk120C0 + 2) >= i)) ||
|
(i >= msgCtx->codeBufOffset) && ((msgCtx->codeBufOffset + 2) >= i)) ||
|
||||||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BANK) && (i >= msgCtx->unk120C0) &&
|
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BANK) && (i >= msgCtx->codeBufOffset) &&
|
||||||
((msgCtx->unk120C0 + 2) >= i)) ||
|
((msgCtx->codeBufOffset + 2) >= i)) ||
|
||||||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET) &&
|
((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);
|
msgCtx->textPosX += (s32)(16.0f * msgCtx->textCharScale);
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textPosX += (s32)(sNESFontWidths[character - ' '] * msgCtx->textCharScale);
|
msgCtx->textPosX += (s32)(sNESFontWidths[character - ' '] * msgCtx->textCharScale);
|
||||||
|
|
@ -1022,7 +1022,7 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
#define numLines (forceLayout.numLines)
|
#define numLines (forceLayout.numLines)
|
||||||
#define digits (forceLayout.digits)
|
#define digits (forceLayout.digits)
|
||||||
#endif
|
#endif
|
||||||
s16 spC6 = 0;
|
s16 lineNum = 0;
|
||||||
u16 sfxHi;
|
u16 sfxHi;
|
||||||
f32 var_fs0;
|
f32 var_fs0;
|
||||||
s32 charTexIndex = 0;
|
s32 charTexIndex = 0;
|
||||||
|
|
@ -1054,13 +1054,13 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
||||||
msgCtx->textDrawPos = 1;
|
msgCtx->textDrawPos = 1;
|
||||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_OCARINA) {
|
if (msgCtx->textBoxType == TEXTBOX_TYPE_OCARINA) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 2;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 2;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 8;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 8;
|
||||||
}
|
}
|
||||||
msgCtx->unk11F1A[spC6] = 0;
|
msgCtx->lineIndent[lineNum] = 0;
|
||||||
if (msgCtx->unk11F18 != 0) {
|
if (msgCtx->hasChoices != 0) {
|
||||||
msgCtx->unk11F1A[spC6] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) / 2;
|
msgCtx->lineIndent[lineNum] = TRUNCF_BINANG((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
spA4 = 0.0f;
|
spA4 = 0.0f;
|
||||||
|
|
@ -1068,21 +1068,21 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
if (curChar == MESSAGE_BOX_BREAK2) {
|
if (curChar == MESSAGE_BOX_BREAK2) {
|
||||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||||
if (numLines < 2) {
|
if (numLines < 2) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(10);
|
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(10);
|
||||||
} else if (numLines == 2) {
|
} else if (numLines == 2) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(11);
|
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(11);
|
||||||
} else if (numLines == 3) {
|
} else if (numLines == 3) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(12);
|
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
if ((msgCtx->textBoxType != TEXTBOX_TYPE_OCARINA) && (msgCtx->textBoxType != TEXTBOX_TYPE_4)) {
|
||||||
if (numLines == 0) {
|
if (numLines == 0) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(13) + XREG(10);
|
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(13) + XREG(10);
|
||||||
} else if (numLines == 1) {
|
} else if (numLines == 1) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + XREG(13) + XREG(11);
|
msgCtx->textPosYTarget = msgCtx->textboxY + XREG(13) + XREG(11);
|
||||||
} else if (numLines == 2) {
|
} 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->decodedTextLen = decodedBufPos;
|
||||||
msgCtx->unk120D8 = numLines;
|
msgCtx->lineCount = numLines;
|
||||||
if (msgCtx->textboxSkipped || (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) ||
|
if (msgCtx->textboxSkipped || (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) ||
|
||||||
(msgCtx->textBoxType == TEXTBOX_TYPE_OCARINA) || (msgCtx->textBoxType == TEXTBOX_TYPE_DISPLAY_ALL) ||
|
(msgCtx->textBoxType == TEXTBOX_TYPE_OCARINA) || (msgCtx->textBoxType == TEXTBOX_TYPE_DISPLAY_ALL) ||
|
||||||
(msgCtx->textBoxType == TEXTBOX_TYPE_BLUE) || (msgCtx->textBoxType == TEXTBOX_TYPE_PAUSE_INFO) ||
|
(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,
|
DmaMgr_RequestSync(msgCtx->textboxSegment + 0x1900, SEGMENT_ROM_START(message_texture_static) + 0x900,
|
||||||
0x900);
|
0x900);
|
||||||
numLines = 2;
|
numLines = 2;
|
||||||
spC6 = 2;
|
lineNum = 2;
|
||||||
msgCtx->unk12012 = msgCtx->textboxY + 8;
|
msgCtx->unk12012 = msgCtx->textboxY + 8;
|
||||||
msgCtx->unk11F18 = 1;
|
msgCtx->hasChoices = 1;
|
||||||
msgCtx->unk12010 = XREG(47);
|
msgCtx->unk12010 = XREG(47);
|
||||||
} else if (curChar == MESSAGE_TWO_CHOICE) {
|
} else if (curChar == MESSAGE_TWO_CHOICE) {
|
||||||
msgCtx->unk11F18 = 0;
|
msgCtx->hasChoices = 0;
|
||||||
msgCtx->choiceNum = 2;
|
msgCtx->choiceNum = 2;
|
||||||
} else if (curChar == MESSAGE_THREE_CHOICE) {
|
} else if (curChar == MESSAGE_THREE_CHOICE) {
|
||||||
msgCtx->unk11F18 = 0;
|
msgCtx->hasChoices = 0;
|
||||||
msgCtx->choiceNum = 3;
|
msgCtx->choiceNum = 3;
|
||||||
msgCtx->unk11FF8 += 22;
|
msgCtx->textPosXTarget += 22;
|
||||||
} else if (curChar == MESSAGE_TIMER_POSTMAN) {
|
} else if (curChar == MESSAGE_TIMER_POSTMAN) {
|
||||||
Message_GetTimerDigitsNES(((void)0, gSaveContext.timerCurTimes[curChar - MESSAGE_TIMER_POSTMAN]), spA8);
|
Message_GetTimerDigitsNES(((void)0, gSaveContext.timerCurTimes[curChar - MESSAGE_TIMER_POSTMAN]), spA8);
|
||||||
|
|
||||||
|
|
@ -1257,9 +1257,9 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
decodedBufPos--;
|
decodedBufPos--;
|
||||||
} else if (curChar == MESSAGE_INPUT_BANK) {
|
} else if (curChar == MESSAGE_INPUT_BANK) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
msgCtx->unk120BE = spC6;
|
msgCtx->inputLineNumber = lineNum;
|
||||||
msgCtx->unk120C0 = decodedBufPos;
|
msgCtx->codeBufOffset = decodedBufPos;
|
||||||
msgCtx->unk120C2 = 2;
|
msgCtx->inputDigitIndex = 2;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
msgCtx->unk120C4 = charTexIndex;
|
msgCtx->unk120C4 = charTexIndex;
|
||||||
digits[0] = digits[1] = digits[2] = 0;
|
digits[0] = digits[1] = digits[2] = 0;
|
||||||
|
|
@ -1466,9 +1466,9 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
decodedBufPos--;
|
decodedBufPos--;
|
||||||
} else if (curChar == MESSAGE_INPUT_DOGGY_RACETRACK_BET) {
|
} else if (curChar == MESSAGE_INPUT_DOGGY_RACETRACK_BET) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
msgCtx->unk120BE = spC6;
|
msgCtx->inputLineNumber = lineNum;
|
||||||
msgCtx->unk120C0 = decodedBufPos;
|
msgCtx->codeBufOffset = decodedBufPos;
|
||||||
msgCtx->unk120C2 = 0;
|
msgCtx->inputDigitIndex = 0;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
msgCtx->unk120C4 = charTexIndex;
|
msgCtx->unk120C4 = charTexIndex;
|
||||||
digits[0] = digits[1] = digits[2] = 0;
|
digits[0] = digits[1] = digits[2] = 0;
|
||||||
|
|
@ -1479,14 +1479,14 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
Message_LoadPluralRupeesNES(play, &decodedBufPos, &charTexIndex, &spA4);
|
Message_LoadPluralRupeesNES(play, &decodedBufPos, &charTexIndex, &spA4);
|
||||||
} else if (curChar == MESSAGE_INPUT_BOMBER_CODE) {
|
} else if (curChar == MESSAGE_INPUT_BOMBER_CODE) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
msgCtx->unk120BE = spC6;
|
msgCtx->inputLineNumber = lineNum;
|
||||||
msgCtx->unk120C0 = decodedBufPos;
|
msgCtx->codeBufOffset = decodedBufPos;
|
||||||
msgCtx->unk120C2 = 0;
|
msgCtx->inputDigitIndex = 0;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
msgCtx->unk120C4 = charTexIndex;
|
msgCtx->unk120C4 = charTexIndex;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < 5; i++) {
|
||||||
msgCtx->unk12054[i] = 1;
|
msgCtx->codeGuessDigits[i] = 1;
|
||||||
Message_LoadCharNES(play, '1', &charTexIndex, &spA4, decodedBufPos);
|
Message_LoadCharNES(play, '1', &charTexIndex, &spA4, decodedBufPos);
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
}
|
}
|
||||||
|
|
@ -1512,14 +1512,14 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
Message_LoadOwlWarpTextNES(play, &charTexIndex, &spA4, &decodedBufPos);
|
Message_LoadOwlWarpTextNES(play, &charTexIndex, &spA4, &decodedBufPos);
|
||||||
} else if (curChar == MESSAGE_INPUT_LOTTERY_CODE) {
|
} else if (curChar == MESSAGE_INPUT_LOTTERY_CODE) {
|
||||||
decodedBufPos++;
|
decodedBufPos++;
|
||||||
msgCtx->unk120BE = spC6;
|
msgCtx->inputLineNumber = lineNum;
|
||||||
msgCtx->unk120C0 = decodedBufPos;
|
msgCtx->codeBufOffset = decodedBufPos;
|
||||||
msgCtx->unk120C2 = 0;
|
msgCtx->inputDigitIndex = 0;
|
||||||
msgCtx->rupeesSelected = 0;
|
msgCtx->rupeesSelected = 0;
|
||||||
msgCtx->unk120C4 = charTexIndex;
|
msgCtx->unk120C4 = charTexIndex;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
msgCtx->unk12054[i] = 1;
|
msgCtx->codeGuessDigits[i] = 1;
|
||||||
Font_LoadCharNES(play, '1', charTexIndex);
|
Font_LoadCharNES(play, '1', charTexIndex);
|
||||||
charTexIndex += FONT_CHAR_TEX_SIZE;
|
charTexIndex += FONT_CHAR_TEX_SIZE;
|
||||||
msgCtx->decodedBuffer.schar[decodedBufPos] = '1';
|
msgCtx->decodedBuffer.schar[decodedBufPos] = '1';
|
||||||
|
|
@ -1913,11 +1913,11 @@ void Message_DecodeNES(PlayState* play) {
|
||||||
}
|
}
|
||||||
msgCtx->msgBufPos++;
|
msgCtx->msgBufPos++;
|
||||||
} else if ((curChar == MESSAGE_CARRIAGE_RETURN) || (curChar == MESSAGE_NEWLINE)) {
|
} else if ((curChar == MESSAGE_CARRIAGE_RETURN) || (curChar == MESSAGE_NEWLINE)) {
|
||||||
msgCtx->unk11F1A[spC6] = 0;
|
msgCtx->lineIndent[lineNum] = 0;
|
||||||
if (msgCtx->unk11F18 != 0) {
|
if (msgCtx->hasChoices != 0) {
|
||||||
msgCtx->unk11F1A[spC6] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) * 0.5f;
|
msgCtx->lineIndent[lineNum] = ((msgCtx->textCharScale * 16.0f * 16.0f) - spA4) * 0.5f;
|
||||||
}
|
}
|
||||||
spC6++;
|
lineNum++;
|
||||||
spA4 = 0.0f;
|
spA4 = 0.0f;
|
||||||
if (curChar == MESSAGE_NEWLINE) {
|
if (curChar == MESSAGE_NEWLINE) {
|
||||||
numLines++;
|
numLines++;
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,10 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
|
||||||
Font* font = &msgCtx->font;
|
Font* font = &msgCtx->font;
|
||||||
Gfx* gfx = *gfxP;
|
Gfx* gfx = *gfxP;
|
||||||
|
|
||||||
msgCtx->textPosX = msgCtx->unk11FF8;
|
msgCtx->textPosX = msgCtx->textPosXTarget;
|
||||||
|
|
||||||
if (!msgCtx->textIsCredits) {
|
if (!msgCtx->textIsCredits) {
|
||||||
msgCtx->textPosY = msgCtx->unk11FFA;
|
msgCtx->textPosY = msgCtx->textPosYTarget;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textPosY = 48;
|
msgCtx->textPosY = 48;
|
||||||
}
|
}
|
||||||
|
|
@ -69,14 +69,14 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
|
||||||
|
|
||||||
switch (character) {
|
switch (character) {
|
||||||
case MESSAGE_NEWLINE:
|
case MESSAGE_NEWLINE:
|
||||||
msgCtx->textPosX = msgCtx->unk11FF8;
|
msgCtx->textPosX = msgCtx->textPosXTarget;
|
||||||
if ((msgCtx->choiceNum == 1) || (msgCtx->choiceNum == 3)) {
|
if ((msgCtx->choiceNum == 1) || (msgCtx->choiceNum == 3)) {
|
||||||
msgCtx->textPosX += 32;
|
msgCtx->textPosX += 32;
|
||||||
}
|
}
|
||||||
if ((msgCtx->choiceNum == 2) && (msgCtx->textPosY != msgCtx->unk11FFA)) {
|
if ((msgCtx->choiceNum == 2) && (msgCtx->textPosY != msgCtx->textPosYTarget)) {
|
||||||
msgCtx->textPosX += 32;
|
msgCtx->textPosX += 32;
|
||||||
}
|
}
|
||||||
msgCtx->textPosY += msgCtx->unk11FFC;
|
msgCtx->textPosY += msgCtx->lineHeight;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MESSAGE_COLOR:
|
case MESSAGE_COLOR:
|
||||||
|
|
@ -356,15 +356,15 @@ void Message_DecodeCredits(PlayState* play) {
|
||||||
// Textbox decoding ends with any of the above text control characters
|
// Textbox decoding ends with any of the above text control characters
|
||||||
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
|
||||||
msgCtx->textDrawPos = 1;
|
msgCtx->textDrawPos = 1;
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 8;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 8;
|
||||||
|
|
||||||
if (msgCtx->textBoxType != TEXTBOX_TYPE_4) {
|
if (msgCtx->textBoxType != TEXTBOX_TYPE_4) {
|
||||||
if (numLines == 0) {
|
if (numLines == 0) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 26;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 26;
|
||||||
} else if (numLines == 1) {
|
} else if (numLines == 1) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 20;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 20;
|
||||||
} else if (numLines == 2) {
|
} else if (numLines == 2) {
|
||||||
msgCtx->unk11FFA = msgCtx->textboxY + 16;
|
msgCtx->textPosYTarget = msgCtx->textboxY + 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -821,9 +821,9 @@ void EnBal_TryPurchaseMap(EnBal* this, PlayState* play) {
|
||||||
if (play->msgCtx.choiceIndex != TINGLE_MAPCHOICE_CANCEL) {
|
if (play->msgCtx.choiceIndex != TINGLE_MAPCHOICE_CANCEL) {
|
||||||
// Get price depending on which map player wants to buy
|
// Get price depending on which map player wants to buy
|
||||||
if (play->msgCtx.choiceIndex == TINGLE_MAPCHOICE_PROXIMAL) {
|
if (play->msgCtx.choiceIndex == TINGLE_MAPCHOICE_PROXIMAL) {
|
||||||
price = play->msgCtx.unk1206C;
|
price = play->msgCtx.firstChoicePrice;
|
||||||
} else {
|
} else {
|
||||||
price = play->msgCtx.unk12070;
|
price = play->msgCtx.secondChoicePrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < price) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < price) {
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(this->correctDigitSlots); i++) {
|
for (i = 0; i < ARRAY_COUNT(this->correctDigitSlots); i++) {
|
||||||
if (!(this->correctDigitSlots[i]) &&
|
if (!(this->correctDigitSlots[i]) &&
|
||||||
(play->msgCtx.unk12054[i] == gSaveContext.save.saveInfo.bomberCode[i])) {
|
(play->msgCtx.codeGuessDigits[i] == gSaveContext.save.saveInfo.bomberCode[i])) {
|
||||||
this->correctDigitSlots[i] = true;
|
this->correctDigitSlots[i] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) {
|
||||||
case 0x477:
|
case 0x477:
|
||||||
Message_StartTextbox(play, 0x471, &this->actor);
|
Message_StartTextbox(play, 0x471, &this->actor);
|
||||||
this->curTextId = 0x471;
|
this->curTextId = 0x471;
|
||||||
this->serviceFee = play->msgCtx.unk1206C;
|
this->serviceFee = play->msgCtx.firstChoicePrice;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x479:
|
case 0x479:
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ s32 EnGirlA_CanBuyPotionRed(PlayState* play, EnGirlA* this) {
|
||||||
if (!Inventory_HasEmptyBottle()) {
|
if (!Inventory_HasEmptyBottle()) {
|
||||||
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
|
|
@ -196,7 +196,7 @@ s32 EnGirlA_CanBuyPotionGreen(PlayState* play, EnGirlA* this) {
|
||||||
if (!Inventory_HasEmptyBottle()) {
|
if (!Inventory_HasEmptyBottle()) {
|
||||||
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
|
|
@ -212,7 +212,7 @@ s32 EnGirlA_CanBuyPotionBlue(PlayState* play, EnGirlA* this) {
|
||||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_FREE_BLUE_POTION)) {
|
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_FREE_BLUE_POTION)) {
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
|
|
@ -225,7 +225,7 @@ s32 EnGirlA_CanBuyArrows(PlayState* play, EnGirlA* this) {
|
||||||
if (AMMO(ITEM_BOW) >= CUR_CAPACITY(UPG_QUIVER)) {
|
if (AMMO(ITEM_BOW) >= CUR_CAPACITY(UPG_QUIVER)) {
|
||||||
return CANBUY_RESULT_NO_ROOM_2;
|
return CANBUY_RESULT_NO_ROOM_2;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
|
|
@ -235,7 +235,7 @@ s32 EnGirlA_CanBuyNuts(PlayState* play, EnGirlA* this) {
|
||||||
if ((CUR_CAPACITY(UPG_DEKU_NUTS) != 0) && (CUR_CAPACITY(UPG_DEKU_NUTS) <= AMMO(ITEM_DEKU_NUT))) {
|
if ((CUR_CAPACITY(UPG_DEKU_NUTS) != 0) && (CUR_CAPACITY(UPG_DEKU_NUTS) <= AMMO(ITEM_DEKU_NUT))) {
|
||||||
return CANBUY_RESULT_NO_ROOM;
|
return CANBUY_RESULT_NO_ROOM;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
if (Item_CheckObtainability(ITEM_DEKU_NUT) == ITEM_NONE) {
|
if (Item_CheckObtainability(ITEM_DEKU_NUT) == ITEM_NONE) {
|
||||||
|
|
@ -248,7 +248,7 @@ s32 EnGirlA_CanBuyShieldHero(PlayState* play, EnGirlA* this) {
|
||||||
if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
|
if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
|
||||||
return CANBUY_RESULT_NO_ROOM;
|
return CANBUY_RESULT_NO_ROOM;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_1;
|
return CANBUY_RESULT_SUCCESS_1;
|
||||||
|
|
@ -258,7 +258,7 @@ s32 EnGirlA_CanBuyStick(PlayState* play, EnGirlA* this) {
|
||||||
if ((CUR_CAPACITY(UPG_DEKU_STICKS) != 0) && (AMMO(ITEM_DEKU_STICK) >= CUR_CAPACITY(UPG_DEKU_STICKS))) {
|
if ((CUR_CAPACITY(UPG_DEKU_STICKS) != 0) && (AMMO(ITEM_DEKU_STICK) >= CUR_CAPACITY(UPG_DEKU_STICKS))) {
|
||||||
return CANBUY_RESULT_NO_ROOM;
|
return CANBUY_RESULT_NO_ROOM;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
if (Item_CheckObtainability(ITEM_DEKU_STICK) == ITEM_NONE) {
|
if (Item_CheckObtainability(ITEM_DEKU_STICK) == ITEM_NONE) {
|
||||||
|
|
@ -268,7 +268,7 @@ s32 EnGirlA_CanBuyStick(PlayState* play, EnGirlA* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 EnGirlA_CanBuyMaskAllNight(PlayState* play, EnGirlA* this) {
|
s32 EnGirlA_CanBuyMaskAllNight(PlayState* play, EnGirlA* this) {
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
|
|
@ -278,7 +278,7 @@ s32 EnGirlA_CanBuyBombBagCuriosityShop(PlayState* play, EnGirlA* this) {
|
||||||
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) >= 2) {
|
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) >= 2) {
|
||||||
return CANBUY_RESULT_CANNOT_GET_NOW;
|
return CANBUY_RESULT_CANNOT_GET_NOW;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
|
|
@ -291,7 +291,7 @@ s32 EnGirlA_CanBuyBombBag20BombShop(PlayState* play, EnGirlA* this) {
|
||||||
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) >= 2) {
|
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) >= 2) {
|
||||||
return CANBUY_RESULT_HAVE_BETTER;
|
return CANBUY_RESULT_HAVE_BETTER;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_1;
|
return CANBUY_RESULT_SUCCESS_1;
|
||||||
|
|
@ -304,7 +304,7 @@ s32 EnGirlA_CanBuyBombBag30BombShop(PlayState* play, EnGirlA* this) {
|
||||||
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) == 3) {
|
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) == 3) {
|
||||||
return CANBUY_RESULT_HAVE_BETTER;
|
return CANBUY_RESULT_HAVE_BETTER;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_1;
|
return CANBUY_RESULT_SUCCESS_1;
|
||||||
|
|
@ -317,7 +317,7 @@ s32 EnGirlA_CanBuyBombchus(PlayState* play, EnGirlA* this) {
|
||||||
if (AMMO(ITEM_BOMBCHU) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
|
if (AMMO(ITEM_BOMBCHU) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
|
||||||
return CANBUY_RESULT_NO_ROOM;
|
return CANBUY_RESULT_NO_ROOM;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
if (Item_CheckObtainability(ITEM_BOMBCHU) == ITEM_NONE) {
|
if (Item_CheckObtainability(ITEM_BOMBCHU) == ITEM_NONE) {
|
||||||
|
|
@ -333,21 +333,21 @@ s32 EnGirlA_CanBuyBombs(PlayState* play, EnGirlA* this) {
|
||||||
if (AMMO(ITEM_BOMB) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
|
if (AMMO(ITEM_BOMB) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
|
||||||
return CANBUY_RESULT_NO_ROOM;
|
return CANBUY_RESULT_NO_ROOM;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 EnGirlA_CanBuyBottleStolen(PlayState* play, EnGirlA* this) {
|
s32 EnGirlA_CanBuyBottleStolen(PlayState* play, EnGirlA* this) {
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_1;
|
return CANBUY_RESULT_SUCCESS_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 EnGirlA_CanBuySword(PlayState* play, EnGirlA* this) {
|
s32 EnGirlA_CanBuySword(PlayState* play, EnGirlA* this) {
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_1;
|
return CANBUY_RESULT_SUCCESS_1;
|
||||||
|
|
@ -357,7 +357,7 @@ s32 EnGirlA_CanBuyShieldMirror(PlayState* play, EnGirlA* this) {
|
||||||
if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
|
if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
|
||||||
return CANBUY_RESULT_NO_ROOM;
|
return CANBUY_RESULT_NO_ROOM;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_1;
|
return CANBUY_RESULT_SUCCESS_1;
|
||||||
|
|
@ -367,7 +367,7 @@ s32 EnGirlA_CanBuyFairy(PlayState* play, EnGirlA* this) {
|
||||||
if (!Inventory_HasEmptyBottle()) {
|
if (!Inventory_HasEmptyBottle()) {
|
||||||
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
||||||
}
|
}
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
return CANBUY_RESULT_NEED_RUPEES;
|
return CANBUY_RESULT_NEED_RUPEES;
|
||||||
}
|
}
|
||||||
return CANBUY_RESULT_SUCCESS_2;
|
return CANBUY_RESULT_SUCCESS_2;
|
||||||
|
|
@ -402,12 +402,12 @@ void EnGirlA_BuyBottleItem(PlayState* play, EnGirlA* this) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyArrows(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyArrows(PlayState* play, EnGirlA* this) {
|
||||||
Inventory_ChangeAmmo(ITEM_BOW, this->itemParams);
|
Inventory_ChangeAmmo(ITEM_BOW, this->itemParams);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyNuts(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyNuts(PlayState* play, EnGirlA* this) {
|
||||||
|
|
@ -423,22 +423,22 @@ void EnGirlA_BuyNuts(PlayState* play, EnGirlA* this) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyShieldHero(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyShieldHero(PlayState* play, EnGirlA* this) {
|
||||||
Item_Give(play, ITEM_SHIELD_HERO);
|
Item_Give(play, ITEM_SHIELD_HERO);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyStick(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyStick(PlayState* play, EnGirlA* this) {
|
||||||
Item_Give(play, ITEM_DEKU_STICK);
|
Item_Give(play, ITEM_DEKU_STICK);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyMaskAllNight(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyMaskAllNight(PlayState* play, EnGirlA* this) {
|
||||||
Item_Give(play, ITEM_MASK_ALL_NIGHT);
|
Item_Give(play, ITEM_MASK_ALL_NIGHT);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyBombBag(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyBombBag(PlayState* play, EnGirlA* this) {
|
||||||
|
|
@ -459,14 +459,14 @@ void EnGirlA_BuyBombBag(PlayState* play, EnGirlA* this) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyBombchus(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyBombchus(PlayState* play, EnGirlA* this) {
|
||||||
if (this->itemParams == 10) {
|
if (this->itemParams == 10) {
|
||||||
Item_Give(play, ITEM_BOMBCHUS_10);
|
Item_Give(play, ITEM_BOMBCHUS_10);
|
||||||
}
|
}
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyBombs(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyBombs(PlayState* play, EnGirlA* this) {
|
||||||
|
|
@ -490,12 +490,12 @@ void EnGirlA_BuyBombs(PlayState* play, EnGirlA* this) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyBottle(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyBottle(PlayState* play, EnGirlA* this) {
|
||||||
Item_Give(play, ITEM_BOTTLE);
|
Item_Give(play, ITEM_BOTTLE);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuySword(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuySword(PlayState* play, EnGirlA* this) {
|
||||||
|
|
@ -519,17 +519,17 @@ void EnGirlA_BuySword(PlayState* play, EnGirlA* this) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyShieldMirror(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyShieldMirror(PlayState* play, EnGirlA* this) {
|
||||||
Item_Give(play, ITEM_SHIELD_MIRROR);
|
Item_Give(play, ITEM_SHIELD_MIRROR);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fanfare is handled by the shopkeeper
|
// Fanfare is handled by the shopkeeper
|
||||||
void EnGirlA_BuyFanfare(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyFanfare(PlayState* play, EnGirlA* this) {
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_DoNothing(EnGirlA* this, PlayState* play) {
|
void EnGirlA_DoNothing(EnGirlA* this, PlayState* play) {
|
||||||
|
|
|
||||||
|
|
@ -600,8 +600,8 @@ s32 func_808F4150(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx)
|
||||||
|
|
||||||
if (msgCtx->choiceIndex == 0) {
|
if (msgCtx->choiceIndex == 0) {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_57_01)) {
|
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_57_01)) {
|
||||||
func_808F4108(this, play, 0x3474);
|
func_808F4108(this, play, 0x3474);
|
||||||
} else if (this->unk4AC & 8) {
|
} else if (this->unk4AC & 8) {
|
||||||
|
|
@ -622,7 +622,7 @@ s32 func_808F4150(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx)
|
||||||
|
|
||||||
s32 func_808F4270(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx, s32 arg4) {
|
s32 func_808F4270(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx, s32 arg4) {
|
||||||
s32 pad;
|
s32 pad;
|
||||||
s32 fee = (play->msgCtx.unk1206C != 0xFFFF) ? play->msgCtx.unk1206C : 10;
|
s32 fee = (play->msgCtx.firstChoicePrice != 0xFFFF) ? play->msgCtx.firstChoicePrice : 10;
|
||||||
|
|
||||||
if (msgCtx->choiceIndex == 0) {
|
if (msgCtx->choiceIndex == 0) {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
|
|
@ -795,11 +795,11 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
||||||
case 0x3466:
|
case 0x3466:
|
||||||
if (msgCtx->choiceIndex == 0) {
|
if (msgCtx->choiceIndex == 0) {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||||
if (Inventory_HasEmptyBottle()) {
|
if (Inventory_HasEmptyBottle()) {
|
||||||
this->actionFunc = func_808F3C40;
|
this->actionFunc = func_808F3C40;
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
ret = true;
|
ret = true;
|
||||||
} else {
|
} else {
|
||||||
Actor_ContinueText(play, &this->actor, 0x3469);
|
Actor_ContinueText(play, &this->actor, 0x3469);
|
||||||
|
|
@ -1098,11 +1098,11 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
||||||
case 0x3490:
|
case 0x3490:
|
||||||
if (msgCtx->choiceIndex == 0) {
|
if (msgCtx->choiceIndex == 0) {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||||
if (Inventory_HasEmptyBottle()) {
|
if (Inventory_HasEmptyBottle()) {
|
||||||
this->actionFunc = func_808F3C40;
|
this->actionFunc = func_808F3C40;
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
ret = true;
|
ret = true;
|
||||||
} else {
|
} else {
|
||||||
Actor_ContinueText(play, &this->actor, 0x3469);
|
Actor_ContinueText(play, &this->actor, 0x3469);
|
||||||
|
|
|
||||||
|
|
@ -231,13 +231,13 @@ void func_80B26758(EnKendoJs* this, PlayState* play) {
|
||||||
Message_StartTextbox(play, 0x272C, &this->actor);
|
Message_StartTextbox(play, 0x272C, &this->actor);
|
||||||
this->unk_288 = 0x272C;
|
this->unk_288 = 0x272C;
|
||||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENKENDOJS_ANIM_2);
|
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENKENDOJS_ANIM_2);
|
||||||
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||||
Message_StartTextbox(play, 0x2718, &this->actor);
|
Message_StartTextbox(play, 0x2718, &this->actor);
|
||||||
this->unk_288 = 0x2718;
|
this->unk_288 = 0x2718;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
Message_StartTextbox(play, 0x2719, &this->actor);
|
Message_StartTextbox(play, 0x2719, &this->actor);
|
||||||
this->unk_288 = 0x2719;
|
this->unk_288 = 0x2719;
|
||||||
}
|
}
|
||||||
|
|
@ -249,13 +249,13 @@ void func_80B26758(EnKendoJs* this, PlayState* play) {
|
||||||
Message_StartTextbox(play, 0x272C, &this->actor);
|
Message_StartTextbox(play, 0x272C, &this->actor);
|
||||||
this->unk_288 = 0x272C;
|
this->unk_288 = 0x272C;
|
||||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENKENDOJS_ANIM_2);
|
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENKENDOJS_ANIM_2);
|
||||||
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk12070) {
|
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.secondChoicePrice) {
|
||||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||||
Message_StartTextbox(play, 0x2718, &this->actor);
|
Message_StartTextbox(play, 0x2718, &this->actor);
|
||||||
this->unk_288 = 0x2718;
|
this->unk_288 = 0x2718;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk12070);
|
Rupees_ChangeBy(-play->msgCtx.secondChoicePrice);
|
||||||
Message_StartTextbox(play, 0x273A, &this->actor);
|
Message_StartTextbox(play, 0x273A, &this->actor);
|
||||||
this->unk_288 = 0x273A;
|
this->unk_288 = 0x273A;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -651,13 +651,13 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
|
||||||
case 0xC3B:
|
case 0xC3B:
|
||||||
switch (play->msgCtx.choiceIndex) {
|
switch (play->msgCtx.choiceIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||||
func_80B40E74(this, play, 0xC3F);
|
func_80B40E74(this, play, 0xC3F);
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
func_80B40E74(this, play, 0xC42);
|
func_80B40E74(this, play, 0xC42);
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -789,7 +789,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
|
||||||
func_80B41368(this, play, 4);
|
func_80B41368(this, play, 4);
|
||||||
if (this->unk_29C & 0x10) {
|
if (this->unk_29C & 0x10) {
|
||||||
this->actor.textId = 0xC56;
|
this->actor.textId = 0xC56;
|
||||||
Rupees_ChangeBy(play->msgCtx.unk1206C);
|
Rupees_ChangeBy(play->msgCtx.firstChoicePrice);
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0xC42;
|
this->actor.textId = 0xC42;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,8 @@ void EnKitan_Talk(EnKitan* this, PlayState* play) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((play->msgCtx.choiceIndex + 1) == play->msgCtx.unk1206C) {
|
// The "first choice price" field is used as the index of the correct answer for the quiz
|
||||||
|
if ((play->msgCtx.choiceIndex + 1) == play->msgCtx.firstChoicePrice) {
|
||||||
// Correct answer, continue quiz or end if enough questions have been answered correctly
|
// Correct answer, continue quiz or end if enough questions have been answered correctly
|
||||||
Audio_PlaySfx(NA_SE_SY_QUIZ_CORRECT);
|
Audio_PlaySfx(NA_SE_SY_QUIZ_CORRECT);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,11 +157,11 @@ void func_80A6F3B4(EnMm3* this, PlayState* play) {
|
||||||
case 0x278E:
|
case 0x278E:
|
||||||
if (play->msgCtx.choiceIndex == 0) {
|
if (play->msgCtx.choiceIndex == 0) {
|
||||||
if (this->unk_2B2 & 0x20) {
|
if (this->unk_2B2 & 0x20) {
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
Message_StartTextbox(play, 0x2790, &this->actor);
|
Message_StartTextbox(play, 0x2790, &this->actor);
|
||||||
this->unk_2B4 = 0x2790;
|
this->unk_2B4 = 0x2790;
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||||
Message_StartTextbox(play, 0x279C, &this->actor);
|
Message_StartTextbox(play, 0x279C, &this->actor);
|
||||||
|
|
@ -183,11 +183,11 @@ void func_80A6F3B4(EnMm3* this, PlayState* play) {
|
||||||
|
|
||||||
case 0x279A:
|
case 0x279A:
|
||||||
if (play->msgCtx.choiceIndex == 0) {
|
if (play->msgCtx.choiceIndex == 0) {
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
Message_StartTextbox(play, 0x2790, &this->actor);
|
Message_StartTextbox(play, 0x2790, &this->actor);
|
||||||
this->unk_2B4 = 0x2790;
|
this->unk_2B4 = 0x2790;
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||||
Message_StartTextbox(play, 0x279C, &this->actor);
|
Message_StartTextbox(play, 0x279C, &this->actor);
|
||||||
|
|
|
||||||
|
|
@ -679,7 +679,7 @@ u16 EnSGoro_BombshopGoron_NextTextId(EnSGoro* this, PlayState* play) {
|
||||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||||
return 0x673;
|
return 0x673;
|
||||||
}
|
}
|
||||||
this->powderKegPrice = play->msgCtx.unk1206C;
|
this->powderKegPrice = play->msgCtx.firstChoicePrice;
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < this->powderKegPrice) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < this->powderKegPrice) {
|
||||||
this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE;
|
this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE;
|
||||||
this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED;
|
this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED;
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,7 @@ void EnTakaraya_Talk(EnTakaraya* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
} else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
|
} else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
|
||||||
if (play->msgCtx.choiceIndex == 0) {
|
if (play->msgCtx.choiceIndex == 0) {
|
||||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||||
this->actor.textId = 0x77B;
|
this->actor.textId = 0x77B;
|
||||||
if (this->skelAnime.animation == &object_bg_Anim_009890) {
|
if (this->skelAnime.animation == &object_bg_Anim_009890) {
|
||||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_000968, 5.0f);
|
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_000968, 5.0f);
|
||||||
|
|
@ -242,7 +242,7 @@ void EnTakaraya_Talk(EnTakaraya* this, PlayState* play) {
|
||||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySfx_MessageDecide();
|
Audio_PlaySfx_MessageDecide();
|
||||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||||
EnTakaraya_SpawnWalls(this, play);
|
EnTakaraya_SpawnWalls(this, play);
|
||||||
this->actor.textId = 0x778;
|
this->actor.textId = 0x778;
|
||||||
if (this->skelAnime.animation != &object_bg_Anim_009890) {
|
if (this->skelAnime.animation != &object_bg_Anim_009890) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue