z_message progress (#701)

* 8 functions matching, 1 non-matching, 45 untouched

* match func_801518B0

* match func_8014CC14

* matching 8 func, 1 non-matching

* matched func_80148CBC

* matched func_80156758

* matched func_80147564

* matched func_80151BB4

* matched func80152EC0/Message_Spawn_Song_Effect

* matched func_80151C9C

* WIP func_80148B98

* WIP func_80151938

* matched func_80151938

* matched func_80148B98

* matched func_80147734

* matched func_80147624

* WIP func_8014EBC

* match func_801518B0

* matched func_80147564

* matched func80152EC0/Message_Spawn_Song_Effect

* matched func_80151C9C

* WIP func_80148B98

* matched func_80151938

* matched func_80148B98

* matched func_80147734

* matched func_80147624

* WIP#2 func_8014EBC

* matched func_80149EBC

* WIP func_8014CCB4

* matched func_8014CCB4

* matched func_80151A68

* WIP func_8014D62C

* fix func_8015A68 signature

* z_message_nes & z_message_staff progress

* z_message_nes & z_message_staff renaming

* documenting z_message

* cleaning & renaming

* documenting MessageContext

* matched func_80151A68

* format

* naming convention fix

* re-add func_80147564

* apply renaming of Message_ShouldAdvanceSilent on the whole project

* re-format, add clang-format off/on in z_message.c needed for matching

* rename staff => credits; add renames in actorfixer.

* change rupees array to ascii

* remove useless comments

* change MessageContext.decodedBuffer to a union

* remove decodedBuffer from actorfixer

* applied AngheloAlf suggestions & ran sfxconvert on z_message.c

* rename message_struct => message_data_static; revert decodedBuffer as union creating differences.

* use true/false instead of 1/0

* use SET_FULLSCREEN_VIEWPORT macro in func_80152c64

* AngheloAlf suggestions.

* extract assign from dayTime calculation for readability in Message_LoadTimeNES

* remove bss_reordering from osFlash, idle & boot_main to typedef MessageTableEntry in message_data_static & make decodedBuffer an union.

* remove useless casts

* Changes hexa to ascii chars when it's meaningful;
add comments to func_8014CCB4 to show what hexa constant means.

* Hensldm suggestions

* ran actorfixer on new changes; fix new bss reordering error introduced with rebase

* use new TIME_TO_MINUTES_F macro

* re-ran format.sh

* hensldm suggestions #2 + overall cleaning

* remove useless parenthesis

* Update include/message_data_static.h

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>

* actorfixer and format

* more fixes

Co-authored-by: Andzura <andzura@andzura.fr>
Co-authored-by: abaud <adrien.baud@inria.fr>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
This commit is contained in:
Andzura 2022-03-27 17:09:47 +02:00 committed by GitHub
parent 02cb971616
commit 4f3202fd7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
116 changed files with 1377 additions and 574 deletions

View File

@ -159,14 +159,14 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 != 4) {
if (temp_v0 != 5) {
if ((temp_v0 == 6) && (func_80147624(globalCtx) != 0)) {
if ((temp_v0 == 6) && (Message_ShouldAdvance(globalCtx) != 0)) {
this->actionFunc = func_80952734;
return;
}
// Duplicate return node #17. Try simplifying control flow for better match
return;
}
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
func_801477B4(globalCtx);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
@ -175,7 +175,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
// Duplicate return node #17. Try simplifying control flow for better match
return;
}
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
temp_v0_2 = globalCtx->msgCtx.choiceIndex;
if (temp_v0_2 != 0) {
if (temp_v0_2 != 1) {
@ -211,7 +211,7 @@ which is long, messy, and contains some rather nasty-looking control flow, inclu
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 != 4) {
if (temp_v0 != 5) {
if ((temp_v0 == 6) && (func_80147624(globalCtx) != 0)) {
if ((temp_v0 == 6) && (Message_ShouldAdvance(globalCtx) != 0)) {
this->actionFunc = func_80952734;
return;
}
@ -248,13 +248,13 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
if (temp_v0 != 6) {
goto block_17;
}
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
goto block_17;
}
this->actionFunc = func_80952734;
return;
block_5:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
goto block_17;
}
func_801477B4(globalCtx);
@ -262,7 +262,7 @@ block_5:
this->actionFunc = func_809529AC;
return;
block_7:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
goto block_17;
}
temp_v0_2 = globalCtx->msgCtx.choiceIndex;
@ -350,13 +350,13 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
if (temp_v0 != 6) {
goto block_17;
}
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
goto block_17;
}
this->actionFunc = func_80952734;
return;
block_5:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
goto block_17;
}
func_801477B4(globalCtx);
@ -364,7 +364,7 @@ block_5:
this->actionFunc = func_809529AC;
return;
block_7:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
goto block_17;
}
temp_v0_2 = globalCtx->msgCtx.choiceIndex;
@ -420,13 +420,13 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
if (temp_v0 != 6) {
return;
}
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
return;
}
this->actionFunc = func_80952734;
return;
block_5:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
return;
}
func_801477B4(globalCtx);
@ -434,7 +434,7 @@ block_5:
this->actionFunc = func_809529AC;
return;
block_7:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
return;
}
temp_v0_2 = globalCtx->msgCtx.choiceIndex;
@ -557,7 +557,7 @@ There's a couple of other obvious things here:
Well, at least the bottom half looks respectable now. Again, there is no code after the switch, so the next thing up, namely
```C
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
return;
}
```
@ -578,13 +578,13 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
if (temp_v0 != 6) {
return;
}
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
return;
}
this->actionFunc = func_80952734;
return;
block_5:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
return;
}
func_801477B4(globalCtx);
@ -592,7 +592,7 @@ block_5:
this->actionFunc = func_809529AC;
return;
block_7:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_801477B4(globalCtx);
@ -647,7 +647,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
break;
case 5:
if (func_80147624(globalCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) == 0) {
return;
}
func_801477B4(globalCtx);
@ -656,7 +656,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
break;
case 4:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_801477B4(globalCtx);
@ -700,7 +700,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
break;
case 5:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
func_801477B4(globalCtx);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
@ -708,7 +708,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
break;
case 4:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_801477B4(globalCtx);

View File

@ -183,7 +183,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
return;
}
if ((temp_v0_2 == 5) && (func_80147624(globalCtx) != 0)) {
if ((temp_v0_2 == 5) && (Message_ShouldAdvance(globalCtx) != 0)) {
if (this->actor.textId == 0x2AD9) {
Flags_SetSwitch(globalCtx, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 10.0f);
@ -500,7 +500,7 @@ void func_80C102D4(EnRecepgirl* this, GlobalContext* globalCtx) {
if (temp_v0_2 == 2) {
this->actor.textId = 0x2ADC; // hear directions again?
func_80C10148(this);
} else if ((temp_v0_2 == 5) && (func_80147624(globalCtx) != 0)) {
} else if ((temp_v0_2 == 5) && (Message_ShouldAdvance(globalCtx) != 0)) {
if (this->actor.textId == 0x2AD9) { // "Welcome..."
Flags_SetSwitch(globalCtx, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 10.0f);

View File

@ -288,7 +288,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
func_80C10148(this);
return;
}
if (((temp_v0_2 & 0xFF) == 5) && (func_80147624(globalCtx) != 0)) {
if (((temp_v0_2 & 0xFF) == 5) && (Message_ShouldAdvance(globalCtx) != 0)) {
temp_v0_3 = this->actor.textId;
if (temp_v0_3 == 0x2AD9) {
Flags_SetSwitch(globalCtx, (s32) this->actor.params);
@ -347,7 +347,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
return;
}
if (((temp_v0_2 & 0xFF) == 5) && (func_80147624(globalCtx) != 0)) {
if (((temp_v0_2 & 0xFF) == 5) && (Message_ShouldAdvance(globalCtx) != 0)) {
if (this->actor.textId == 0x2AD9) {
Flags_SetSwitch(globalCtx, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600AD98, 10.0f);
@ -397,7 +397,7 @@ somehow we skipped over `t0`. Where is this in the code? The `153` in the middle
return;
}
if (((temp_v0_2 & 0xFF) == 5) && (func_80147624(globalCtx) != 0)) {
if (((temp_v0_2 & 0xFF) == 5) && (Message_ShouldAdvance(globalCtx) != 0)) {
```
If you look at the conditionals and the declaration of `temp_v0_2`, you may notice something odd: `temp_v0_2` is a `u8`. Therefore the `& 0xFF` does nothing! It's surprisingly common for this to happen, be it leaving out a `& 0xFF` or adding an extraneous one. If we remove it, we get a match:

View File

@ -1801,7 +1801,7 @@ void func_80105818(GlobalContext* globalCtx, u32 uParm2, TransitionActorEntry* p
// void func_80109F78(void);
s32 func_8010A000(GlobalContext* globalCtx);
s32 func_8010A074(GlobalContext* globalCtx);
// void func_8010A0A4(void);
s32 func_8010A0A4(GlobalContext* globalCtx);
// void func_8010A0F0(void);
// void func_8010A164(void);
// void func_8010A194(void);
@ -2609,10 +2609,10 @@ void func_80147198(SramContext* param_1);
// void Sram_nop8014750C(UNK_TYPE4 param_1);
// void func_80147520(void);
void func_80147564(GlobalContext* globalCtx);
s32 func_80147624(GlobalContext* globalCtx);
s32 func_80147734(GlobalContext* globalCtx);
s32 Message_ShouldAdvance(GlobalContext* globalCtx);
s32 Message_ShouldAdvanceSilent(GlobalContext* globalCtx);
void func_801477B4(GlobalContext* globalCtx);
// void func_80147818(GlobalContext* globalCtx, UNK_PTR puParm2, UNK_TYPE4 uParm3, UNK_TYPE4 uParm4);
void func_80147818(GlobalContext* globalCtx, UNK_PTR puParm2, UNK_TYPE4 uParm3, UNK_TYPE4 uParm4);
// void func_80147F18(GlobalContext* globalCtx, UNK_PTR puParm2, UNK_TYPE4 uParm3, UNK_TYPE4 uParm4);
// void func_80148558(GlobalContext* globalCtx, UNK_PTR puParm2, UNK_TYPE4 uParm3, UNK_TYPE4 uParm4);
void func_80148B98(GlobalContext* globalCtx, u8 bParm2);
@ -2623,28 +2623,28 @@ void func_80148B98(GlobalContext* globalCtx, u8 bParm2);
// void func_80149454(void);
// void func_801496C8(void);
// void func_8014995C(void);
// void func_80149C18(void);
// void func_80149EBC(void);
void func_80149C18(GlobalContext* globalCtx);
// void Message_FindMessage(void);
void func_80149F74(GlobalContext* globalCtx, u32** ppuParm2);
// void func_8014AAD0(void);
void func_8014ADBC(GlobalContext* globalCtx, UNK_PTR puParm2);
// void func_8014C70C(void);
// void func_8014CC14(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
void Message_LoadChar(GlobalContext* globalCtx, u16 codePointIndex, s32* offset, f32* arg3, s16 arg4);
// void func_8014CCB4(void);
// void func_8014CDF0(void);
// void func_8014CFDC(void);
// void func_8014D304(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
void func_8014D304(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8014D62C(void);
// void func_8014D7B4(void);
// void func_80150A84(void);
void func_80150A84(GlobalContext* globalCtx);
void func_80150D08(GlobalContext* globalCtx, u32 uParm2);
// void func_801514B0(void);
void Message_StartTextbox(GlobalContext* globalCtx, u16 textId, Actor* Actor);
void func_80151938(GlobalContext* globalCtx, u16 textId);
void func_80151A68(GlobalContext* globalCtx, u16 textId);
void func_80151BB4(GlobalContext* globalCtx, u32 uParm2);
void func_80151BB4(GlobalContext* globalCtx, u8 uParm2);
// void func_80151C9C(void);
// void func_80151DA4(void);
void func_80151DA4(GlobalContext* globalCtx, u16 arg2);
void func_80152434(GlobalContext* globalCtx, u16 arg2);
// void func_80152464(void);
u8 Message_GetState(MessageContext* msgCtx);
@ -2656,23 +2656,23 @@ u8 Message_GetState(MessageContext* msgCtx);
// void func_80153750(void);
// void func_80153E7C(void);
// void func_80153EF0(void);
// void func_801541D4(void);
void func_801541D4(GlobalContext* globalCtx, Gfx** gfxp);
// void func_80156758(void);
void func_8015680C(GlobalContext* globalCtx);
void func_801586A4(GlobalContext* globalCtx);
void Message_Init(GlobalContext* globalCtx);
void func_801588D0(GlobalContext* globalCtx, s16 param_2);
// void func_80158988(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void func_80158A24(void);
// void func_80158C04(void);
// void func_80158D98(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void func_80158FB0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8015926C(void);
void Message_FindMessageNES(GlobalContext* globalCtx, u16 textId);
// void Message_LoadCharNES(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void Message_LoadPluralRupeesNES(void);
// void Message_LoadLocalizedRupeesNES(void);
// void Message_LoadRupeesNES(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void Message_LoadTimeNES(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void Message_LoadAreaTextNES(void);
// void func_80159438(void);
// void func_8015966C(void);
void func_8015966C(GlobalContext* globalCtx, UNK_PTR puParm2, UNK_TYPE arg3);
// void func_8015A144(void);
// void func_8015B198(void);
// void func_8015E750(void);
void func_8015B198(GlobalContext* globalCtx);
void Message_FindCreditsMessage(GlobalContext *globalCtx, u16 textId);
void func_8015E7EC(GlobalContext* globalCtx, UNK_PTR puParm2);
// void func_8015F8A8(UNK_TYPE4 ctxt);

View File

@ -0,0 +1,12 @@
#ifndef MESSAGE_DATA_STATIC_H
#define MESSAGE_DATA_STATIC_H
#include "PR/ultratypes.h"
typedef struct MessageTableEntry{
/* 0x0 */ u16 textId;
/* 0x2 */ u8 typePos;
/* 0x4 */ const char* segment;
} MessageTableEntry; // size = 0x8;
#endif

View File

@ -1412,9 +1412,7 @@ extern u16 D_801C6A44;
// extern UNK_TYPE1 D_801C6A98;
// extern UNK_TYPE1 D_801C6AB8;
// extern UNK_TYPE1 D_801C6B28;
// extern UNK_TYPE1 D_801C6B98;
// extern UNK_TYPE1 D_801CED40;
// extern UNK_TYPE1 D_801CFB08;
// extern UNK_TYPE2 D_801CFC78;
// extern UNK_TYPE1 D_801CFC7A;
// extern UNK_TYPE1 D_801CFC7C;
@ -1424,8 +1422,8 @@ extern u16 D_801C6A44;
// extern UNK_TYPE1 D_801CFC8C;
// extern UNK_TYPE1 D_801CFC8E;
// extern UNK_TYPE1 D_801CFC92;
// extern UNK_TYPE1 D_801CFC98;
// extern UNK_TYPE2 D_801CFCA4;
extern u8 D_801CFC98;
extern s16 D_801CFCA4[9];
// extern UNK_TYPE2 D_801CFCAC;
// extern UNK_TYPE1 D_801CFCB8;
// extern UNK_TYPE2 D_801CFCD8;
@ -1517,11 +1515,11 @@ extern char D_801D039C[];
// extern UNK_TYPE1 D_801D0428;
// extern UNK_TYPE1 D_801D045A;
// extern UNK_TYPE1 D_801D0462;
// extern UNK_TYPE1 D_801D0468;
//extern UNK_TYPE1 D_801D0468;
// extern UNK_TYPE1 D_801D0470;
extern char D_801D06F0[];
// extern char D_801D06F0[];
// extern UNK_TYPE1 D_801D0710;
extern char D_801D0714[];
// extern char D_801D0714[];
// extern UNK_TYPE1 D_801D07C4;
// extern UNK_TYPE1 D_801D07DC;
// extern UNK_TYPE1 D_801D080C;

View File

@ -21,6 +21,7 @@
#include "ichain.h"
#include "sequence.h"
#include "sfx.h"
#include "message_data_static.h"
#include "z64actor.h"
#include "z64animation.h"
@ -174,7 +175,7 @@ typedef struct {
} msgBuf;
/* 0x11D80 */ u8* messageStart;
/* 0x11D84 */ u8* messageEnd;
/* 0x11D88 */ u8 unk_11D88;
/* 0x11D88 */ u8 unk_11D88; // current Char Buffer ?
} Font; // size = 0x11D8C
// Game Info aka. Static Context
@ -839,44 +840,91 @@ typedef struct {
typedef struct {
/* 0x00000 */ View view;
/* 0x00168 */ Font font;
/* 0x11EF4 */ char unk_11EF4[0x10];
/* 0x11F04 */ u16 unk11F04;
/* 0x11EF4 */ char unk_11EF4[0x4];
/* 0x11EF8 */ UNK_PTR unk11EF8;
/* 0x11EFC */ UNK_TYPE1 unk11EFC[0x8];
/* 0x11F04 */ u16 currentTextId;
/* 0x11F06 */ UNK_TYPE1 pad11F06[0x4];
/* 0x11F0A */ u8 unk11F0A;
/* 0x11F0B */ UNK_TYPE1 pad11F0B[0x5];
/* 0x11F10 */ s32 unk11F10;
/* 0x11F14 */ UNK_TYPE1 pad11F14[0xE];
/* 0x11F14 */ UNK_TYPE1 pad11F14[0x6];
/* 0x11F1A */ s16 unk11F1A[3];
/* 0x11F20 */ UNK_TYPE1 pad11F20[0x2];
/* 0x11F22 */ u8 msgMode;
/* 0x11F23 */ UNK_TYPE1 pad11F23[0xFD];
/* 0x11F23 */ UNK_TYPE1 pad11F23;
/* 0x11F24 */ union {
u8 schar[206];
u16 wchar[103];
} decodedBuffer;
/* 0x11FF2 */ u16 unk11FF2;
/* 0x11FF4 */ s16 unk11FF4;
/* 0x11FF6 */ s16 unk11FF6;
/* 0x11FF8 */ UNK_TYPE1 unk11FF8[0x6];
/* 0x11FFE */ s16 unk11FFE[0x3];
/* 0x12004 */ s16 unk12004;
/* 0x12006 */ s16 unk12006;
/* 0x12008 */ u8 unk12008[0x16];
/* 0x1201E */ s16 unk1201E;
/* 0x12020 */ u8 unk12020;
/* 0x12021 */ u8 choiceIndex;
/* 0x12022 */ u8 unk12022;
/* 0x12023 */ u8 unk12023;
/* 0x12024 */ UNK_TYPE1 unk12024[0x6];
/* 0x12024 */ s16 unk12024;
/* 0x12026 */ u16 unk12026;
/* 0x12028 */ u16 songPlayed;
/* 0x1202A */ u16 ocarinaMode;
/* 0x1202C */ u16 ocarinaAction;
/* 0x1202E */ u16 unk1202E;
/* 0x12030 */ s16 unk_12030;
/* 0x12032 */ UNK_TYPE1 unk_12032[0x2];
/* 0x12034 */ UNK_TYPE1 pad12034[0x10];
/* 0x12034 */ UNK_TYPE1 pad12034[0x6];
/* 0x1203A */ s16 unk1203A;
/* 0x1203C */ s16 unk1203C;
/* 0x1203E */ s16 pad1203E;
/* 0x12040 */ Actor* unkActor;
/* 0x12044 */ s16 unk12044;
/* 0x12046 */ UNK_TYPE1 pad12046[0x2];
/* 0x12046 */ s16 unk12046;
/* 0x12048 */ u8 unk12048; // EnKakasi
/* 0x12049 */ UNK_TYPE1 pad12049[0xB];
/* 0x12054 */ s16 unk12054[5]; // Number entry
/* 0x1205A */ UNK_TYPE1 pad1205A[0xC];
/* 0x12049 */ UNK_TYPE1 pad12049[0x1];
/* 0x1204A */ s16 unk1204A[0x5];
/* 0x12054 */ s16 unk12054[3]; // First, second and third digits in lottery code guess
/* 0x1205A */ UNK_TYPE1 pad1205A[0xE];
/* 0x12068 */ s16 unk12068;
/* 0x1206A */ s16 unk1206A;
/* 0x1206C */ s32 unk1206C;
/* 0x12070 */ s32 unk12070;
/* 0x12074 */ UNK_TYPE1 pad12074[0x4];
/* 0x12078 */ s32 bankRupeesSelected;
/* 0x1207C */ s32 bankRupees;
/* 0x12080 */ UNK_TYPE1 pad12080[0x30];
/* 0x12080 */ MessageTableEntry* messageEntryTable;
/* 0x12084 */ MessageTableEntry* messageEntryTableNes;
/* 0x12088 */ UNK_TYPE4 unk12088;
/* 0x1208C */ MessageTableEntry* messageTableStaff;
/* 0x12090 */ s16 unk12090;
/* 0x12092 */ s16 unk12092;
/* 0x12094 */ s8 unk12094;
/* 0x12095 */ UNK_TYPE1 unk12095[0x3];
/* 0x12098 */ f32 unk12098; // Text_Scale?
/* 0x1209C */ s16 unk1209C;
/* 0x1209E */ UNK_TYPE1 unk1209E[0x2];
/* 0x120A0 */ s32 unk120A0;
/* 0x120A4 */ UNK_TYPE1 unk120A4[0xC];
/* 0x120B0 */ u8 unk120B0;
/* 0x120B1 */ u8 unk120B1;
/* 0x120B2 */ UNK_TYPE1 pad120B2[0x22];
/* 0x120D4 */ UNK_TYPE2 unk120D4;
/* 0x120D6 */ UNK_TYPE2 unk120D6;
/* 0x120B2 */ u8 unk120B2[0xC];
/* 0x120BE */ s16 unk120BE;
/* 0x120C0 */ s16 unk120C0;
/* 0x120C2 */ s16 unk120C2;
/* 0x120C4 */ s32 unk120C4;
/* 0x120C8 */ s16 unk120C8;
/* 0x120CA */ s16 unk120CA;
/* 0x120CC */ s16 unk120CC;
/* 0x120CE */ s16 unk120CE;
/* 0x120D0 */ s16 unk120D0;
/* 0x120D2 */ s16 unk120D2;
/* 0x120D4 */ s16 unk120D4;
/* 0x120D6 */ s16 unk120D6;
/* 0x120D8 */ UNK_TYPE1 pad120D8[0x8];
} MessageContext; // size = 0x120E0

View File

@ -1055,7 +1055,7 @@ void Cutscene_Command_Textbox(GlobalContext* globalCtx, CutsceneContext* csCtx,
dialogState = Message_GetState(&globalCtx->msgCtx);
if ((dialogState != 2) && (dialogState != 0) && (dialogState != 7) && (dialogState != 8)) {
csCtx->frames--;
if ((dialogState == 4) && func_80147624(globalCtx)) {
if ((dialogState == 4) && Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) {
if (cmd->base == 0x33BD) {
func_8019F230();
@ -1093,7 +1093,7 @@ void Cutscene_Command_Textbox(GlobalContext* globalCtx, CutsceneContext* csCtx,
}
}
if (dialogState == 5 && func_80147624(globalCtx) != 0) {
if (dialogState == 5 && Message_ShouldAdvance(globalCtx) != 0) {
func_80152434(globalCtx, cmd->base);
}
}

View File

@ -1,14 +1,111 @@
#include "global.h"
#include "message_data_static.h"
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80147520.s")
#if 0
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80147564.s")
s16 D_801D02D8[15] = {
ACTOR_OCEFF_WIPE5, ACTOR_OCEFF_WIPE5, // Sonata of Awakening Effect, Sonata of Awakening Effect
ACTOR_OCEFF_WIPE5, ACTOR_OCEFF_WIPE5, // Sonata of Awakening Effect, Sonata of Awakening Effect
ACTOR_OCEFF_WIPE5, ACTOR_OCEFF_WIPE5, // Sonata of Awakening Effect, Sonata of Awakening Effect
ACTOR_OCEFF_WIPE, ACTOR_OCEFF_WIPE7, // Song of Time Effect, Song of Healing Effect
ACTOR_OCEFF_WIPE2, ACTOR_OCEFF_WIPE6, // Epona's Song Effect, Song of Soaring Effect
ACTOR_OCEFF_STORM, ACTOR_OCEFF_SPOT, // Song of Storms Effect II [?], Sun's Song Effect
ACTOR_OCEFF_WIPE, ACTOR_OCEFF_WIPE, // Song of Time Effect, Song of Time Effect
ACTOR_OCEFF_WIPE4 // Scarecrow's Song Effect
};
s32 D_801D02F8[15] = { 0,1,2,3,4,0,1,0,0,0,0,0,1,1,0 };
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80147624.s")
#endif
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80147734.s")
extern u16 D_801C6AB8[];
extern u16 D_801C6B28[];
extern s16 D_801D02D8[];
extern s32 D_801D02F8[];
extern s16 D_801F6B0C;
extern s16 D_801F6B0E;
extern s16 D_801F6B10;
extern s16 D_801F6B12;
extern s16 D_801F6B14;
extern s16 D_801F6B16;
extern s16 D_801F6B18;
extern s16 D_801F6B1A;
extern s16 D_801F6B1C;
extern s16 D_801F6B1E;
extern s16 D_801F6B20;
extern s16 D_801F6B22;
extern MessageTableEntry D_801C6B98[];
extern MessageTableEntry D_801CFB08[];
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801477B4.s")
void func_80147520(void) {
D_801CFC98 = 0xFF;
D_801CFCA4[0] = D_801CFCA4[1] = D_801CFCA4[2] = D_801CFCA4[3] = D_801CFCA4[4] = D_801CFCA4[5] = D_801CFCA4[6] =
D_801CFCA4[7] = D_801CFCA4[8] = 0;
}
void func_80147564(GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx;
msgCtx->unk1204A[0] = 0xBD;
msgCtx->unk1204A[1] = 0xB8;
msgCtx->unk1204A[2] = 0xB3;
msgCtx->unk1204A[3] = 0xAE;
msgCtx->unk1204A[4] = 0xA9;
func_80147520();
D_801F6B0C = 0x50;
D_801F6B10 = 0x96;
D_801F6B0E = 0xFF;
D_801F6B12 = 0xA;
D_801F6B16 = 0xA;
D_801F6B14 = 0xA;
D_801F6B18 = 0xFF;
D_801F6B1C = 0xFF;
D_801F6B1A = 0x32;
D_801F6B1E = 0xA;
D_801F6B22 = 0xA;
D_801F6B20 = 0xA;
}
s32 Message_ShouldAdvance(GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx;
Input* controller = CONTROLLER1(globalCtx);
if ((msgCtx->unk12020 == 0x10) || (msgCtx->unk12020 == 0x11)) {
if (CHECK_BTN_ALL(controller->press.button, BTN_A)) {
play_sound(NA_SE_SY_MESSAGE_PASS);
}
return CHECK_BTN_ALL(controller->press.button, BTN_A);
} else {
if (CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->press.button, BTN_B) ||
CHECK_BTN_ALL(controller->press.button, BTN_CUP)) {
play_sound(NA_SE_SY_MESSAGE_PASS);
}
return CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->press.button, BTN_B) ||
CHECK_BTN_ALL(controller->press.button, BTN_CUP);
}
}
s32 Message_ShouldAdvanceSilent(GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx;
Input* controller = CONTROLLER1(globalCtx);
if (msgCtx->unk12020 == 0x10 || msgCtx->unk12020 == 0x11) {
return CHECK_BTN_ALL(controller->press.button, BTN_A);
} else {
return CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->press.button, BTN_B) ||
CHECK_BTN_ALL(controller->press.button, BTN_CUP);
}
}
void func_801477B4(GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx;
if (globalCtx->msgCtx.unk11F10 != 0) {
msgCtx->unk12023 = 2;
msgCtx->msgMode = 0x43;
msgCtx->unk12020 = 0;
play_sound(NA_SE_PL_WALK_GROUND - SFX_FLAG);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80147818.s")
@ -16,9 +113,51 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80148558.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80148B98.s")
#ifdef NON_MATCHING
void func_80148B98(GlobalContext* globalCtx, u8 arg1) {
static s16 held = 0;
MessageContext* msgCtx = &globalCtx->msgCtx;
Input* curInput = CONTROLLER1(globalCtx);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80148CBC.s")
if ((curInput->rel.stick_y > 29) && held == 0) {
held = 1;
msgCtx->choiceIndex--;
if (msgCtx->choiceIndex > 128) {
msgCtx->choiceIndex = 0;
} else {
play_sound(NA_SE_SY_CURSOR);
}
return;
} else if ((curInput->rel.stick_y < -29) && held == 0) {
held = 1;
msgCtx->choiceIndex++;
if (msgCtx->choiceIndex > arg1) {
msgCtx->choiceIndex = arg1;
} else {
play_sound(NA_SE_SY_CURSOR);
}
return;
} else {
if (ABS_ALT(curInput->rel.stick_y) < 30) {
held = 0;
}
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80148B98.s")
#endif
void func_80148CBC(GlobalContext* globalCtx, UNK_PTR puParm2, u8 arg2) {
MessageContext* msgCtx = &globalCtx->msgCtx;
msgCtx->unk11FF4 = 0x30;
if (arg2 == 1) {
msgCtx->unk11FF6 = msgCtx->unk11FFE[1 + msgCtx->choiceIndex];
} else {
msgCtx->unk11FF6 = msgCtx->unk11FFE[msgCtx->choiceIndex];
}
func_80147818(globalCtx, puParm2, msgCtx->unk11FF4, msgCtx->unk11FF6);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80148D64.s")
@ -34,7 +173,33 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80149C18.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80149EBC.s")
void Message_FindMessage(GlobalContext* globalCtx, u16 textId) {
MessageContext* msgCtx = &globalCtx->msgCtx;
Font* font = &msgCtx->font;
MessageTableEntry* msgEntry = msgCtx->messageEntryTable;
const char* segment = msgEntry->segment;
const char* foundSegment;
const char* nextSegment;
while (msgEntry->textId != 0xFFFF) {
if (msgEntry->textId == textId) {
foundSegment = msgEntry->segment;
msgEntry++;
nextSegment = msgEntry->segment;
font->messageStart = foundSegment - segment;
font->messageEnd = nextSegment - foundSegment;
return;
}
msgEntry++;
}
msgEntry = msgCtx->messageEntryTable;
foundSegment = msgEntry->segment;
msgEntry++;
nextSegment = msgEntry->segment;
font->messageStart = foundSegment - segment;
font->messageEnd = nextSegment - foundSegment;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80149F74.s")
@ -44,9 +209,43 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014C70C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014CC14.s")
void Message_LoadChar(GlobalContext* globalCtx, u16 codePointIndex, s32* offset, f32* arg3, s16 decodedBufPos) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s32 temp1 = *offset;
f32 temp2 = *arg3;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014CCB4.s")
Font_LoadChar(globalCtx, codePointIndex, temp1);
msgCtx->decodedBuffer.wchar[decodedBufPos] = codePointIndex;
temp1 += FONT_CHAR_TEX_SIZE;
temp2 += (16.0f * msgCtx->unk12098);
*offset = temp1;
*arg3 = temp2;
}
// Message_LoadRupees JPN ?
void func_8014CCB4(GlobalContext* globalCtx, s16* decodedBufPos, s32* offset, f32* arg3) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s16 t = *decodedBufPos;
s32 k = *offset;
f32 f = *arg3;
Font_LoadChar(globalCtx, 0x838B, k); // 0x838b = ル in JISX0213
k += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.wchar[t] = 0x838B;
t += 1;
Font_LoadChar(globalCtx, 0x8373, k); // 0x8373 = ピ in JISX0213
k += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.wchar[t] = 0x8373;
t += 1;
Font_LoadChar(globalCtx, 0x815C, k); // Ox815C = ― in JISX0213
k += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.wchar[t] = 0x815C;
f += 16.0f * msgCtx->unk12098 * 3.0f;
*decodedBufPos = t;
*offset = k;
*arg3 = f;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014CDF0.s")
@ -54,7 +253,62 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014D304.s")
#ifdef NON_EQUIVALENT
extern u16* D_801D0188;
extern s16* D_801D0250;
void func_8014D62C(GlobalContext* arg0, s32* arg1, f32* arg2, s16* arg3) {
f32 sp3C;
s16 temp_s0;
s16 temp_s1;
s16 temp_s1_2;
s16 temp_s6;
s32 temp_s2;
s32 temp_s2_2;
u16* temp_v0;
s16 phi_v0;
s16 phi_s0;
s16 phi_s1;
s32 phi_s2;
s16 phi_s1_2;
s32 phi_s2_2;
temp_s1 = *arg3;
temp_s2 = *arg1;
sp3C = *arg2;
if ((func_8010A0A4(arg0) != 0) || (arg0->sceneNum == 0x4F)) {
phi_v0 = 0xA;
} else {
phi_v0 = arg0->pauseCtx.unk_238[4];
}
temp_s6 = *(&D_801D0250 + (phi_v0 * 2));
phi_s0 = 0;
phi_s1_2 = temp_s1;
phi_s2_2 = temp_s2;
if ((s32)temp_s6 > 0) {
phi_s1 = temp_s1;
phi_s2 = temp_s2;
do {
temp_v0 = (phi_v0 * 0x12) + &D_801D0188 + (phi_s0 * 2);
(arg0 + 0x4908 + (phi_s1 * 2))->decodedBuffer = (u16)*temp_v0;
Font_LoadChar(arg0, *temp_v0, phi_s2);
temp_s0 = phi_s0 + 1;
temp_s1_2 = phi_s1 + 1;
temp_s2_2 = phi_s2 + 0x80;
phi_s0 = temp_s0;
phi_s1 = temp_s1_2;
phi_s2 = temp_s2_2;
phi_s1_2 = temp_s1_2;
phi_s2_2 = temp_s2_2;
} while ((s32)temp_s0 < (s32)temp_s6);
}
*arg3 = phi_s1_2 - 1;
*arg1 = phi_s2_2;
*arg2 = sp3C + ((f32)(temp_s6 - 1) * (16.0f * arg0->msgCtx.unk12098));
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014D62C.s")
#endif
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014D7B4.s")
@ -64,46 +318,239 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801514B0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_StartTextbox.s")
void Message_StartTextbox(GlobalContext* globalCtx, u16 textId, Actor* Actor) {
MessageContext* msgCtx = &globalCtx->msgCtx;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80151938.s")
msgCtx->ocarinaAction = 0xFFFF;
func_80150D08(globalCtx, textId);
msgCtx->unkActor = Actor;
msgCtx->msgMode = 1;
msgCtx->unk12023 = 0;
msgCtx->unk12024 = 0;
globalCtx->msgCtx.ocarinaMode = 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80151A68.s")
void func_80151938(GlobalContext* globalCtx, u16 textId) {
MessageContext* msgCtx = &globalCtx->msgCtx;
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80151BB4.s")
msgCtx->unk11F10 = 0;
func_80150D08(globalCtx, textId);
func_80150A84(globalCtx);
msgCtx->msgMode = 5;
msgCtx->unk12023 = 8;
msgCtx->unk12024 = 0;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80151C9C.s")
if (interfaceCtx->unk_222 == 0) {
if (textId != 0x1B93) {
func_8011552C(globalCtx, 0x10);
} else if (textId != 0xF8) {
func_8011552C(globalCtx, 6);
}
}
msgCtx->unk1203C = msgCtx->unk1203A;
if (globalCtx->pauseCtx.unk_1F0 != 0) {
msgCtx->unk12004 = 0x22;
msgCtx->unk12006 = 0x15E;
func_80149C18(globalCtx);
msgCtx->unk12023 = 1;
}
}
void func_80151A68(GlobalContext* globalCtx, u16 textId) {
MessageContext* msgCtx = &globalCtx->msgCtx;
msgCtx->unk11F10 = 0;
func_80150D08(globalCtx, textId);
func_80150A84(globalCtx);
func_8015B198(globalCtx);
msgCtx->msgMode = 0x45;
msgCtx->unk12024 = 0;
msgCtx->unk1203C = msgCtx->unk1203A = msgCtx->unk1201E = 0;
msgCtx->unk12023 = 0x1E;
// Day/Dawn/Night.. Messages
if ((msgCtx->currentTextId >= 0x1BB2) && (msgCtx->currentTextId < 0x1BB7)) {
XREG(74) = 0x6A;
XREG(75) = 0;
XREG(77) = 0x58;
XREG(76) = 0x44;
} else {
XREG(74) = 0x42;
XREG(75) = 0x1E;
XREG(77) = 0x3C;
XREG(76) = 0x1C;
msgCtx->unk11F1A[0] = msgCtx->unk11F1A[1] = msgCtx->unk11F1A[2] = 0;
Interface_ChangeAlpha(1);
}
}
void func_80151BB4(GlobalContext* globalCtx, u8 arg1) {
MessageContext* msgCtx = &globalCtx->msgCtx;
u8 temp = arg1;
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if ((gSaveContext.weekEventReg[D_801C6B28[arg1] >> 8] & (u8)D_801C6B28[arg1]) == 0) {
msgCtx->unk120B2[msgCtx->unk120B1] = temp;
msgCtx->unk120B1++;
}
} else if (arg1 >= 20) {
if ((gSaveContext.weekEventReg[D_801C6B28[arg1] >> 8] & (u8)D_801C6B28[arg1]) == 0) {
msgCtx->unk120B2[msgCtx->unk120B1] = temp;
msgCtx->unk120B1++;
}
}
}
u32 func_80151C9C(GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx;
u8 flag;
while (true) {
if (msgCtx->unk120B1 == 0) {
return 0;
}
msgCtx->unk120B1--;
if ((gSaveContext.weekEventReg[D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]] >> 8] &
(u8)D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]]) == 0) {
flag = gSaveContext.weekEventReg[D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]] >> 8];
gSaveContext.weekEventReg[D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]] >> 8] =
flag | (u8)D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]];
if ((D_801C6AB8[msgCtx->unk120B2[msgCtx->unk120B1]] != 0) && CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
func_80151938(globalCtx, D_801C6AB8[msgCtx->unk120B2[msgCtx->unk120B1]]);
play_sound(NA_SE_SY_SCHEDULE_WRITE);
return 1;
}
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80151DA4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152434.s")
void func_80152434(GlobalContext* globalCtx, u16 arg2) {
globalCtx->msgCtx.unk12046 = 0;
func_80151DA4(globalCtx, arg2);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152464.s")
void func_80152464(GlobalContext* globalCtx, u16 arg1) {
globalCtx->msgCtx.unk12046 = 1;
func_80151DA4(globalCtx, arg1);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_GetState.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8015268C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152C64.s")
void func_80152C64(View* view) {
SET_FULLSCREEN_VIEWPORT(view);
func_8013FBC8(view);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152CAC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152EC0.s")
// Spawn song effect?
void func_80152EC0(GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx;
Player* player = GET_PLAYER(globalCtx);
if (1) {}
if ((msgCtx->songPlayed < 0x17) && (msgCtx->songPlayed != 0xE) &&
((msgCtx->ocarinaAction < 0x43) || (msgCtx->ocarinaAction >= 0x47))) {
msgCtx->unk120B0 = 1;
if (msgCtx->songPlayed != 0x16) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, D_801D02D8[msgCtx->songPlayed], player->actor.world.pos.x,
player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, D_801D02F8[msgCtx->songPlayed]);
return;
}
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_OCEFF_WIPE4, player->actor.world.pos.x,
player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, 0);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152FB8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80153750.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80153E7C.s")
void func_80153E7C(GlobalContext* globalCtx, void* arg1) {
if ((gSaveContext.language == 0) && (globalCtx->msgCtx.unk12090 == 0)) {
func_8014ADBC(globalCtx, arg1);
return;
}
if (globalCtx->msgCtx.unk12090 != 0) {
func_8015E7EC(globalCtx, arg1);
return;
}
func_8015966C(globalCtx, arg1, 0);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80153EF0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801541D4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80156758.s")
void func_80156758(GlobalContext* globalCtx) {
Gfx* nextDisplayList;
Gfx* polyOpa;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
OPEN_DISPS(gfxCtx);
polyOpa = POLY_OPA_DISP;
nextDisplayList = Graph_GfxPlusOne(polyOpa);
gSPDisplayList(OVERLAY_DISP++, nextDisplayList);
if ((globalCtx->msgCtx.currentTextId != 0x5E6) || (func_801690CC(globalCtx) == 0)) {
func_801541D4(globalCtx, &nextDisplayList);
}
gSPEndDisplayList(nextDisplayList++);
Graph_BranchDlist(polyOpa, nextDisplayList);
POLY_OPA_DISP = nextDisplayList;
CLOSE_DISPS(gfxCtx);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8015680C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801586A4.s")
void func_801586A4(GlobalContext* globalCtx) {
globalCtx->msgCtx.messageEntryTableNes = D_801C6B98;
globalCtx->msgCtx.messageTableStaff = D_801CFB08;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_Init.s")
void Message_Init(GlobalContext* globalCtx) {
Font* font;
MessageContext* messageCtx = &globalCtx->msgCtx;
func_801586A4(globalCtx);
globalCtx->msgCtx.ocarinaMode = 0;
messageCtx->msgMode = 0;
messageCtx->unk11F10 = 0;
messageCtx->currentTextId = 0;
messageCtx->unk12020 = 0;
messageCtx->choiceIndex = 0;
messageCtx->ocarinaAction = messageCtx->unk11FF2 = 0;
messageCtx->unk1201E = 0xFF;
View_Init(&messageCtx->view, globalCtx->state.gfxCtx);
messageCtx->unk11EF8 = THA_AllocEndAlign16(&globalCtx->state.heap, 0x13C00);
font = &globalCtx->msgCtx.font;
Font_LoadOrderedFont(&globalCtx->msgCtx.font);
font->unk_11D88 = 0;
messageCtx->unk12090 = messageCtx->unk12092 = 0;
messageCtx->unk12094 = 0;
messageCtx->unk1209C = 0;
messageCtx->unk120A0 = 0;
messageCtx->unk12068 = 0x34;
messageCtx->unk1206A = 0x24;
messageCtx->unk120B0 = 0;
messageCtx->unk120BE = 0;
messageCtx->unk120C0 = 0;
messageCtx->unk120C2 = 0;
messageCtx->unk120C4 = 0;
messageCtx->unk120C8 = 0;
messageCtx->unk120CA = 0;
messageCtx->unk120CC = 0;
messageCtx->unk120CE = 0;
messageCtx->unk120D0 = 0;
messageCtx->unk120D2 = 0;
messageCtx->unk120D4 = 0;
messageCtx->unk120D6 = 0;
}

View File

@ -1,18 +1,280 @@
#include "global.h"
#include "message_data_static.h"
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_801588D0.s")
#if 0
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_80158988.s")
//fontWidth
extern f32 D_801D0470[159];
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_80158A24.s")
//rupeesTextLocalization
u8 D_801D06F0[4][8] = { { "rupee(s)" }, //EN
{ "rubin(e)" }, //DE
{ "rubis" }, //FR
{ "rupia(s)" } //SPA
};
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_80158C04.s")
// rupeesTextLength
u8 D_801D0710[4] = {8,8,5,8};
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_80158D98.s")
//TextArea
char D_801D0714[11][16] = {
"Great Bay Coast",
"Zora Cape",
"Snowhead",
"Mountain Village",
"Clock Town",
"Milk Road",
"Woodfall",
"Southern Swamp",
"Ikana Canyon",
"Stone Tower",
"Entrance"
};
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_80158FB0.s")
//TextAreaLength
s16 D_801D07C4[11] = {15,9,8,16,10,9,8,14,12,11,8};
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_8015926C.s")
#endif
extern f32 D_801D0470[159];
extern u8 D_801D06F0[4][8];
extern u8 D_801D0710[4];
extern u8 D_801D0714[11][16];
extern s16 D_801D07C4[11];
void Message_FindMessageNES(GlobalContext* globalCtx, u16 textId) {
MessageContext* msgCtx = &globalCtx->msgCtx;
Font* font = &msgCtx->font;
MessageTableEntry* msgEntry = msgCtx->messageEntryTableNes;
const char* segment = msgEntry->segment;
const char* foundSegment;
const char* nextSegment;
while (msgEntry->textId != 0xFFFF) {
if (msgEntry->textId == textId) {
foundSegment = msgEntry->segment;
msgEntry++;
nextSegment = msgEntry->segment;
font->messageStart = foundSegment - segment;
font->messageEnd = nextSegment - foundSegment;
return;
}
msgEntry++;
}
msgEntry = msgCtx->messageEntryTableNes;
foundSegment = msgEntry->segment;
msgEntry++;
nextSegment = msgEntry->segment;
font->messageStart = foundSegment - segment;
font->messageEnd = nextSegment - foundSegment;
}
void Message_LoadCharNES(GlobalContext* globalCtx, u8 codePointIndex, s32* offset, f32* arg3, s16 decodedBufPos) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s32 temp1 = *offset;
f32 temp2 = *arg3;
Font_LoadCharNES(globalCtx, codePointIndex, temp1);
msgCtx->decodedBuffer.schar[decodedBufPos] = codePointIndex;
temp1 += FONT_CHAR_TEX_SIZE;
temp2 += (16.0f * msgCtx->unk12098);
*offset = temp1;
*arg3 = temp2;
}
void Message_LoadPluralRupeesNES(GlobalContext* globalCtx, s16* decodedBufPos, s32* offset, f32* arg3) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s16 p = *decodedBufPos;
s32 o = *offset;
f32 f = *arg3;
msgCtx->decodedBuffer.schar[p] = 0x20;
p++;
Font_LoadCharNES(globalCtx, 'R', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'R';
p++;
Font_LoadCharNES(globalCtx, 'u', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'u';
p++;
Font_LoadCharNES(globalCtx, 'p', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'p';
p++;
Font_LoadCharNES(globalCtx, 'e', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'e';
p++;
Font_LoadCharNES(globalCtx, 'e', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'e';
p++;
Font_LoadCharNES(globalCtx, 's', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 's';
f += 16.0f * msgCtx->unk12098 * 6.0f;
*decodedBufPos = p;
*offset = o;
*arg3 = f;
}
void Message_LoadLocalizedRupeesNES(GlobalContext* globalCtx, s16* decodedBufPos, s32* offset, f32* arg3) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s16 p = *decodedBufPos;
s32 o = *offset;
f32 f = *arg3;
u8 j;
msgCtx->decodedBuffer.schar[p] = ' ';
p++;
for (j = 0; j < D_801D0710[gSaveContext.language - 1]; j++) {
Font_LoadCharNES(globalCtx, D_801D06F0[gSaveContext.language - 1][j], o);
msgCtx->decodedBuffer.schar[p] = D_801D06F0[gSaveContext.language - 1][j];
o += FONT_CHAR_TEX_SIZE;
p++;
}
p--;
f += 16.0f * msgCtx->unk12098 * (D_801D0710[gSaveContext.language - 1] + 1);
*decodedBufPos = p;
*offset = o;
*arg3 = f;
}
void Message_LoadRupeesNES(GlobalContext* globalCtx, s16* decodedBufPos, s32* offset, f32* arg3, s16 singular) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s16 p = *decodedBufPos;
s32 o = *offset;
f32 f = *arg3;
msgCtx->decodedBuffer.schar[p] = ' ';
p++;
Font_LoadCharNES(globalCtx, 'R', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'R';
p++;
Font_LoadCharNES(globalCtx, 'u', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'u';
p++;
Font_LoadCharNES(globalCtx, 'p', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'p';
p++;
Font_LoadCharNES(globalCtx, 'e', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'e';
p++;
Font_LoadCharNES(globalCtx, 'e', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 'e';
if (singular != 1) {
p++;
Font_LoadCharNES(globalCtx, 's', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = 's';
f += 16.0f * msgCtx->unk12098 * 6.0f;
} else {
f += 16.0f * msgCtx->unk12098 * 5.0f;
}
*decodedBufPos = p;
*offset = o;
*arg3 = f;
}
void Message_LoadTimeNES(GlobalContext* globalCtx, u8 arg1, s32* offset, f32* arg3, s16* decodedBufPos) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s16 p = *decodedBufPos;
s32 o = *offset;
f32 f = *arg3;
u32 dayTime;
s16 digits[4];
f32 timeInMinutes;
s32 day;
s16 i;
if (arg1 == 0xCF) {
day = gSaveContext.day;
dayTime = 0x40000 - ((day % 5) << 16) - (u16)(-0x4000 + gSaveContext.time);
} else {
dayTime = 0x10000 - (u16)(-0x4000 + gSaveContext.time);
}
timeInMinutes = TIME_TO_MINUTES_F(dayTime);
digits[0] = 0;
digits[1] = (timeInMinutes / 60.0f);
while (digits[1] >= 10) {
digits[0]++;
digits[1] -= 10;
}
digits[2] = 0;
digits[3] = (s32)timeInMinutes % 60;
while (digits[3] >= 10) {
digits[2]++;
digits[3] -= 10;
}
for (i = 0; i < 4; i++) {
Font_LoadCharNES(globalCtx, digits[i] + '0', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = digits[i] + '0';
p++;
if (i == 1) {
Font_LoadCharNES(globalCtx, ':', o);
o += FONT_CHAR_TEX_SIZE;
msgCtx->decodedBuffer.schar[p] = ':';
p++;
}
}
f += 5.0f * (16.0f * msgCtx->unk12098);
*decodedBufPos = p - 1;
*offset = o;
*arg3 = f;
}
void Message_LoadAreaTextNES(GlobalContext* globalCtx, s32* offset, f32* arg2, s16* decodedBufPos) {
MessageContext* msgCtx = &globalCtx->msgCtx;
s16 p = *decodedBufPos;
s32 o = *offset;
f32 f = *arg2;
s16 i;
u8 currentChar;
s16 currentArea;
s16 stringLimit;
if ((func_8010A0A4(globalCtx) != 0) || (globalCtx->sceneNum == SCENE_SECOM)) {
currentArea = 10;
} else {
currentArea = globalCtx->pauseCtx.unk_238[4];
}
stringLimit = D_801D07C4[currentArea];
for (i = 0; i < stringLimit; i++) {
msgCtx->decodedBuffer.schar[p] = D_801D0714[currentArea][i];
currentChar = msgCtx->decodedBuffer.schar[p];
if (currentChar != ' ') {
Font_LoadCharNES(globalCtx, D_801D0714[currentArea][i], o);
o += FONT_CHAR_TEX_SIZE;
}
currentChar = msgCtx->decodedBuffer.schar[p];
p++;
f += (D_801D0470[currentChar - ' '] * msgCtx->unk12098);
}
p--;
f += (stringLimit - 1) * (16.0f * msgCtx->unk12098);
*decodedBufPos = p;
*offset = o;
*arg2 = f;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_nes/func_80159438.s")

View File

@ -1,6 +1,27 @@
#include "global.h"
#include "message_data_static.h"
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_staff/func_8015E750.s")
void Message_FindCreditsMessage(GlobalContext* globalCtx, u16 textId) {
MessageContext* msgCtx = &globalCtx->msgCtx;
Font* font = &msgCtx->font;
MessageTableEntry* msgEntry = msgCtx->messageTableStaff;
const char* segment = msgEntry->segment;
const char* foundSegment;
const char* nextSegment;
while (msgEntry->textId != 0xFFFF) {
if (msgEntry->textId == textId) {
foundSegment = msgEntry->segment;
font->charBuf[font->unk_11D88][0] = msgEntry->typePos;
msgEntry++;
nextSegment = msgEntry->segment;
font->messageStart = foundSegment - segment;
font->messageEnd = nextSegment - foundSegment;
return;
}
msgEntry++;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message_staff/func_8015E7EC.s")

View File

@ -271,7 +271,7 @@ void func_80954340(BgIngate* this, GlobalContext* globalCtx) {
void func_809543D4(BgIngate* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if (((talkState == 4) || (talkState == 5)) && func_80147624(globalCtx)) {
if (((talkState == 4) || (talkState == 5)) && Message_ShouldAdvance(globalCtx)) {
switch (this->dyna.actor.textId) {
case 0x9E4:
this->dyna.actor.textId = 0x9E5;

View File

@ -1566,7 +1566,7 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) {
}
if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.msgMode != 0) &&
(globalCtx->msgCtx.unk11F04 == 0x5E6) && !FrameAdvance_IsEnabled(&globalCtx->state) &&
(globalCtx->msgCtx.currentTextId == 0x5E6) && !FrameAdvance_IsEnabled(&globalCtx->state) &&
(globalCtx->sceneLoadFlag == 0) && (ActorCutscene_GetCurrentIndex() == -1) &&
(globalCtx->csCtx.state == 0)) {
time = gSaveContext.time;

View File

@ -356,7 +356,7 @@ void func_808B93A0(DoorWarp1* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = GET_PLAYER(globalCtx);
if (Message_GetState(&globalCtx->msgCtx) == 4 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 4 && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();

View File

@ -290,7 +290,7 @@ void func_80BD3118(EnAh* this, GlobalContext* globalCtx) {
s32 func_80BD3198(EnAh* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
u16 temp = globalCtx->msgCtx.unk11F04;
u16 temp = globalCtx->msgCtx.currentTextId;
if (player->stateFlags1 & 0x40) {
if (this->unk_2DA != temp) {

View File

@ -1243,7 +1243,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
globalCtx->msgCtx.msgMode = 0x43;
@ -1265,7 +1265,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
}
}
} else if (temp_v0 == 4) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
this->unk_32C |= 0x8;
@ -1285,7 +1285,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEF18C(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0;
@ -1310,7 +1310,7 @@ void func_80BEF20C(EnAkindonuts* this, GlobalContext* globalCtx) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 6);
}
if ((sp27 == 5) && func_80147624(globalCtx)) {
if ((sp27 == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
globalCtx->msgCtx.msgMode = 0x43;
@ -1341,7 +1341,7 @@ void func_80BEF360(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEF450(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && Message_ShouldAdvance(globalCtx)) {
func_800B85E0(&this->actor, globalCtx, 400.0f, -1);
this->actionFunc = func_80BEF4B8;
}

View File

@ -559,7 +559,7 @@ void func_80BDEFE4(EnAl* this, GlobalContext* globalCtx) {
s32 func_80BDF064(EnAl* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
u16 sp22 = globalCtx->msgCtx.unk11F04;
u16 sp22 = globalCtx->msgCtx.currentTextId;
Actor* sp1C = func_80BDE1A0(this, globalCtx, 4, 0xA4);
Actor* temp_v0 = func_80BDE1A0(this, globalCtx, 4, 0x234);

View File

@ -175,7 +175,7 @@ void EnAni_IdleStanding(EnAni* this, GlobalContext* globalCtx) {
void EnAni_Talk(EnAni* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if (Message_GetState(&globalCtx->msgCtx) == 2 && globalCtx->msgCtx.unk11F04 == 0x6DE) {
if (Message_GetState(&globalCtx->msgCtx) == 2 && globalCtx->msgCtx.currentTextId == 0x6DE) {
this->actionFunc = EnAni_IdleInPain;
}
}

View File

@ -433,7 +433,7 @@ void func_809C1D64(EnAob01* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 4) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
if (gSaveContext.rupees < 10) {
@ -457,7 +457,7 @@ void func_809C1D64(EnAob01* this, GlobalContext* globalCtx) {
break;
}
}
} else if ((temp_v0 == 5) && func_80147624(globalCtx)) {
} else if ((temp_v0 == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_210 = 0;
@ -561,7 +561,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 &= ~8;
}
} else if (sp2F == 4) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->unk_2D2 &= ~0x40;
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
@ -577,7 +577,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
}
}
} else if (sp2F == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->unk_2D2 &= ~0x40;
if (this->unk_2D2 & 0x10) {
this->unk_2D2 &= ~0x10;
@ -588,7 +588,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
func_809C16DC(this, globalCtx);
}
}
} else if ((sp2F == 14) && func_80147624(globalCtx)) {
} else if ((sp2F == 14) && Message_ShouldAdvance(globalCtx)) {
this->unk_2D2 &= ~0x40;
this->unk_434 = globalCtx->msgCtx.bankRupeesSelected;
func_809C16DC(this, globalCtx);
@ -749,7 +749,7 @@ void func_809C2A64(EnAob01* this, GlobalContext* globalCtx) {
u8 sp2F = Message_GetState(&globalCtx->msgCtx);
if (func_809C15BC(this)) {
if ((sp2F == 5) && func_80147624(globalCtx)) {
if ((sp2F == 5) && Message_ShouldAdvance(globalCtx)) {
this->unk_434 = 0;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
@ -778,7 +778,7 @@ void func_809C2A64(EnAob01* this, GlobalContext* globalCtx) {
void func_809C2BE4(EnAob01* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (((temp_v0 == 5) || (temp_v0 == 6)) && func_80147624(globalCtx)) {
if (((temp_v0 == 5) || (temp_v0 == 6)) && Message_ShouldAdvance(globalCtx)) {
if (gSaveContext.weekEventReg[63] & 2) {
gSaveContext.weekEventReg[63] &= (u8)~2;
}
@ -819,7 +819,7 @@ void func_809C2D0C(EnAob01* this, GlobalContext* globalCtx) {
}
}
if ((sp2F == 5) && func_80147624(globalCtx)) {
if ((sp2F == 5) && Message_ShouldAdvance(globalCtx)) {
this->unk_2D2 &= ~0x40;
this->unk_2D2 &= ~0x80;
if (this->unk_434 >= 150) {

View File

@ -514,7 +514,7 @@ void func_80BA9758(EnBaba* this, GlobalContext* globalCtx) {
void func_80BA9848(EnBaba* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (((temp_v0 == 5) || (temp_v0 == 6)) && func_80147624(globalCtx)) {
if (((temp_v0 == 5) || (temp_v0 == 6)) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80BA9B80;
@ -526,7 +526,7 @@ void func_80BA98EC(EnBaba* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_40A & 1) {
this->unk_40A &= ~1;
globalCtx->msgCtx.msgMode = 0x43;
@ -556,7 +556,7 @@ void func_80BA98EC(EnBaba* this, GlobalContext* globalCtx) {
}
}
} else if (temp_v0 == 6) {
if (func_80147624(globalCtx) && (globalCtx->msgCtx.unk120B1 == 0)) {
if (Message_ShouldAdvance(globalCtx) && (globalCtx->msgCtx.unk120B1 == 0)) {
gSaveContext.weekEventReg[81] |= 2;
func_80BA8C4C(globalCtx, 0xD670);
}

View File

@ -196,8 +196,8 @@ void func_80BE89D8(EnBaisen* this, GlobalContext* globalCtx) {
EnBaisen_ChangeAnimation(this, 0);
}
}
if ((globalCtx->msgCtx.unk11F04 == 0x2AC6) || (globalCtx->msgCtx.unk11F04 == 0x2AC7) ||
(globalCtx->msgCtx.unk11F04 == 0x2AC8)) {
if ((globalCtx->msgCtx.currentTextId == 0x2AC6) || (globalCtx->msgCtx.currentTextId == 0x2AC7) ||
(globalCtx->msgCtx.currentTextId == 0x2AC8)) {
this->skelAnime.playSpeed = 0.0f;
this->unk29E = this->actor.yawTowardsPlayer;
}
@ -220,7 +220,7 @@ void func_80BE8AAC(EnBaisen* this, GlobalContext* globalCtx) {
EnBaisen_ChangeAnimation(this, 0);
}
}
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
this->textIdIndex++;
if (this->textIdIndex < 6) {

View File

@ -207,7 +207,7 @@ void EnBji01_DialogueHandler(EnBji01* this, GlobalContext* globalCtx) {
}
break;
case 4:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
this->actor.flags &= ~ACTOR_FLAG_10000;
this->actor.params = ENBJI01_PARAMS_FINISHED_CONVERSATION;
switch (globalCtx->msgCtx.choiceIndex) {
@ -235,9 +235,9 @@ void EnBji01_DialogueHandler(EnBji01* this, GlobalContext* globalCtx) {
}
break;
case 5:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
this->actor.flags &= ~ACTOR_FLAG_10000;
switch (globalCtx->msgCtx.unk11F04) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x5DE:
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 3, &this->animationIndex);
func_80151938(globalCtx, 0x5DF);
@ -259,7 +259,7 @@ void EnBji01_DialogueHandler(EnBji01* this, GlobalContext* globalCtx) {
case 0x5EE:
case 0x5F2:
case 0x5F5:
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0x5F0:
case 0x5F6:

View File

@ -238,7 +238,7 @@ void func_809C4DA4(EnBomBowlMan* this, GlobalContext* globalCtx) {
}
}
if ((this->unk_2BC == 0) && (Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((this->unk_2BC == 0) && (Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
Player* player = GET_PLAYER(globalCtx);
s32 pad;
s32 sp28 = false;
@ -411,7 +411,7 @@ void func_809C5524(EnBomBowlMan* this, GlobalContext* globalCtx) {
}
void func_809C5598(EnBomBowlMan* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
if ((this->actor.textId == 0x72F) || (this->actor.textId == 0x730)) {
this->actor.textId = 0x731;

View File

@ -334,7 +334,7 @@ void func_80C03FAC(EnBombers* this, GlobalContext* globalCtx) {
break;
}
if ((this->unk_2A6 == Message_GetState(&globalCtx->msgCtx)) && func_80147624(globalCtx)) {
if ((this->unk_2A6 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
sp2A = 0;
func_801477B4(globalCtx);
this->unk_2A6 = 5;
@ -446,7 +446,7 @@ void func_80C04354(EnBombers* this, GlobalContext* globalCtx) {
void func_80C043C8(EnBombers* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->unk_288, this->unk_28E, 1, 0x3E8, 0);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80C042F8(this);
}

View File

@ -213,7 +213,7 @@ void func_80C04D8C(EnBombers2* this, GlobalContext* globalCtx) {
default:
break;
}
if ((this->unk_2CE == Message_GetState(&globalCtx->msgCtx)) && (func_80147624(globalCtx) != 0)) {
if ((this->unk_2CE == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_2CE == 0xF) {
s32 i;
s32 correctDigits;

View File

@ -581,7 +581,7 @@ void func_80BFF4F4(EnBomjima* this) {
}
void func_80BFF52C(EnBomjima* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
Player* player = GET_PLAYER(globalCtx);
@ -624,7 +624,7 @@ void func_80BFF6CC(EnBomjima* this, GlobalContext* globalCtx) {
f32 curFrame = this->skelAnime.curFrame;
if (this->unk_2CC <= curFrame) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80BFE494(this, 1, 1.0f);
this->actionFunc = func_80BFF754;
@ -729,7 +729,7 @@ void func_80BFF9B0(EnBomjima* this, GlobalContext* globalCtx) {
}
void func_80BFFB40(EnBomjima* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80BFE494(this, 15, 1.0f);
D_80C009F0 = 100;
@ -916,7 +916,7 @@ void func_80C00284(EnBomjima* this, GlobalContext* globalCtx) {
break;
}
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
this->collider.dim.radius = 10;
this->collider.dim.height = 30;
if ((this->unk_2A0 == 4) || (this->unk_2CA == 1) || ((this->unk_2CA == 3) && (this->unk_2C8 >= 2))) {

View File

@ -758,7 +758,7 @@ void func_80C02A14(EnBomjimb* this, GlobalContext* globalCtx) {
player->actor.freezeTimer = 3;
}
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
if ((this->unk_2CA == 8) && (gSaveContext.unk_FE6 >= 5)) {
func_80C02CA4(this, globalCtx);
@ -777,7 +777,7 @@ void func_80C02BCC(EnBomjimb* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 5000, 0);
if (this->unk_2C0 == 0) {
player->actor.freezeTimer = 3;
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
this->unk_2C0 = 1;
player->stateFlags1 &= ~0x10000000;

View File

@ -138,7 +138,7 @@ void func_80AFDE00(EnColMan* this, GlobalContext* globalCtx) {
}
void EnColMan_SetHeartPieceCollectedAndKill(EnColMan* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx)) {
gSaveContext.weekEventReg[56] |= 2;
Actor_MarkForDeath(&this->actor);
}

View File

@ -200,7 +200,7 @@ void EnCow_UpdateAnimation(EnCow* this, GlobalContext* globalCtx) {
}
void EnCow_TalkEnd(EnCow* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
func_801477B4(globalCtx);
this->actionFunc = EnCow_Idle;
@ -224,7 +224,7 @@ void EnCow_GiveMilkWait(EnCow* this, GlobalContext* globalCtx) {
}
void EnCow_GiveMilk(EnCow* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
func_801477B4(globalCtx);
this->actionFunc = EnCow_GiveMilkWait;
@ -233,7 +233,7 @@ void EnCow_GiveMilk(EnCow* this, GlobalContext* globalCtx) {
}
void EnCow_CheckForEmptyBottle(EnCow* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (Interface_HasEmptyBottle()) {
func_80151938(globalCtx, 0x32C9); // Text to give milk.
this->actionFunc = EnCow_GiveMilk;

View File

@ -241,7 +241,7 @@ void func_80943BDC(EnDaiku* this, GlobalContext* globalCtx) {
}
}
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80943820(this);
}

View File

@ -292,7 +292,7 @@ void func_80BE6B40(EnDaiku2* this, GlobalContext* globalCtx) {
void func_80BE6BC0(EnDaiku2* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0x0);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
s32 day = gSaveContext.day - 1;
func_801477B4(globalCtx);

View File

@ -144,7 +144,7 @@ void EnDemoheishi_SetupTalk(EnDemoheishi* this) {
}
void EnDemoheishi_Talk(EnDemoheishi* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
EnDemoheishi_SetupIdle(this);
}

View File

@ -381,7 +381,7 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
break;
case 3:
if (globalCtx->msgCtx.unk11F04 == 0x80B) {
if (globalCtx->msgCtx.currentTextId == 0x80B) {
switch (this->unk_32C) {
case 16:
if (this->skelAnime.curFrame == this->skelAnime.endFrame) {
@ -405,7 +405,7 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
case 4:
case 5:
case 6:
switch (globalCtx->msgCtx.unk11F04) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x80B:
switch (this->unk_32C) {
case 16:
@ -415,7 +415,7 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
break;
case 9:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 10, &this->unk_32C);
globalCtx->msgCtx.msgMode = 0x44;
}
@ -432,13 +432,13 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
break;
case 0x80C:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80151938(globalCtx, 0x80D);
}
break;
case 0x80D:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80151938(globalCtx, 0x80E);
}
break;
@ -450,20 +450,20 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
if (this->skelAnime.curFrame == this->skelAnime.endFrame) {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 13, &this->unk_32C);
}
} else if ((this->unk_32C == 13) && func_80147624(globalCtx)) {
} else if ((this->unk_32C == 13) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80A71B68(this, globalCtx);
}
break;
case 0x80F:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80151938(globalCtx, 0x810);
}
break;
case 0x810:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->unk_3B0 |= 0x20;
func_801477B4(globalCtx);
func_80A71B68(this, globalCtx);
@ -484,7 +484,7 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
break;
case 0x811:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80A71B68(this, globalCtx);
}
@ -572,7 +572,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
case 1:
case 2:
case 3:
if (((globalCtx->msgCtx.unk11F04 == 0x800) || (globalCtx->msgCtx.unk11F04 == 0x801)) &&
if (((globalCtx->msgCtx.currentTextId == 0x800) || (globalCtx->msgCtx.currentTextId == 0x801)) &&
(this->unk_32C == 8)) {
Math_SmoothStepToF(&this->unk_454, 1.0f, 1.0f, 0.1f, 0.01f);
if (this->skelAnime.curFrame <= 23.0f) {
@ -596,10 +596,10 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
case 4:
case 5:
case 6:
switch (globalCtx->msgCtx.unk11F04) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x800:
case 0x801:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x44;
this->unk_452 = 1;
this->unk_454 = 0.0f;
@ -608,7 +608,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
break;
case 0x802:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (INV_CONTENT(ITEM_MASK_SCENTS) == ITEM_MASK_SCENTS) {
this->unk_458 = GI_RUPEE_RED;
} else {
@ -621,14 +621,14 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
break;
case 0x803:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80A72AE4(this, globalCtx);
}
break;
case 0x804:
if (this->unk_32C == 14) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 5, &this->unk_32C);
if (!(this->unk_3B0 & 0x40)) {
func_80A72CF8(this, globalCtx);
@ -642,7 +642,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
break;
case 0x806:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80151938(globalCtx, 0x800);
}
break;

View File

@ -254,7 +254,7 @@ s32 func_80A52A78(EnDnq* this, GlobalContext* globalCtx) {
s32 func_80A52B68(EnDnq* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
u16 temp = globalCtx->msgCtx.unk11F04;
u16 temp = globalCtx->msgCtx.currentTextId;
if ((player->stateFlags1 & 0x40) && (player->targetActor == &this->actor)) {
switch (temp) {

View File

@ -1360,8 +1360,8 @@ void func_8088FE64(Actor* thisx, GlobalContext* globalCtx2) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 4:
if (func_80147624(globalCtx)) {
if (globalCtx->msgCtx.unk11F04 == 0x202) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.currentTextId == 0x202) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F230();
@ -1375,19 +1375,19 @@ void func_8088FE64(Actor* thisx, GlobalContext* globalCtx2) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 - 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId - 1);
break;
case 1:
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
}
}
break;
case 5:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 576:
func_80151938(globalCtx, 0x245);
break;

View File

@ -434,7 +434,7 @@ void func_80B29128(EnFish2* this) {
}
void func_80B2913C(EnFish2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80B28B5C(this);
}

View File

@ -1128,7 +1128,7 @@ void EnFishing_UpdateEffects(FishingEffect* effect, GlobalContext* globalCtx) {
}
if ((effect->unk_2C >= 100) && (Message_GetState(&globalCtx->msgCtx) == 5)) {
if (func_80147624(globalCtx) || Message_GetState(&globalCtx->msgCtx) == 0) {
if (Message_ShouldAdvance(globalCtx) || Message_GetState(&globalCtx->msgCtx) == 0) {
func_801477B4(globalCtx);
func_801159EC(-50);
effect->unk_2C = -1;
@ -3866,7 +3866,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
switch (this->unk_1CD) {
case 0:
if ((Message_GetState(&globalCtx->msgCtx) == 4) || Message_GetState(&globalCtx->msgCtx) == 0) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
if (D_8090CCF0 == 0.0f) {
@ -3897,7 +3897,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
break;
case 1:
if ((Message_GetState(&globalCtx->msgCtx) == 4) || Message_GetState(&globalCtx->msgCtx) == 0) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex != 0) {
f32 temp1 = D_8090CCF0;
@ -4723,7 +4723,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 1:
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@ -4751,7 +4751,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 2:
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80151938(globalCtx, 0x407F);
this->unk_154 = 4;
@ -4759,7 +4759,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 3:
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
this->unk_154 = 0;
}
@ -4769,7 +4769,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 4:
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@ -4786,7 +4786,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 5:
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
globalCtx->interfaceCtx.unk_27E = 1;
@ -4803,7 +4803,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
case 10:
if (D_8090CD0C != 0) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@ -4819,7 +4819,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
}
}
} else {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@ -4892,7 +4892,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
case 11:
if (((Message_GetState(&globalCtx->msgCtx) == 5) || Message_GetState(&globalCtx->msgCtx) == 0) &&
func_80147624(globalCtx)) {
Message_ShouldAdvance(globalCtx)) {
s32 getItemId;
func_801477B4(globalCtx);
@ -4968,14 +4968,14 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 20:
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
this->unk_154 = 0;
}
break;
case 21:
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@ -5017,7 +5017,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
case 24:
D_8090CCF4 = false;
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && Message_ShouldAdvance(globalCtx)) {
if (D_809171D0 == 0) {
this->unk_154 = 0;
} else {
@ -5354,7 +5354,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
// fallthrough
case 21:
if ((D_8090CD50 == 0) && func_80147624(globalCtx)) {
if ((D_8090CD50 == 0) && Message_ShouldAdvance(globalCtx)) {
D_8090CD4C = 22;
D_8090CD50 = 40;
// func_800B7298 call removed in MM
@ -5411,7 +5411,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
if (D_8090CD50 == 0) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || Message_GetState(&globalCtx->msgCtx) == 0) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
Camera* camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
func_801477B4(globalCtx);

View File

@ -209,7 +209,7 @@ void EnFsn_HandleConversationBackroom(EnFsn* this, GlobalContext* globalCtx) {
}
void EnFsn_HandleSetupResumeInteraction(EnFsn* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx) &&
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx) &&
this->cutsceneState == ENFSN_CUTSCENESTATE_STOPPED) {
Actor_ProcessTalkRequest(&this->actor, &globalCtx->state);
func_800B85E0(&this->actor, globalCtx, 400.0f, EXCH_ITEM_MINUS1);
@ -821,7 +821,7 @@ void EnFsn_StartBuying(EnFsn* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
EnFsn_HandleLookToShopkeeperBuyingCutscene(this);
if (talkState == 5 && func_80147624(globalCtx)) {
if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
switch (this->actor.textId) {
case 0x29CC:
this->actor.textId = 0x29CD;
@ -849,7 +849,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if (talkState == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->actor.textId) {
case 0x29CC:
if (CURRENT_DAY != 3) {
@ -880,7 +880,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, GlobalContext* globalCtx) {
}
} else if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnFsn_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx)) && func_80147624(globalCtx)) {
if (!EnFsn_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx)) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F208();
@ -953,7 +953,7 @@ void EnFsn_MakeOffer(EnFsn* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
Player* player = GET_PLAYER(globalCtx);
if (talkState == 4 && func_80147624(globalCtx)) {
if (talkState == 4 && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F208();
@ -1189,7 +1189,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, GlobalContext* globalCtx) {
void EnFsn_SetupEndInteraction(EnFsn* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if ((talkState == 5 || talkState == 6) && func_80147624(globalCtx)) {
if ((talkState == 5 || talkState == 6) && Message_ShouldAdvance(globalCtx)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (globalCtx->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, globalCtx);
@ -1208,7 +1208,7 @@ void EnFsn_SelectItem(EnFsn* this, GlobalContext* globalCtx) {
if (EnFsn_TakeItemOffShelf(this) && talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnFsn_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && func_80147624(globalCtx)) {
if (!EnFsn_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
EnFsn_HandleCanPlayerBuyItem(this, globalCtx);
@ -1223,7 +1223,7 @@ void EnFsn_SelectItem(EnFsn* this, GlobalContext* globalCtx) {
}
void EnFsn_PlayerCannotBuy(EnFsn* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
this->actionFunc = this->tmpActionFunc;
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
}
@ -1245,7 +1245,7 @@ void EnFsn_AskCanBuyMore(EnFsn* this, GlobalContext* globalCtx) {
}
}
if (talkState == 4) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F208();
@ -1261,7 +1261,7 @@ void EnFsn_AskCanBuyMore(EnFsn* this, GlobalContext* globalCtx) {
break;
}
}
} else if ((talkState == 5 || talkState == 6) && func_80147624(globalCtx)) {
} else if ((talkState == 5 || talkState == 6) && Message_ShouldAdvance(globalCtx)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (globalCtx->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, globalCtx);
@ -1291,7 +1291,7 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, GlobalContext* globalCtx)
}
}
if (talkState == 4) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F208();
@ -1308,7 +1308,7 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, GlobalContext* globalCtx)
break;
}
}
} else if ((talkState == 5 || talkState == 6) && func_80147624(globalCtx)) {
} else if ((talkState == 5 || talkState == 6) && Message_ShouldAdvance(globalCtx)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (globalCtx->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, globalCtx);
@ -1329,7 +1329,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, GlobalContext* globalCtx) {
if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnFsn_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx)) &&
(!func_80147624(globalCtx) || !EnFsn_FacingShopkeeperDialogResult(this, globalCtx)) &&
(!Message_ShouldAdvance(globalCtx) || !EnFsn_FacingShopkeeperDialogResult(this, globalCtx)) &&
this->stickAccumX > 0) {
cursorIdx = EnFsn_SetCursorIndexFromNeutral(this);
if (cursorIdx != CURSOR_INVALID) {
@ -1340,7 +1340,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_CURSOR);
}
}
} else if (talkState == 5 && func_80147624(globalCtx)) {
} else if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
this->actor.textId = 0x29D6;
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
if (globalCtx) {}
@ -1348,7 +1348,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, GlobalContext* globalCtx) {
}
void EnFsn_SetupEndInteractionImmediately(EnFsn* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
EnFsn_EndInteraction(this, globalCtx);
}
}
@ -1364,7 +1364,7 @@ void EnFsn_IdleBackroom(EnFsn* this, GlobalContext* globalCtx) {
}
void EnFsn_ConverseBackroom(EnFsn* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
if (this->flags & ENFSN_END_CONVERSATION) {
this->flags &= ~ENFSN_END_CONVERSATION;
globalCtx->msgCtx.msgMode = 0x43;

View File

@ -426,7 +426,7 @@ void func_80962340(EnFu* this, GlobalContext* globalCtx) {
}
void func_80962588(EnFu* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx) && (this->unk_552 == 0x2871)) {
if (Message_ShouldAdvance(globalCtx) && (this->unk_552 == 0x2871)) {
if (1) {}
if (globalCtx->msgCtx.choiceIndex == 0) {
if (gSaveContext.rupees >= 10) {
@ -449,7 +449,7 @@ void func_80962588(EnFu* this, GlobalContext* globalCtx) {
void func_80962660(EnFu* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_552) {
case 0x283C:
func_80963F44(this, globalCtx);
@ -596,7 +596,7 @@ void func_809628D0(EnFu* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->unk_54A = 1;
switch (this->unk_552) {
case 0x287F:
@ -842,7 +842,7 @@ void func_80963350(EnFu* this, GlobalContext* globalCtx) {
static s32 D_80964C24 = 0;
BgFuKaiten* fuKaiten = (BgFuKaiten*)this->actor.child;
if ((this->unk_54A == 0) && (((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) ||
if ((this->unk_54A == 0) && (((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) ||
((Message_GetState(&globalCtx->msgCtx) == 2) && (globalCtx->msgCtx.unk12023 == 1)))) {
func_801477B4(globalCtx);
this->unk_54A = 2;
@ -1210,7 +1210,7 @@ void func_8096413C(EnFu* this, GlobalContext* globalCtx) {
}
void func_80964190(EnFu* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_552) {
case 0x2842:
case 0x2844:
@ -1262,7 +1262,7 @@ void func_80964190(EnFu* this, GlobalContext* globalCtx) {
}
void func_8096426C(EnFu* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_552) {
case 0x2840:
case 0x2841:

View File

@ -389,7 +389,7 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_26C & 2) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
@ -403,7 +403,7 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
}
}
} else if ((temp_v0 == 4) && func_80147624(globalCtx)) {
} else if ((temp_v0 == 4) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_26E == 0x14D5) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
@ -551,7 +551,7 @@ void func_80B10634(EnGb2* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_26C & 2) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
@ -572,7 +572,7 @@ void func_80B10634(EnGb2* this, GlobalContext* globalCtx) {
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
}
}
} else if ((temp_v0 == 4) && func_80147624(globalCtx)) {
} else if ((temp_v0 == 4) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
if (gSaveContext.rupees < this->unk_288) {
@ -746,7 +746,7 @@ void func_80B10DAC(EnGb2* this, GlobalContext* globalCtx) {
}
void func_80B10E98(EnGb2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_26C & 2) {
this->unk_26C &= ~2;
globalCtx->msgCtx.msgMode = 0x43;
@ -790,7 +790,7 @@ void func_80B11048(EnGb2* this, GlobalContext* globalCtx) {
}
void func_80B110F8(EnGb2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_26C & 2) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;

View File

@ -542,7 +542,7 @@ void func_80BB2520(EnGeg* this, GlobalContext* globalCtx) {
}
void func_80BB26EC(EnGeg* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
switch (this->unk_496) {
case 0xD5E:
this->unk_49A = this->unk_49C[1];
@ -564,7 +564,7 @@ void func_80BB26EC(EnGeg* this, GlobalContext* globalCtx) {
}
void func_80BB27D4(EnGeg* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
switch (this->unk_496) {
case 0xD63:
globalCtx->msgCtx.msgMode = 0x43;
@ -615,7 +615,7 @@ void func_80BB2944(EnGeg* this, GlobalContext* globalCtx) {
this->unk_4AC = 6;
func_80BB2020(this, globalCtx);
}
} else if ((sp27 == 5) && func_80147624(globalCtx)) {
} else if ((sp27 == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_496 == 0xD67) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
@ -629,7 +629,7 @@ void func_80BB2944(EnGeg* this, GlobalContext* globalCtx) {
}
void func_80BB2A54(EnGeg* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_496 == 0xD65) {
ActorCutscene_Stop(this->unk_498);
this->unk_230 &= ~0x10;

View File

@ -247,7 +247,7 @@ void func_80B35450(EnGg* this, GlobalContext* globalCtx) {
}
void func_80B3556C(EnGg* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_2E6 == 4) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;

View File

@ -172,7 +172,7 @@ void func_80B3B05C(EnGg2* this, GlobalContext* globalCtx) {
}
void func_80B3B0A0(EnGg2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_2F0 = 0;

View File

@ -103,7 +103,7 @@ void EnGinkoMan_Idle(EnGinkoMan* this, GlobalContext* globalCtx) {
// action func: non-input dialogue
void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
if (!func_80147624(globalCtx)) {
if (!Message_ShouldAdvance(globalCtx)) {
return;
}
@ -261,7 +261,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
this->curTextId = 0x46B; // So...
break;
case 0x470: // "Is that so? Come back and deposit some after saving up a bunch!"
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
this->isStampChecked = false;
EnGinkoMan_SetupIdle(this); // change to waiting for approach
@ -304,7 +304,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
// actionfunc: wait for player dialogue input
void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx) {
if (!func_80147624(globalCtx)) {
if (!Message_ShouldAdvance(globalCtx)) {
return;
}
@ -436,7 +436,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
}
void EnGinkoMan_WaitForRupeeCount(EnGinkoMan* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->curTextId) {
case 0x450: // "How much? How much?" [rupee prompt] Set the amount with [Control Stick] and
if (globalCtx->msgCtx.bankRupeesSelected == 0) {
@ -481,7 +481,7 @@ void EnGinkoMan_Dialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
EnGinkoMan_DepositDialogue(this, globalCtx);
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->isStampChecked = false;
EnGinkoMan_SetupIdle(this);
}
@ -546,7 +546,7 @@ void EnGinkoMan_BankAward2(EnGinkoMan* this, GlobalContext* globalCtx) {
EnGinkoMan_SetupDialogue(this);
} else if (this->curTextId == 0x45D) { // saved up 5000 rupees for HP
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && Message_ShouldAdvance(globalCtx)) {
if (!(gSaveContext.weekEventReg[59] & 8)) {
gSaveContext.weekEventReg[59] |= 8;
}

View File

@ -662,7 +662,7 @@ void func_80B51760(EnGk* this, GlobalContext* globalCtx) {
void func_80B51970(EnGk* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (((temp_v0 == 6) || (temp_v0 == 5)) && func_80147624(globalCtx)) {
if (((temp_v0 == 6) || (temp_v0 == 5)) && Message_ShouldAdvance(globalCtx)) {
if ((this->unk_31C == 0xE84) || (this->unk_31C == 0xE99)) {
ActorCutscene_Stop(this->unk_318);
this->unk_318 = ActorCutscene_GetAdditionalCutscene(this->unk_318);
@ -713,7 +713,7 @@ void func_80B51B40(EnGk* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 6) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_1E4 & 1) {
this->unk_1E4 &= ~1;
this->unk_1E4 &= ~4;
@ -741,7 +741,7 @@ void func_80B51B40(EnGk* this, GlobalContext* globalCtx) {
this->unk_1E4 |= 2;
}
}
} else if ((temp_v0 == 4) && (func_80147624(globalCtx) != 0)) {
} else if ((temp_v0 == 4) && (Message_ShouldAdvance(globalCtx) != 0)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F208();
@ -874,7 +874,7 @@ void func_80B5202C(EnGk* this, GlobalContext* globalCtx) {
}
void func_80B5216C(EnGk* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80B51698;
@ -929,7 +929,7 @@ void func_80B52340(EnGk* this, GlobalContext* globalCtx) {
}
void func_80B52430(EnGk* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && Message_ShouldAdvance(globalCtx)) {
switch (this->unk_31C) {
case 0xE93:
this->unk_31C = 0xE89;

View File

@ -778,7 +778,7 @@ void func_8094F2E8(EnGm* this) {
void func_8094F3D0(EnGm* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
s32 sp28 = Message_GetState(&globalCtx->msgCtx);
s32 var = globalCtx->msgCtx.unk11F04;
s32 var = globalCtx->msgCtx.currentTextId;
if ((&this->actor == player->targetActor) && ((var < 0xFF) || (var > 0x200)) && (sp28 == 3) &&
(this->unk_3F0 == 3)) {
@ -807,7 +807,7 @@ s32 func_8094F4EC(EnGm* this, GlobalContext* globalCtx) {
s32 func_8094F53C(EnGm* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
u16 sp32 = globalCtx->msgCtx.unk11F04;
u16 sp32 = globalCtx->msgCtx.currentTextId;
Actor* al = func_8094DEE0(this, globalCtx, ACTORCAT_NPC, ACTOR_EN_AL);
Actor* toto = func_8094DEE0(this, globalCtx, ACTORCAT_NPC, ACTOR_EN_TOTO);

View File

@ -821,7 +821,7 @@ void func_80A12DF4(EnGo* this, GlobalContext* globalCtx) {
}
s32 func_80A12E80(EnGo* this, GlobalContext* globalCtx) {
u16 temp = globalCtx->msgCtx.unk11F04;
u16 temp = globalCtx->msgCtx.currentTextId;
Player* player = GET_PLAYER(globalCtx);
if (ENGO_GET_F(&this->actor) != ENGO_F_4) {

View File

@ -217,8 +217,8 @@ void func_80997E4C(EnGs* this, GlobalContext* globalCtx) {
case 4:
case 5:
case 6:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x20D0:
func_80997D14(this, globalCtx);
break;

View File

@ -228,7 +228,7 @@ void func_80ABB590(EnGuardNuts* this, GlobalContext* globalCtx) {
if ((this->guardTextIndex == 3) && (this->animIndex == WAIT_HEAD_TILT_ANIM)) {
EnGuardNuts_ChangeAnim(this, WAIT_HEAD_TILT_ANIM);
}
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
if (D_80ABBE38[this->guardTextIndex] != 1) {
if (D_80ABBE38[this->guardTextIndex] == 2) {
func_801477B4(globalCtx);

View File

@ -207,7 +207,7 @@ void func_80BC7068(EnGuruguru* this, GlobalContext* globalCtx) {
}
}
}
if ((Message_GetState(&globalCtx->msgCtx) == 5) && (func_80147624(globalCtx))) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && (Message_ShouldAdvance(globalCtx))) {
func_801477B4(globalCtx);
this->headZRotTarget = 0;
if ((this->textIdIndex == 13) || (this->textIdIndex == 14)) {

View File

@ -185,7 +185,7 @@ void EnHgo_DefaultDialogueHandler(EnHgo* this, GlobalContext* globalCtx) {
func_80BD06FC(this, globalCtx);
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80BD049C(this);
}
}
@ -194,7 +194,7 @@ void EnHgo_DefaultDialogueHandler(EnHgo* this, GlobalContext* globalCtx) {
}
void func_80BD06FC(EnHgo* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_314) {
case 0x158F:
Message_StartTextbox(globalCtx, 0x1590, &this->actor);

View File

@ -224,7 +224,7 @@ void func_80BDB59C(EnHiddenNuts* this, GlobalContext* globalCtx) {
this->unk_218 = 30;
}
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80BDB268(this);
}

View File

@ -438,7 +438,7 @@ void func_80C208D0(EnHintSkb* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80C2075C(this);
}
break;
@ -516,7 +516,7 @@ void func_80C20A74(EnHintSkb* this, GlobalContext* globalCtx) {
}
void func_80C20B88(EnHintSkb* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
this->unk_3E8 |= 0x10;
@ -531,7 +531,7 @@ void func_80C20B88(EnHintSkb* this, GlobalContext* globalCtx) {
}
void func_80C20C24(EnHintSkb* this, GlobalContext* globalCtx) {
if (!func_80147624(globalCtx)) {
if (!Message_ShouldAdvance(globalCtx)) {
return;
}

View File

@ -435,7 +435,7 @@ s32 func_80BF1AE0(EnIg* this, GlobalContext* globalCtx) {
s32 func_80BF1B40(EnIg* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
u16 temp = globalCtx->msgCtx.unk11F04;
u16 temp = globalCtx->msgCtx.currentTextId;
s32 pad;
if (player->stateFlags1 & 0xC40) {

View File

@ -1183,7 +1183,7 @@ s32 func_808F5674(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
break;
case 4:
case 5:
if (func_80147624(globalCtx) && func_808F4414(globalCtx, this, arg2)) {
if (Message_ShouldAdvance(globalCtx) && func_808F4414(globalCtx, this, arg2)) {
func_801477B4(globalCtx);
ret = true;
}
@ -1478,7 +1478,7 @@ void func_808F6334(EnIn* this, GlobalContext* globalCtx) {
Matrix_InsertTranslation(this->unk4C4, 0.0f, 0.0f, MTXMODE_APPLY);
if (&this->actor == player->targetActor &&
!(globalCtx->msgCtx.unk11F04 >= 0xFF && globalCtx->msgCtx.unk11F04 <= 0x200) && newUnk4C8 == 3 &&
!(globalCtx->msgCtx.currentTextId >= 0xFF && globalCtx->msgCtx.currentTextId <= 0x200) && newUnk4C8 == 3 &&
this->unk4C8 == 3) {
if (!(globalCtx->state.frames & 1)) {
this->unk4C0 = this->unk4C0 != 0.0f ? 0.0f : 1.0f;

View File

@ -3402,7 +3402,7 @@ void func_80B4ADB8(EnInvadepoh* this) {
}
void func_80B4ADCC(EnInvadepoh* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->textId == 0x3331) {
if (gSaveContext.weekEventReg[22] & 2) {
EnInvadepoh_SetTextID(this, globalCtx, 0x3334);

View File

@ -211,7 +211,7 @@ void func_80BC1E40(EnJa* this, GlobalContext* globalCtx) {
s32 sp20 = Message_GetState(&globalCtx->msgCtx);
f32 phi_f0;
if (((globalCtx->msgCtx.unk11F04 < 0xFF) || (globalCtx->msgCtx.unk11F04 > 0x200)) && (sp20 == 3) &&
if (((globalCtx->msgCtx.currentTextId < 0xFF) || (globalCtx->msgCtx.currentTextId > 0x200)) && (sp20 == 3) &&
(this->unk_374 == 3) && (&this->actor == player->targetActor)) {
if ((globalCtx->state.frames % 2) == 0) {
if (this->unk_348 != 0.0f) {

View File

@ -358,7 +358,7 @@ void EnJg_GoronShrineIdle(EnJg* this, GlobalContext* globalCtx) {
}
void EnJg_GoronShrineTalk(EnJg* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && (func_80147624(globalCtx))) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && (Message_ShouldAdvance(globalCtx))) {
if ((this->textId == 0xDCC) || (this->textId == 0xDDD) || (this->textId == 0xDE0)) {
// There is nothing more to say after these lines, so end the current conversation.
globalCtx->msgCtx.msgMode = 0x43;
@ -425,7 +425,7 @@ void EnJg_AlternateTalkOrWalkInPlace(EnJg* this, GlobalContext* globalCtx) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
}
} else if (this->animationIndex == EN_JG_ANIMATION_SURPRISE_LOOP) {
if ((messageState == 5) && (func_80147624(globalCtx))) {
if ((messageState == 5) && (Message_ShouldAdvance(globalCtx))) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->flags &= ~FLAG_LOOKING_AT_PLAYER;
@ -480,7 +480,7 @@ void EnJg_Talk(EnJg* this, GlobalContext* globalCtx) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
}
if ((messageState == 5) && (func_80147624(globalCtx))) {
if ((messageState == 5) && (Message_ShouldAdvance(globalCtx))) {
temp = this->textId;
if ((temp == 0xDB4) || (temp == 0xDB5) || (temp == 0xDC4) || (temp == 0xDC6)) {
// There is nothing more to say after these lines, so end the current conversation.
@ -600,7 +600,7 @@ void EnJg_FrozenIdle(EnJg* this, GlobalContext* globalCtx) {
}
void EnJg_EndFrozenInteraction(EnJg* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx) != 0) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx) != 0) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = EnJg_FrozenIdle;

View File

@ -266,7 +266,7 @@ void func_80C14044(EnJgameTsn* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (ActorCutscene_GetCurrentIndex() == this->actor.cutscene) {
ActorCutscene_Stop(this->actor.cutscene);
}
@ -405,7 +405,7 @@ void func_80C14610(EnJgameTsn* this, GlobalContext* globalCtx) {
}
void func_80C14684(EnJgameTsn* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) {
if (gSaveContext.rupees >= 20) {
Message_StartTextbox(globalCtx, 0x109E, &this->actor);
@ -436,7 +436,7 @@ void func_80C1476C(EnJgameTsn* this, GlobalContext* globalCtx) {
}
void func_80C147B4(EnJgameTsn* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_300) {
case 0x1095:
Message_StartTextbox(globalCtx, 0x1096, &this->actor);

View File

@ -415,7 +415,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, GlobalContext* globalCtx) {
this->unkState1A8 = 0;
}
if (this->unkMsgState1AC == Message_GetState(&globalCtx->msgCtx) && func_80147624(globalCtx) != 0) {
if (this->unkMsgState1AC == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx) != 0) {
func_801477B4(globalCtx);
if (this->unkMsgState1AC == 5) {
// bad song input
@ -560,7 +560,7 @@ void EnKakasi_SetupSongTeach(EnKakasi* this, GlobalContext* globalCtx) {
* before actually teaching
*/
void EnKakasi_OcarinaRemark(EnKakasi* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx) != 0) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx) != 0) {
func_80152434(globalCtx, 0x35);
this->unkState1A8 = 0;
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@ -735,7 +735,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, GlobalContext* globalCtx) {
func_8096FAAC(this, globalCtx);
if (this->unkState1A8 != 0 && Message_GetState(&globalCtx->msgCtx) == this->unkMsgState1AC &&
func_80147624(globalCtx) != 0) {
Message_ShouldAdvance(globalCtx) != 0) {
func_801477B4(globalCtx);
@ -1101,7 +1101,7 @@ void EnKakasi_IdleRisen(EnKakasi* this, GlobalContext* globalCtx) {
void EnKakasi_RisenDialogue(EnKakasi* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 1000, 0);
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx) != 0) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx) != 0) {
func_801477B4(globalCtx);
EnKakasi_SetupIdleRisen(this);
}

View File

@ -212,7 +212,7 @@ void func_80B2654C(EnKendoJs* this, GlobalContext* globalCtx) {
}
void func_80B26758(EnKendoJs* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx) && (this->unk_288 == 0x2716)) {
if (Message_ShouldAdvance(globalCtx) && (this->unk_288 == 0x2716)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
if (CUR_EQUIP_VALUE_VOID(EQUIP_SWORD) == EQUIP_SWORD) {
@ -261,7 +261,7 @@ void func_80B26758(EnKendoJs* this, GlobalContext* globalCtx) {
void func_80B269A4(EnKendoJs* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (!func_80147624(globalCtx)) {
if (!Message_ShouldAdvance(globalCtx)) {
return;
}
@ -325,7 +325,7 @@ void func_80B26AFC(EnKendoJs* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_288 == 0x272C) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3);
}
@ -503,7 +503,7 @@ void func_80B2714C(EnKendoJs* this) {
void func_80B27188(EnKendoJs* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_288 == 0x2729) {
func_80B26F14(this, globalCtx);
} else if (!func_80B26F6C(this, globalCtx)) {

View File

@ -457,7 +457,7 @@ void func_80B4163C(EnKgy* this, GlobalContext* globalCtx) {
void func_80B417B8(EnKgy* this, GlobalContext* globalCtx) {
func_80B4163C(this, globalCtx);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80B413C8(this);
this->actor.flags &= ~ACTOR_FLAG_100;
@ -481,8 +481,8 @@ void func_80B41858(EnKgy* this, GlobalContext* globalCtx) {
void func_80B418C4(EnKgy* this, GlobalContext* globalCtx) {
func_80B4163C(this, globalCtx);
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx) &&
((globalCtx->msgCtx.unk11F04 == 0xC4E) || (globalCtx->msgCtx.unk11F04 == 0xC4F))) {
(Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx) &&
((globalCtx->msgCtx.currentTextId == 0xC4E) || (globalCtx->msgCtx.currentTextId == 0xC4F))) {
func_801477B4(globalCtx);
this->actor.textId = 0xC4F;
func_80B413C8(this);
@ -616,8 +616,8 @@ void func_80B41E18(EnKgy* this, GlobalContext* globalCtx) {
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && func_80B40E54(this) == 0) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 4:
if (func_80147624(globalCtx)) {
temp = globalCtx->msgCtx.unk11F04;
if (Message_ShouldAdvance(globalCtx)) {
temp = globalCtx->msgCtx.currentTextId;
switch (temp) {
case 0xC3B:
@ -658,8 +658,8 @@ void func_80B41E18(EnKgy* this, GlobalContext* globalCtx) {
break;
case 5:
if (func_80147624(globalCtx)) {
temp = globalCtx->msgCtx.unk11F04;
if (Message_ShouldAdvance(globalCtx)) {
temp = globalCtx->msgCtx.currentTextId;
switch (temp) {
case 0xC35:
@ -856,7 +856,7 @@ void func_80B425A0(EnKgy* this, GlobalContext* globalCtx) {
void func_80B42660(EnKgy* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
this->actor.focus.pos = this->unk_2A8;
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
func_80B413C8(this);
this->actor.flags &= ~ACTOR_FLAG_100;
@ -897,8 +897,8 @@ void func_80B427C8(EnKgy* this, GlobalContext* globalCtx) {
}
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
temp_a2 = globalCtx->msgCtx.unk11F04;
(Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
temp_a2 = globalCtx->msgCtx.currentTextId;
switch (temp_a2) {
case 0xC30:
@ -969,8 +969,8 @@ void func_80B42A8C(EnKgy* this, GlobalContext* globalCtx) {
}
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
temp_a2 = globalCtx->msgCtx.unk11F04;
(Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
temp_a2 = globalCtx->msgCtx.currentTextId;
switch (temp_a2) {
case 0xC1D:
case 0xC2D:

View File

@ -291,7 +291,7 @@ void EnLookNuts_SetupSendPlayerToSpawn(EnLookNuts* this) {
void EnLookNuts_SendPlayerToSpawn(EnLookNuts* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
globalCtx->nextEntranceIndex = Entrance_CreateIndexFromSpawn(this->spawnIndex);
gSaveContext.nextCutsceneIndex = 0;

View File

@ -357,7 +357,7 @@ void EnMa4_Wait(EnMa4* this, GlobalContext* globalCtx) {
// Chooses the next dialogue based on player's selection
void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (this->textId) {
case 0x3339:
if (globalCtx->msgCtx.choiceIndex == 0) {
@ -491,7 +491,7 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
s32 aux;
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (this->textId) {
case 0x2390:
func_801477B4(globalCtx);
@ -643,7 +643,7 @@ void EnMa4_DialogueHandler(EnMa4* this, GlobalContext* globalCtx) {
break;
case 6: // End conversation
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
if ((globalCtx->msgCtx.unk120B1 == 0) || !CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
EnMa4_SetupWait(this);
}

View File

@ -422,7 +422,7 @@ void EnMaYto_DefaultDialogueHandler(EnMaYto* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->unk31E = 0;
EnMaYto_SetupDefaultWait(this);
}
@ -443,7 +443,7 @@ void EnMaYto_DefaultDialogueHandler(EnMaYto* this, GlobalContext* globalCtx) {
}
void EnMaYto_DefaultHandlePlayerChoice(EnMaYto* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) { // Yes
func_8019F208();
EnMaYto_SetFaceExpression(this, 0, 3);
@ -460,7 +460,7 @@ void EnMaYto_DefaultHandlePlayerChoice(EnMaYto* this, GlobalContext* globalCtx)
}
void EnMaYto_DefaultChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->textId) {
case 0x3391:
EnMaYto_SetFaceExpression(this, 0, 3);
@ -554,7 +554,7 @@ void EnMaYto_DinnerDialogueHandler(EnMaYto* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
EnMaYto_SetupDinnerWait(this);
}
break;
@ -568,7 +568,7 @@ void EnMaYto_DinnerDialogueHandler(EnMaYto* this, GlobalContext* globalCtx) {
}
void EnMaYto_DinnerHandlePlayerChoice(EnMaYto* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) { // Yes
func_8019F208();
EnMaYto_SetFaceExpression(this, 0, 3);
@ -585,7 +585,7 @@ void EnMaYto_DinnerHandlePlayerChoice(EnMaYto* this, GlobalContext* globalCtx) {
}
void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->textId) {
case 0x3398:
EnMaYto_SetFaceExpression(this, 0, 3);
@ -740,7 +740,7 @@ void EnMaYto_BarnDialogueHandler(EnMaYto* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->unk31E = 0;
EnMaYto_SetupBarnWait(this);
}
@ -756,7 +756,7 @@ void EnMaYto_BarnDialogueHandler(EnMaYto* this, GlobalContext* globalCtx) {
}
void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->textId) {
case 0x33A9:
func_80B90E50(this, 0);
@ -932,7 +932,7 @@ void EnMaYto_AfterMilkRunDialogueHandler(EnMaYto* this, GlobalContext* globalCtx
}
void EnMaYto_AfterMilkRunChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->textId) {
case 0x33C1:
EnMaYto_SetFaceExpression(this, 3, 1);
@ -1068,7 +1068,7 @@ void EnMaYto_SetupPostMilkRunWaitDialogueEnd(EnMaYto* this) {
void EnMaYto_PostMilkRunWaitDialogueEnd(EnMaYto* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 || Message_GetState(&globalCtx->msgCtx) == 5) {
if (func_80147624(globalCtx) && Message_GetState(&globalCtx->msgCtx) == 5) {
if (Message_ShouldAdvance(globalCtx) && Message_GetState(&globalCtx->msgCtx) == 5) {
func_800B7298(globalCtx, &this->actor, 7);
func_801477B4(globalCtx);
}

View File

@ -359,7 +359,7 @@ void EnMaYts_DialogueHandler(EnMaYts* this, GlobalContext* globalCtx) {
break;
case 6: // End conversation
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
EnMaYts_SetupStartDialogue(this);
}
break;
@ -426,7 +426,7 @@ void EnMaYts_EndCreditsHandler(EnMaYts* this, GlobalContext* globalCtx) {
// Select the following dialogue based on the current one, and an appropiate face expression
void EnMaYts_ChooseNextDialogue(EnMaYts* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (this->textId) {
case 0x335F:
EnMaYts_SetFaceExpression(this, 0, 2);

View File

@ -259,16 +259,16 @@ void EnMinifrog_ReturnFrogCutscene(EnMinifrog* this, GlobalContext* globalCtx) {
EnMinifrog_TurnToPlayer(this);
EnMinifrog_Jump(this);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
EnMinifrog_SetJumpState(this);
switch (globalCtx->msgCtx.unk11F04) {
switch (globalCtx->msgCtx.currentTextId) {
case 0xD81: // "Ah! Don Gero! It has been so long."
case 0xD83: // "Could it be... Has spring finally come to the mountains?"
case 0xD84: // "That look...It is true! Winter was so long that I began to lose all hope."
case 0xD86: // "Could it be... You came all this way looking for me?"
case 0xD87: // "Ah! You need not say a thing. Upon seeing that face, I understand!" ...
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0xD82: // "What has brought you all this way?"
if (gSaveContext.weekEventReg[33] & 0x80) { // Mountain village is unfrozen
@ -496,7 +496,7 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, GlobalContext* globalCtx) {
EnMinifrog_Jump(this);
switch (Message_GetState(&globalCtx->msgCtx)) {
case 4:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0: // Yes
func_8019F208();
@ -511,12 +511,12 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, GlobalContext* globalCtx) {
}
break;
case 5:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
EnMinifrog_SetJumpState(this);
switch (globalCtx->msgCtx.unk11F04) {
switch (globalCtx->msgCtx.currentTextId) {
case 0xD76: // "I have been waiting for you, Don Gero. Forgive me if I'm mistaken, but it looks like
// you've lost a little weight..."
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
this->actor.flags &= ~ACTOR_FLAG_10000;
gSaveContext.weekEventReg[34] |= 1; // Spoken to MINIFROG_YELLOW
break;
@ -525,7 +525,7 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, GlobalContext* globalCtx) {
// has come to the mountains..."
case 0xD7A: // "And when the great Don Gero has come for us, too...What a pity."
case 0xD7F: // "Well, if it isn't the great Don Gero."
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0xD77: // "Let us begin our chorus"
this->actionFunc = EnMinifrog_BeginChoirCutscene;

View File

@ -162,15 +162,15 @@ void func_80959624(EnMk* this, GlobalContext* globalCtx) {
void func_809596A0(EnMk* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((globalCtx->msgCtx.unk11F04 == 0xFB9) || (globalCtx->msgCtx.unk11F04 == 0xFBB) ||
(globalCtx->msgCtx.unk11F04 == 0xFBC)) {
if ((globalCtx->msgCtx.currentTextId == 0xFB9) || (globalCtx->msgCtx.currentTextId == 0xFBB) ||
(globalCtx->msgCtx.currentTextId == 0xFBC)) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x400, 0x80);
this->actor.world.rot.y = this->actor.shape.rot.y;
}
switch (Message_GetState(&globalCtx->msgCtx)) {
case 5:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
this->actionFunc = func_80959774;
}
@ -273,14 +273,14 @@ void func_80959A24(EnMk* this, GlobalContext* globalCtx) {
break;
case 5:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0xFA1:
case 0xFA3:
case 0xFA4:
case 0xFAA:
case 0xFAE:
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0xFA2:
@ -289,7 +289,7 @@ void func_80959A24(EnMk* this, GlobalContext* globalCtx) {
this->actionFunc = func_80959E18;
break;
}
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0xFA5:

View File

@ -49,7 +49,7 @@ void EnMm2_Reading(EnMm2* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if (talkState != 2) {
if (talkState == 5 && func_80147624(globalCtx)) {
if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
this->actionFunc = EnMm2_WaitForRead;
}

View File

@ -139,7 +139,7 @@ void func_80A6F2C8(EnMm3* this, GlobalContext* globalCtx) {
}
void func_80A6F3B4(EnMm3* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_2B4) {
case 0x278E:
if (globalCtx->msgCtx.choiceIndex == 0) {
@ -193,7 +193,7 @@ void func_80A6F3B4(EnMm3* this, GlobalContext* globalCtx) {
}
void func_80A6F5E4(EnMm3* this, GlobalContext* globalCtx) {
if (((this->unk_2B4 != 0x2791) || (this->unk_2AC == 0)) && func_80147624(globalCtx)) {
if (((this->unk_2B4 != 0x2791) || (this->unk_2AC == 0)) && Message_ShouldAdvance(globalCtx)) {
switch (this->unk_2B4) {
case 0x278A:
if (func_80A6FFAC(this, globalCtx)) {
@ -332,7 +332,7 @@ void func_80A6F9DC(EnMm3* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_2B4 == 0x2790) {
Player* player = GET_PLAYER(globalCtx);

View File

@ -99,13 +99,13 @@ void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 6:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
this->actionFunc = EnMs_Wait;
}
break;
case 5:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
func_801477B4(globalCtx);
Actor_PickUp(&this->actor, globalCtx, GI_MAGIC_BEANS, this->actor.xzDistToPlayer,
this->actor.playerHeightRel);
@ -114,7 +114,7 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
break;
case 4:
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0: // yes
func_801477B4(globalCtx);

View File

@ -416,7 +416,7 @@ void EnMttag_RaceFinish(EnMttag* this, GlobalContext* globalCtx) {
void EnMttag_PotentiallyRestartRace(EnMttag* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if (((talkState == 5 && func_80147624(globalCtx)) || talkState == 2)) {
if (((talkState == 5 && Message_ShouldAdvance(globalCtx)) || talkState == 2)) {
if (this->shouldRestartRace) {
globalCtx->nextEntranceIndex = 0xD010;
@ -452,7 +452,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, GlobalContext* globalCtx) {
* responded to the Goron Elder's son's question.
*/
void EnMttag_HandleCantWinChoice(EnMttag* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && (func_80147624(globalCtx))) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && (Message_ShouldAdvance(globalCtx))) {
if (globalCtx->msgCtx.choiceIndex != 0) {
// Exit the race
func_8019F230();

View File

@ -195,7 +195,7 @@ void EnMuto_SetupDialogue(EnMuto* this, GlobalContext* globalCtx) {
void EnMuto_InDialogue(EnMuto* this, GlobalContext* globalCtx) {
if (!this->isInMayorsRoom) {
this->yawTowardsTarget = this->actor.yawTowardsPlayer;
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
func_801477B4(globalCtx);
if (this->actor.textId == 0x62C) {
@ -226,13 +226,13 @@ void EnMuto_InDialogue(EnMuto* this, GlobalContext* globalCtx) {
}
}
if (globalCtx->msgCtx.unk11F04 == 0x2AC6 || globalCtx->msgCtx.unk11F04 == 0x2AC7 ||
globalCtx->msgCtx.unk11F04 == 0x2AC8) {
if (globalCtx->msgCtx.currentTextId == 0x2AC6 || globalCtx->msgCtx.currentTextId == 0x2AC7 ||
globalCtx->msgCtx.currentTextId == 0x2AC8) {
this->skelAnime.playSpeed = 0.0f;
this->yawTowardsTarget = this->actor.yawTowardsPlayer;
this->skelAnime.curFrame = 30.0f;
}
if (globalCtx->msgCtx.unk11F04 == 0x2ACF) {
if (globalCtx->msgCtx.currentTextId == 0x2ACF) {
this->skelAnime.playSpeed = 0.0f;
}

View File

@ -169,7 +169,7 @@ void func_80BF5F70(EnOsk* this) {
void func_80BF609C(EnOsk* this, GlobalContext* globalCtx) {
if (this->actor.draw != NULL) {
if (this->actor.home.rot.z != 0) {
if (globalCtx->msgCtx.unk11F04 == 0x1531) {
if (globalCtx->msgCtx.currentTextId == 0x1531) {
this->actor.home.rot.z = 0;
}
} else {

View File

@ -746,7 +746,7 @@ void func_80AD16A8(EnOsn* this, GlobalContext* globalCtx) {
void func_80AD19A0(EnOsn* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if ((temp_v0 == 6 || temp_v0 == 5) && func_80147624(globalCtx)) {
if ((temp_v0 == 6 || temp_v0 == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_1EA & 0x20) {
this->unk_1EA &= ~0x20;
globalCtx->msgCtx.msgMode = 0x43;
@ -894,7 +894,7 @@ void EnOsn_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_1FA == 0xFF) {
func_8012C28C(globalCtx->state.gfxCtx);
if ((this->unk_1EC == 0xB) || (this->unk_1EC == 0xC) || (this->unk_1EC == 0x17) ||
(globalCtx->msgCtx.unk11F04 == 0x1FCA)) {
(globalCtx->msgCtx.currentTextId == 0x1FCA)) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80AD258C));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(D_80AD2594));
} else if ((this->unk_1EC == 7) || (this->unk_1EC == 3) || (this->unk_1EC == 0xD)) {

View File

@ -563,7 +563,7 @@ void EnOssan_Hello(EnOssan* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
EnOssan_RotateHead(this, globalCtx);
if (talkState == 5 && func_80147624(globalCtx)) {
if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
if ((this->animationIndex == ANI_ANIMATION_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) {
this->animationIndex = ANI_ANIMATION_STANDING_NORMAL_LOOP_2;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, 1);
@ -581,7 +581,7 @@ void EnOssan_Hello(EnOssan* this, GlobalContext* globalCtx) {
}
}
if ((talkState == 10) && (this->actor.params == ENOSSAN_PART_TIME_WORKER) &&
(player->transformation == PLAYER_FORM_ZORA) && func_80147624(globalCtx)) {
(player->transformation == PLAYER_FORM_ZORA) && Message_ShouldAdvance(globalCtx)) {
this->animationIndex = ANI_ANIMATION_APOLOGY_LOOP;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, ANI_ANIMATION_APOLOGY_LOOP);
}
@ -632,7 +632,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, GlobalContext* globalCtx) {
if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnOssan_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx)) &&
(!func_80147624(globalCtx) || !EnOssan_FacingShopkeeperDialogResult(this, globalCtx))) {
(!Message_ShouldAdvance(globalCtx) || !EnOssan_FacingShopkeeperDialogResult(this, globalCtx))) {
if (this->stickAccumX < 0) {
cursorIdx = EnOssan_SetCursorIndexFromNeutral(this, 4);
if (cursorIdx != CURSOR_INVALID) {
@ -665,7 +665,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, GlobalContext* globalCtx) {
void EnOssan_TalkToShopkeeper(EnOssan* this, GlobalContext* globalCtx) {
AnimationInfoS* animations = sAnimations[this->actor.params];
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
if ((this->animationIndex == ANI_ANIMATION_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) {
this->animationIndex = ANI_ANIMATION_STANDING_NORMAL_LOOP_2;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, 1);
@ -1053,7 +1053,7 @@ void EnOssan_SelectItem(EnOssan* this, GlobalContext* globalCtx) {
if (EnOssan_TakeItemOffShelf(this) && talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnOssan_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && func_80147624(globalCtx)) {
if (!EnOssan_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
EnOssan_HandleCanBuyItem(globalCtx, this);
@ -1069,7 +1069,7 @@ void EnOssan_SelectItem(EnOssan* this, GlobalContext* globalCtx) {
}
void EnOssan_CannotBuy(EnOssan* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
this->actionFunc = this->tmpActionFunc;
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
}
@ -1078,7 +1078,7 @@ void EnOssan_CannotBuy(EnOssan* this, GlobalContext* globalCtx) {
void EnOssan_CanBuy(EnOssan* this, GlobalContext* globalCtx) {
EnGirlA* item;
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
this->shopItemSelectedTween = 0.0f;
EnOssan_ResetItemPosition(this);
item = this->items[this->cursorIdx];
@ -1098,7 +1098,7 @@ void EnOssan_BuyItemWithFanfare(EnOssan* this, GlobalContext* globalCtx) {
}
void EnOssan_SetupItemPurchased(EnOssan* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
EnOssan_SetupAction(this, EnOssan_ItemPurchased);
@ -1120,7 +1120,7 @@ void EnOssan_ContinueShopping(EnOssan* this, GlobalContext* globalCtx) {
if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
EnOssan_ResetItemPosition(this);
item = this->items[this->cursorIdx];
item->restockFunc(globalCtx, item);
@ -1142,7 +1142,7 @@ void EnOssan_ContinueShopping(EnOssan* this, GlobalContext* globalCtx) {
}
}
}
} else if (talkState == 5 && func_80147624(globalCtx)) {
} else if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
EnOssan_ResetItemPosition(this);
item = this->items[this->cursorIdx];
item->restockFunc(globalCtx, item);

View File

@ -663,7 +663,7 @@ void func_80B5CD40(EnOt* this, GlobalContext* globalCtx) {
case 4:
case 5:
case 6:
if (func_80147624(globalCtx) && (globalCtx->msgCtx.unk11F04 == 0x1069)) {
if (Message_ShouldAdvance(globalCtx) && (globalCtx->msgCtx.currentTextId == 0x1069)) {
this->unk_32C |= 4;
ActorCutscene_Stop(this->cutscenes[0]);
player->stateFlags2 &= ~0x20000000;
@ -786,8 +786,8 @@ void func_80B5D160(EnOt* this, GlobalContext* globalCtx) {
case 4:
case 5:
case 6:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
default:
case 0x1068:
case 0x106B:

View File

@ -324,7 +324,7 @@ void func_8095ACEC(EnOwl* this) {
}
void func_8095AD54(EnOwl* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case OWL_REPEAT:
func_80151938(globalCtx, 0x7D1);
@ -340,14 +340,14 @@ void func_8095AD54(EnOwl* this, GlobalContext* globalCtx) {
}
void func_8095AE00(EnOwl* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_80151938(globalCtx, 0x7D2);
this->actionFunc = func_8095AD54;
}
}
void func_8095AE60(EnOwl* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
func_80151938(globalCtx, 0x7D1);
this->actionFunc = func_8095AE00;
}
@ -364,13 +364,13 @@ void func_8095AEC0(EnOwl* this, GlobalContext* globalCtx) {
void func_8095AF2C(EnOwl* this, GlobalContext* globalCtx) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 5:
if (func_80147624(globalCtx)) {
if (globalCtx->msgCtx.unk11F04 == 0xBFE) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.currentTextId == 0xBFE) {
func_8095ACEC(this);
func_801477B4(globalCtx);
this->actionFunc = func_8095ABF0;
} else {
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
}
}
break;
@ -607,8 +607,8 @@ void func_8095BA84(EnOwl* this, GlobalContext* globalCtx) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 4:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0xBEC:
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
@ -646,8 +646,8 @@ void func_8095BA84(EnOwl* this, GlobalContext* globalCtx) {
break;
case 5:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0xBEA:
gSaveContext.weekEventReg[9] |= 0x20;
func_80151938(globalCtx, 0xBEB);

View File

@ -639,7 +639,7 @@ void EnPamera_HandleDialogue(EnPamera* this, GlobalContext* globalCtx) {
func_80BD9B4C(this, globalCtx);
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80BD9938(this);
}
break;
@ -651,7 +651,7 @@ void EnPamera_HandleDialogue(EnPamera* this, GlobalContext* globalCtx) {
}
void func_80BD9B4C(EnPamera* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_324) {
case 0x1587:
Message_StartTextbox(globalCtx, 0x1588, &this->actor);

View File

@ -839,7 +839,7 @@ void func_80AF8BA8(s32 arg0) {
void func_80AF8C68(EnPm* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
s32 sp28 = Message_GetState(&globalCtx->msgCtx);
u16 temp_a0 = globalCtx->msgCtx.unk11F04;
u16 temp_a0 = globalCtx->msgCtx.currentTextId;
if ((player->targetActor == &this->actor) && ((temp_a0 < 255) || (temp_a0 > 512)) && (sp28 == 3) &&
(this->unk_388 == 3)) {
@ -873,7 +873,7 @@ s32 func_80AF8D84(EnPm* this, GlobalContext* globalCtx) {
s32 func_80AF8DD4(EnPm* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
u16 temp = globalCtx->msgCtx.unk11F04;
u16 temp = globalCtx->msgCtx.currentTextId;
s32 pad;
if (player->stateFlags1 & (0x400 | 0x40)) {

View File

@ -534,7 +534,7 @@ void func_80B717E0(EnRailSkb* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
func_80B71650(this);
}
break;
@ -700,7 +700,7 @@ void func_80B71F3C(EnRailSkb* this, GlobalContext* globalCtx) {
this->unk_3F2 = 1;
}
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_400) {
case 0x13EC:
Message_StartTextbox(globalCtx, 0x13ED, &this->actor);
@ -753,7 +753,7 @@ void func_80B71F3C(EnRailSkb* this, GlobalContext* globalCtx) {
}
void func_80B72100(EnRailSkb* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
Message_StartTextbox(globalCtx, 0x13F1, &this->actor);

View File

@ -968,14 +968,14 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, GlobalContext* global
} else {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 5:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
Message_StartTextbox(globalCtx, 0x13B3, &this->actor);
this->textId = 0x13B3;
}
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->textId = 0;
this->isInvincible = false;
this->actor.speedXZ = 0.6f;

View File

@ -144,7 +144,7 @@ void EnRecepgirl_Talk(EnRecepgirl* this, GlobalContext* globalCtx) {
if (temp_v0_2 == 2) {
this->actor.textId = 0x2ADC; // hear directions again?
EnRecepgirl_SetupWait(this);
} else if ((temp_v0_2 == 5) && (func_80147624(globalCtx) != 0)) {
} else if ((temp_v0_2 == 5) && (Message_ShouldAdvance(globalCtx) != 0)) {
if (this->actor.textId == 0x2AD9) { // "Welcome..."
Flags_SetSwitch(globalCtx, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 10.0f);

View File

@ -315,7 +315,7 @@ void func_80BCB6D0(EnScopenuts* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->unk_328 & 1) {
this->unk_328 &= ~1;
globalCtx->msgCtx.msgMode = 0x43;
@ -331,7 +331,7 @@ void func_80BCB6D0(EnScopenuts* this, GlobalContext* globalCtx) {
}
}
} else if (temp_v0 == 4) {
if (func_80147624(globalCtx) != 0) {
if (Message_ShouldAdvance(globalCtx) != 0) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
if (gSaveContext.rupees < this->unk_358) {

View File

@ -438,7 +438,7 @@ void func_80ADB924(EnSellnuts* this, GlobalContext* globalCtx) {
func_80151938(globalCtx, this->unk_340);
this->actionFunc = func_80ADB0D8;
}
} else if ((msgState == 5) && func_80147624(globalCtx)) {
} else if ((msgState == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_340 == D_80ADD910[this->unk_33A]) {
this->unk_340 = D_80ADD938[this->unk_33A];
func_80151938(globalCtx, this->unk_340);
@ -468,7 +468,7 @@ void func_80ADBAB8(EnSellnuts* this, GlobalContext* globalCtx) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 6);
}
if ((sp27 == 5) && func_80147624(globalCtx)) {
if ((sp27 == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80ADBBEC;
@ -497,7 +497,7 @@ void func_80ADBC60(EnSellnuts* this, GlobalContext* globalCtx) {
}
void func_80ADBCE4(EnSellnuts* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && Message_ShouldAdvance(globalCtx)) {
func_800B85E0(&this->actor, globalCtx, 400.0f, EXCH_ITEM_MINUS1);
this->unk_340 = D_80ADD930[this->unk_33A];
this->actionFunc = func_80ADBC60;
@ -514,7 +514,7 @@ void func_80ADBD64(EnSellnuts* this, GlobalContext* globalCtx) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 0);
}
if ((sp27 == 5) && func_80147624(globalCtx)) {
if ((sp27 == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_338 &= ~2;
@ -556,7 +556,7 @@ void func_80ADBE80(EnSellnuts* this, GlobalContext* globalCtx) {
}
void func_80ADBFA0(EnSellnuts* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (this->unk_34C == 0) {
@ -719,7 +719,7 @@ void func_80ADC5A4(EnSellnuts* this, GlobalContext* globalCtx) {
void func_80ADC6D0(EnSellnuts* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (player->transformation == PLAYER_FORM_DEKU) {
@ -749,7 +749,7 @@ void func_80ADC7B4(EnSellnuts* this, GlobalContext* globalCtx) {
}
ActorCutscene_SetIntentToPlay(this->cutscene);
}
} else if ((this->unk_366 == 1) && (temp == 5) && func_80147624(globalCtx)) {
} else if ((this->unk_366 == 1) && (temp == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_366 = 0;

View File

@ -186,8 +186,8 @@ void func_80AE6488(EnShn* this, GlobalContext* globalCtx) {
this->unk_2D4 = CLAMP(this->unk_2D4, 0.0f, 80.0f);
Matrix_InsertTranslation(this->unk_2D4, 0.0f, 0.0f, 1);
if ((&this->actor == player->targetActor) &&
((globalCtx->msgCtx.unk11F04 < 0xFF) || (globalCtx->msgCtx.unk11F04 >= 0x201)) && (tempMsgState == 3) &&
(this->msgState == 3)) {
((globalCtx->msgCtx.currentTextId < 0xFF) || (globalCtx->msgCtx.currentTextId >= 0x201)) &&
(tempMsgState == 3) && (this->msgState == 3)) {
if (globalCtx->state.frames % 2 == 0) {
if (this->unk_2D0 != 0.0f) {
this->unk_2D0 = 0.0f;
@ -203,7 +203,7 @@ void func_80AE6488(EnShn* this, GlobalContext* globalCtx) {
s32 func_80AE65F4(EnShn* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
u16 temp = globalCtx->msgCtx.unk11F04;
u16 temp = globalCtx->msgCtx.currentTextId;
if (player->stateFlags1 & 0x40) {
if (this->unk_1DA != temp) {

View File

@ -372,7 +372,7 @@ void func_80995190(EnSkb* this, GlobalContext* globalCtx) {
break;
case 5:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
Message_StartTextbox(globalCtx, 0x13F7, &this->actor);
if (this->unk_3DE == 2) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11);
@ -381,7 +381,7 @@ void func_80995190(EnSkb* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->actionFunc = func_80995244;
}
break;

View File

@ -503,7 +503,7 @@ void EnSob1_SetupLookToShopkeeperFromShelf(GlobalContext* globalCtx, EnSob1* thi
}
void EnSob1_EndingInteraction(EnSob1* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx)) {
EnSob1_EndInteraction(globalCtx, this);
}
}
@ -607,7 +607,7 @@ void EnSob1_Hello(EnSob1* this, GlobalContext* globalCtx) {
ActorCutscene_SetIntentToPlay(this->cutscene);
}
}
if ((talkState == 5) && (func_80147624(globalCtx)) &&
if ((talkState == 5) && (Message_ShouldAdvance(globalCtx)) &&
(!EnSob1_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx)))) {
if (this->welcomeTextId == 0x68A) { // Welcome text when wearing Kafei's mask
EnSob1_EndInteraction(globalCtx, this);
@ -659,7 +659,7 @@ void EnSob1_FaceShopkeeper(EnSob1* this, GlobalContext* globalCtx) {
if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnSob1_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx))) {
if (!func_80147624(globalCtx) || !EnSob1_FacingShopkeeperDialogResult(this, globalCtx)) {
if (!Message_ShouldAdvance(globalCtx) || !EnSob1_FacingShopkeeperDialogResult(this, globalCtx)) {
if (this->stickAccumX > 0) {
cursorIdx = EnSob1_SetCursorIndexFromNeutral(this, 2);
if (cursorIdx != CURSOR_INVALID) {
@ -677,7 +677,7 @@ void EnSob1_FaceShopkeeper(EnSob1* this, GlobalContext* globalCtx) {
}
void EnSob1_TalkingToShopkeeper(EnSob1* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
EnSob1_StartShopping(globalCtx, this);
}
}
@ -1020,7 +1020,7 @@ void EnSob1_SelectItem(EnSob1* this, GlobalContext* globalCtx) {
if (EnSob1_TakeItemOffShelf(this) && talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnSob1_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && func_80147624(globalCtx)) {
if (!EnSob1_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
EnSob1_HandleCanBuyItem(globalCtx, this);
@ -1037,7 +1037,7 @@ void EnSob1_SelectItem(EnSob1* this, GlobalContext* globalCtx) {
void EnSob1_CannotBuy(EnSob1* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
this->actionFunc = this->tmpActionFunc;
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
}
@ -1047,7 +1047,7 @@ void EnSob1_CannotBuy(EnSob1* this, GlobalContext* globalCtx) {
void EnSob1_CanBuy(EnSob1* this, GlobalContext* globalCtx) {
EnGirlA* item;
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
this->shopItemSelectedTween = 0.0f;
EnSob1_ResetItemPosition(this);
item = this->items[this->cursorIdx];
@ -1067,7 +1067,7 @@ void EnSob1_BuyItemWithFanfare(EnSob1* this, GlobalContext* globalCtx) {
}
void EnSob1_SetupItemPurchased(EnSob1* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
EnSob1_SetupAction(this, EnSob1_ItemPurchased);
@ -1086,7 +1086,7 @@ void EnSob1_ContinueShopping(EnSob1* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
EnGirlA* item;
if ((Message_GetState(&globalCtx->msgCtx) == 5) && (func_80147624(globalCtx))) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && (Message_ShouldAdvance(globalCtx))) {
EnSob1_ResetItemPosition(this);
item = this->items[this->cursorIdx];
item->restockFunc(globalCtx, item);

View File

@ -683,8 +683,8 @@ void EnSsh_Wait(EnSsh* this, GlobalContext* globalCtx) {
void EnSsh_Talk(EnSsh* this, GlobalContext* globalCtx) {
EnSsh_Bob(this, globalCtx);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x904:
case 0x905:
case 0x906:
@ -693,7 +693,7 @@ void EnSsh_Talk(EnSsh* this, GlobalContext* globalCtx) {
case 0x911:
case 0x912:
case 0x914:
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
default:

View File

@ -200,7 +200,7 @@ void func_80B67148(EnSth* this, GlobalContext* globalCtx) {
void func_80B671A0(EnSth* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
this->actionFunc = func_80B67208;
func_801477B4(globalCtx);
}
@ -313,10 +313,10 @@ void func_80B67540(EnSth* this, GlobalContext* globalCtx) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 5:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x1134:
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0x1132:
@ -403,7 +403,7 @@ void func_80B677BC(EnSth* this, GlobalContext* globalCtx) {
void func_80B67838(EnSth* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
this->actionFunc = func_80B678A8;
func_801477B4(globalCtx);
}
@ -494,17 +494,17 @@ void func_80B67C1C(EnSth* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x90C:
func_80B670A4(this, 2);
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0x916:
case 0x919:
func_80B670A4(this, 3);
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0x8FC:
@ -512,7 +512,7 @@ void func_80B67C1C(EnSth* this, GlobalContext* globalCtx) {
case 0x900:
case 0x90A:
case 0x90D:
func_80151938(globalCtx, globalCtx->msgCtx.unk11F04 + 1);
func_80151938(globalCtx, globalCtx->msgCtx.currentTextId + 1);
break;
case 0x901:

View File

@ -1111,7 +1111,7 @@ void func_80BAD004(EnSuttari* this, GlobalContext* globalCtx) {
void func_80BAD130(EnSuttari* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if ((talkState == 5 || talkState == 6) && func_80147624(globalCtx)) {
if ((talkState == 5 || talkState == 6) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (this->flags1 & 8) {
@ -1142,7 +1142,7 @@ void func_80BAD230(EnSuttari* this, GlobalContext* globalCtx) {
}
void func_80BAD2B4(EnSuttari* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
if (this->textId == 0x2A30) {
ActorCutscene_Stop(this->cutscenes[0]);
ActorCutscene_SetIntentToPlay(this->cutscenes[1]);
@ -1162,13 +1162,13 @@ void func_80BAD380(EnSuttari* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
Player* player = GET_PLAYER(globalCtx);
if ((player->stateFlags1 & 0x40) && (globalCtx->msgCtx.unk11F04 != 0x2A31)) {
if ((player->stateFlags1 & 0x40) && (globalCtx->msgCtx.currentTextId != 0x2A31)) {
this->flags1 |= 0x8000;
this->actor.speedXZ = 0.0f;
} else {
this->flags1 &= ~0x8000;
func_80BABA90(this, 1, 1);
if ((this->flags1 & 0x4000) && (talkState == 5) && func_80147624(globalCtx)) {
if ((this->flags1 & 0x4000) && (talkState == 5) && Message_ShouldAdvance(globalCtx)) {
this->flags2 &= ~0x10;
player->stateFlags1 &= ~0x10000000;
this->flags1 &= ~0x4000;
@ -1306,7 +1306,7 @@ void func_80BADA9C(EnSuttari* this, GlobalContext* globalCtx) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex);
}
if (talkstate == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->flags1 & 0x400) {
if (this->textId == 0x29EE) {
ActorCutscene_Stop(this->cutscenes[this->cutsceneIdx]);
@ -1328,7 +1328,7 @@ void func_80BADA9C(EnSuttari* this, GlobalContext* globalCtx) {
}
func_80BAAB78(this, globalCtx);
}
} else if ((talkstate == 4) && func_80147624(globalCtx)) {
} else if ((talkstate == 4) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F208();

View File

@ -252,7 +252,7 @@ void func_809C6848(EnSyatekiMan* this, GlobalContext* globalCtx) {
void func_809C6A04(EnSyatekiMan* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) {
if (!CUR_UPG_VALUE(UPG_QUIVER)) {
play_sound(NA_SE_SY_ERROR);
@ -309,7 +309,7 @@ void func_809C6A04(EnSyatekiMan* this, GlobalContext* globalCtx) {
void func_809C6C2C(EnSyatekiMan* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_284) {
case 0xA28:
case 0xA29:
@ -387,7 +387,7 @@ void func_809C6E30(EnSyatekiMan* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->stateFlags1 &= ~0x20;
@ -519,7 +519,7 @@ void func_809C72D8(EnSyatekiMan* this, GlobalContext* globalCtx) {
void func_809C7380(EnSyatekiMan* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) {
if (!CUR_UPG_VALUE(UPG_QUIVER)) {
play_sound(NA_SE_SY_ERROR);
@ -582,7 +582,7 @@ void func_809C7380(EnSyatekiMan* this, GlobalContext* globalCtx) {
void func_809C7620(EnSyatekiMan* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->unk_284) {
case 0x3E8:
case 0x3E9:
@ -721,7 +721,7 @@ void func_809C7990(EnSyatekiMan* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
gSaveContext.weekEventReg[63] &= (u8)~1;
gSaveContext.weekEventReg[63] &= (u8)~2;
player->stateFlags1 &= ~0x20;
@ -832,7 +832,7 @@ void func_809C7EB4(EnSyatekiMan* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (CURRENT_DAY != 3) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && Message_ShouldAdvance(globalCtx)) {
player->stateFlags1 &= ~0x20;
this->unk_280 = 0;
this->unk_26A = 0;

View File

@ -256,7 +256,7 @@ void func_80BE0A98(EnTab* this, GlobalContext* globalCtx) {
Matrix_InsertTranslation(this->unk_308, 0.0f, 0.0f, MTXMODE_APPLY);
if ((&this->actor == player->targetActor) &&
((globalCtx->msgCtx.unk11F04 < 0xFF) || (globalCtx->msgCtx.unk11F04 > 0x200)) && (sp20 == 3) &&
((globalCtx->msgCtx.currentTextId < 0xFF) || (globalCtx->msgCtx.currentTextId > 0x200)) && (sp20 == 3) &&
(this->unk_334 == 3)) {
if ((globalCtx->state.frames % 2) == 0) {
if (this->unk_304 != 0.0f) {
@ -415,8 +415,8 @@ s32 func_80BE10BC(EnTab* this, GlobalContext* globalCtx) {
switch (this->unk_1D8) {
case 1:
if ((player->stateFlags1 & 0x40) && !(globalCtx->msgCtx.unk11F04 <= 0x2B00) &&
(globalCtx->msgCtx.unk11F04 < 0x2B08)) {
if ((player->stateFlags1 & 0x40) && !(globalCtx->msgCtx.currentTextId <= 0x2B00) &&
(globalCtx->msgCtx.currentTextId < 0x2B08)) {
this->actor.child = &this->unk_1E4->actor;
this->unk_2FC |= 8;
} else {

View File

@ -678,7 +678,7 @@ void EnTalkGibud_GetTextIdForRequestedItem(EnTalkGibud* this, GlobalContext* glo
}
void EnTalkGibud_GetNextTextBoxId(EnTalkGibud* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
switch (this->textId) {
case 0x1388:
EnTalkGibud_GetTextIdForRequestedItem(this, globalCtx);
@ -814,7 +814,7 @@ void EnTalkGibud_Talk(EnTalkGibud* this, GlobalContext* globalCtx) {
break;
case 6:
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->textId == 0x138A) {
// Remove the requested item/amount from the player's inventory
requestedItem = &sRequestedItemTable[this->requestedItemIndex];

View File

@ -579,8 +579,8 @@ void func_80AED610(EnTk* this, GlobalContext* globalCtx) {
case 4:
case 5:
case 6:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x13FD:
this->unk_2CA |= 0x10;
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 0, &this->unk_2D4);
@ -828,8 +828,8 @@ void func_80AEDF5C(EnTk* this, GlobalContext* globalCtx) {
case 4:
case 5:
case 6:
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.unk11F04) {
if (Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.currentTextId) {
case 0x1404:
this->unk_2CA |= 0x1000;
func_80AED898(this, globalCtx);

View File

@ -207,7 +207,7 @@ void EnToto_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_80BA383C(EnToto* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime) && this->actionFuncIndex == 1 &&
this->skelAnime.animation != &object_zm_Anim_000C80) {
if (globalCtx->msgCtx.unk11F04 != 0x2A98 && globalCtx->msgCtx.unk11F04 != 0x2A99) {
if (globalCtx->msgCtx.currentTextId != 0x2A98 && globalCtx->msgCtx.currentTextId != 0x2A99) {
if (this->unk2B4 & 1 || Rand_ZeroOne() > 0.5f) {
this->unk2B4 = (this->unk2B4 + 1) & 3;
}
@ -408,7 +408,7 @@ s32 func_80BA407C(EnToto* this, GlobalContext* globalCtx) {
}
s32 func_80BA40D4(EnToto* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
return 1;
}
return 0;
@ -422,7 +422,7 @@ s32 func_80BA4128(EnToto* this, GlobalContext* globalCtx) {
}
s32 func_80BA415C(EnToto* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 4 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 4 && Message_ShouldAdvance(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex != 0) {
func_8019F230();
} else {

View File

@ -312,7 +312,7 @@ void EnTrt_Hello(EnTrt* this, GlobalContext* globalCtx) {
ActorCutscene_SetIntentToPlay(this->cutscene);
}
}
if (talkState == 5 && func_80147624(globalCtx)) {
if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
play_sound(NA_SE_SY_MESSAGE_PASS);
if (!EnTrt_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx))) {
EnTrt_StartShopping(globalCtx, this);
@ -330,7 +330,7 @@ void EnTrt_GetMushroom(EnTrt* this, GlobalContext* globalCtx) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING_SPECIAL) {
player->stateFlags2 &= ~0x20000000;
}
} else if (talkState == 5 && func_80147624(globalCtx)) {
} else if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
switch (this->textId) {
case 0x883:
this->textId = 0x884;
@ -370,7 +370,7 @@ void EnTrt_PayForMushroom(EnTrt* this, GlobalContext* globalCtx) {
}
void EnTrt_Goodbye(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
switch (this->textId) {
case 0x886:
this->textId = 0x887;
@ -385,7 +385,7 @@ void EnTrt_Goodbye(EnTrt* this, GlobalContext* globalCtx) {
}
void EnTrt_SetupTryToGiveRedPotion(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
if (this->textId == 0x88F) {
if (Interface_HasEmptyBottle() || !(gSaveContext.weekEventReg[12] & 0x10)) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING) {
@ -450,7 +450,7 @@ void EnTrt_GivenRedPotionForKoume(EnTrt* this, GlobalContext* globalCtx) {
//! @bug: player is set to NULL not PLAYER
Player* player = NULL;
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx)) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_STOPPED) {
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
ActorCutscene_StartAndSetFlag(this->cutscene, &this->actor);
@ -475,11 +475,11 @@ void EnTrt_EndConversation(EnTrt* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if (talkState == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
EnTrt_EndInteraction(globalCtx, this);
}
} else if (talkState == 6) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
EnTrt_EndInteraction(globalCtx, this);
}
}
@ -521,7 +521,7 @@ void EnTrt_FaceShopkeeper(EnTrt* this, GlobalContext* globalCtx) {
} else if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnTrt_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx))) {
if ((!func_80147624(globalCtx) || !EnTrt_FacingShopkeeperDialogResult(this, globalCtx)) &&
if ((!Message_ShouldAdvance(globalCtx) || !EnTrt_FacingShopkeeperDialogResult(this, globalCtx)) &&
(this->stickAccumX > 0)) {
cursorIdx = EnTrt_SetCursorIndexFromNeutral(this, 2);
if (cursorIdx != CURSOR_INVALID) {
@ -707,7 +707,7 @@ void EnTrt_SelectItem(EnTrt* this, GlobalContext* globalCtx) {
if (EnTrt_TakeItemOffShelf(this)) {
if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (!EnTrt_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && func_80147624(globalCtx)) {
if (!EnTrt_TestCancelOption(this, globalCtx, CONTROLLER1(globalCtx)) && Message_ShouldAdvance(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
EnTrt_HandleCanBuyItem(globalCtx, this);
@ -719,7 +719,7 @@ void EnTrt_SelectItem(EnTrt* this, GlobalContext* globalCtx) {
break;
}
}
} else if (talkState == 5 && func_80147624(globalCtx)) {
} else if (talkState == 5 && Message_ShouldAdvance(globalCtx)) {
if (!Interface_HasEmptyBottle()) {
play_sound(NA_SE_SY_ERROR);
EnTrt_SetupCannotBuy(globalCtx, this, 0x846);
@ -930,7 +930,7 @@ void EnTrt_TryToGiveRedPotionAfterSurprised(EnTrt* this, GlobalContext* globalCt
u8 talkState = Message_GetState(&globalCtx->msgCtx);
this->blinkFunc = EnTrt_Blink;
if (talkState == 6 && func_80147624(globalCtx)) {
if (talkState == 6 && Message_ShouldAdvance(globalCtx)) {
if (Interface_HasEmptyBottle() || !(gSaveContext.weekEventReg[12] & 0x10)) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING) {
ActorCutscene_Stop(this->cutscene);
@ -948,7 +948,7 @@ void EnTrt_TryToGiveRedPotionAfterSurprised(EnTrt* this, GlobalContext* globalCt
}
void EnTrt_TryToGiveRedPotion(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
if (this->textId == 0x83C) {
if (Interface_HasEmptyBottle()) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING) {
@ -1015,7 +1015,7 @@ void EnTrt_ItemGiven(EnTrt* this, GlobalContext* globalCtx) {
}
void EnTrt_SetupEndInteraction(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
EnTrt_EndInteraction(globalCtx, this);
}
}
@ -1032,7 +1032,7 @@ void EnTrt_ShopkeeperGone(EnTrt* this, GlobalContext* globalCtx) {
func_800B8614(&this->actor, globalCtx, 200.0f);
}
}
if (talkState == 6 && func_80147624(globalCtx)) {
if (talkState == 6 && Message_ShouldAdvance(globalCtx)) {
if (gSaveContext.weekEventReg[20] & 2) {
globalCtx->nextEntranceIndex = 0xC50;
} else {
@ -1045,7 +1045,7 @@ void EnTrt_ShopkeeperGone(EnTrt* this, GlobalContext* globalCtx) {
}
void EnTrt_CannotBuy(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
this->actionFunc = this->tmpActionFunc;
func_80151938(globalCtx, EnTrt_GetItemTextId(this));
}
@ -1054,7 +1054,7 @@ void EnTrt_CannotBuy(EnTrt* this, GlobalContext* globalCtx) {
void EnTrt_CanBuy(EnTrt* this, GlobalContext* globalCtx) {
EnGirlA* item;
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
this->shopItemSelectedTween = 0.0f;
EnTrt_ResetItemPosition(this);
item = this->items[this->cursorIdx];
@ -1074,7 +1074,7 @@ void EnTrt_BuyItemWithFanfare(EnTrt* this, GlobalContext* globalCtx) {
}
void EnTrt_SetupItemGiven(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && Message_ShouldAdvance(globalCtx)) {
this->actionFunc = EnTrt_ItemGiven;
if (this->cutsceneState == ENTRT_CUTSCENESTATE_STOPPED) {
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@ -1094,7 +1094,7 @@ void EnTrt_ContinueShopping(EnTrt* this, GlobalContext* globalCtx) {
if (talkState == 4) {
func_8011552C(globalCtx, 6);
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
EnTrt_ResetItemPosition(this);
item = this->items[this->cursorIdx];
item->restockFunc(globalCtx, item);
@ -1117,7 +1117,7 @@ void EnTrt_ContinueShopping(EnTrt* this, GlobalContext* globalCtx) {
}
}
} else if (talkState == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
EnTrt_ResetItemPosition(this);
item = this->items[this->cursorIdx];
item->restockFunc(globalCtx, item);
@ -1362,7 +1362,7 @@ void EnTrt_TalkToShopkeeper(EnTrt* this, GlobalContext* globalCtx) {
s32 itemGiven;
if (talkState == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if (this->talkOptionTextId == 0x845 || this->talkOptionTextId == 0x882) {
func_80151938(globalCtx, 0xFF);
} else {

View File

@ -332,7 +332,7 @@ void func_80AD3CEC(EnTrt2* this, GlobalContext* globalCtx) {
if (this->unk_3D8) {
Message_StartTextbox(globalCtx, this->unk_3A8, &this->actor);
this->unk_3D8 = false;
} else if ((sp27 == 5) && func_80147624(globalCtx)) {
} else if ((sp27 == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_80AD3380(&this->skelAnime, sAnimations, 6);
@ -359,7 +359,7 @@ void func_80AD3DA4(EnTrt2* this, GlobalContext* globalCtx) {
}
void func_80AD3E34(EnTrt2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (Interface_HasEmptyBottle()) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
@ -377,7 +377,7 @@ void func_80AD3EF0(EnTrt2* this, GlobalContext* globalCtx) {
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 6) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
if ((Interface_HasEmptyBottle() && !(gSaveContext.weekEventReg[84] & 0x40)) ||
!(gSaveContext.weekEventReg[12] & 0x10)) {
this->unk_3B2 = 12;
@ -388,7 +388,7 @@ void func_80AD3EF0(EnTrt2* this, GlobalContext* globalCtx) {
this->unk_3B2 = 10;
}
}
} else if ((temp_v0 == 5) && func_80147624(globalCtx)) {
} else if ((temp_v0 == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_3B2 = 12;
@ -411,7 +411,7 @@ void func_80AD3FF4(EnTrt2* this, GlobalContext* globalCtx) {
}
void func_80AD40AC(EnTrt2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && Message_ShouldAdvance(globalCtx)) {
func_800B85E0(&this->actor, globalCtx, 400.0f, -1);
this->unk_3B2 = 13;
}
@ -428,7 +428,7 @@ void func_80AD4110(EnTrt2* this, GlobalContext* globalCtx) {
}
void func_80AD417C(EnTrt2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
if (this->unk_3A8 == 0x84B) {
func_80AD349C(this);
func_80AD3DA4(this, globalCtx);
@ -514,7 +514,7 @@ void func_80AD4550(EnTrt2* this, GlobalContext* globalCtx) {
this->unk_3B2 = 17;
}
if ((sp23 == 5) && func_80147624(globalCtx)) {
if ((sp23 == 5) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
}

View File

@ -821,7 +821,7 @@ s32 func_80A8777C(Actor* thisx, GlobalContext* globalCtx) {
case 4:
case 5:
if (!func_80147624(globalCtx)) {
if (!Message_ShouldAdvance(globalCtx)) {
break;
}
}

View File

@ -371,7 +371,7 @@ void func_80B76A64(EnTruMt* this, GlobalContext* globalCtx) {
void func_80B76BB8(EnTruMt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5) {
if (func_80147624(globalCtx)) {
if (Message_ShouldAdvance(globalCtx)) {
globalCtx->nextEntranceIndex = 0xA810;
globalCtx->unk_1887F = 3;
gSaveContext.nextTransition = 3;

Some files were not shown because too many files have changed in this diff Show More