Decomp Message_GetState, add TextState enum and some header reorganization (#919)

* Message_GetState

* Rename msgCtx->msgLength

* Replace some enums

* TEXT_STATE_CLOSING

* use enum on switches

* use enum when assigning to a variable

* some minor cleanups

* minor cleanup

* TEXT_STATE_CHOICE

* remove unused temp

* z64message.h and z64view.h

* steal some stuff from OoT

* add some stuff to namefixer

* fix shift

* minor doc comment

* Update MessageContext struct from andzura's branch

Co-authored-by: Andzura <11079691+Andzura@users.noreply.github.com>

* some other TextState uses I missed

* format

* statetimer in dec

* review

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* review

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* review

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* format

* Batch () commit

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* review

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* format

* bss

* use text state defines on new actors

* fix matching

* bss

Co-authored-by: Andzura <11079691+Andzura@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
This commit is contained in:
Anghelo Carvajal
2022-07-22 15:51:20 -04:00
committed by GitHub
parent f2b628241d
commit addfe3a613
133 changed files with 1201 additions and 1022 deletions
-11
View File
@@ -25,17 +25,6 @@
(curState)->nextGameStateInit = (GameStateFunc)newInit; \
(curState)->nextGameStateSize = sizeof(newStruct)
#define SET_FULLSCREEN_VIEWPORT(view) \
{ \
Viewport viewport; \
viewport.bottomY = SCREEN_HEIGHT; \
viewport.rightX = SCREEN_WIDTH; \
viewport.topY = 0; \
viewport.leftX = 0; \
View_SetViewport(view, &viewport); \
} \
(void)0
#define GET_PLAYER(play) ((Player*)(play)->actorCtx.actorLists[ACTORCAT_PLAYER].first)
#define GET_FIRST_ENEMY(play) ((Actor*)(play)->actorCtx.actorLists[ACTORCAT_ENEMY].first)
+1 -1
View File
@@ -3,7 +3,7 @@
#include "PR/ultratypes.h"
typedef struct MessageTableEntry{
typedef struct MessageTableEntry {
/* 0x0 */ u16 textId;
/* 0x2 */ u8 typePos;
/* 0x4 */ const char* segment;
+2 -151
View File
@@ -39,6 +39,7 @@
#include "z64light.h"
#include "z64map.h"
#include "z64math.h"
#include "z64message.h"
#include "z64object.h"
#include "z64ocarina.h"
#include "z64player.h"
@@ -48,6 +49,7 @@
#include "z64skin.h"
#include "z64subs.h"
#include "z64transition.h"
#include "z64view.h"
#include "regs.h"
#define Z_THREAD_ID_IDLE 1
@@ -168,25 +170,6 @@ typedef struct FireObjLightParams {
/* 0x5 */ Color_RGB8 maxColorAdj;
} FireObjLightParams; // size = 0x8
#define FONT_CHAR_TEX_WIDTH 16
#define FONT_CHAR_TEX_HEIGHT 16
//! @TODO: Make this use `sizeof(AnyFontTextureSymbol)`
#define FONT_CHAR_TEX_SIZE ((16 * 16) / 2) // 16x16 I4 texture
// Font textures are loaded into here
typedef struct {
/* 0x00000 */ u8 charBuf[2][FONT_CHAR_TEX_SIZE * 120];
/* 0x07800 */ u8 iconBuf[FONT_CHAR_TEX_SIZE];
/* 0x07880 */ u8 fontBuf[FONT_CHAR_TEX_SIZE * 320];
/* 0x11880 */ union {
u8 schar[640];
u16 wchar[640];
} msgBuf;
/* 0x11D80 */ u8* messageStart;
/* 0x11D84 */ u8* messageEnd;
/* 0x11D88 */ u8 unk_11D88; // current Char Buffer ?
} Font; // size = 0x11D8C
// Game Info aka. Static Context
// Data normally accessed through REG macros (see regs.h)
typedef struct {
@@ -310,13 +293,6 @@ typedef struct {
/* 0x3 */ s8 pillarboxMagnitude;
} ShrinkWindowContext; // size = 0x4
typedef struct {
/* 0x0 */ s32 topY;
/* 0x4 */ s32 bottomY;
/* 0x8 */ s32 leftX;
/* 0xC */ s32 rightX;
} Viewport; // size = 0x10
typedef void(*osCreateThread_func)(void*);
typedef enum {
@@ -422,34 +398,6 @@ typedef struct {
/* 0x10 */ Vec3f projectedPos;
} SoundSource; // size = 0x1C
typedef struct {
/* 0x000 */ u32 magic;
/* 0x004 */ GraphicsContext* gfxCtx;
/* 0x008 */ Viewport viewport;
/* 0x018 */ f32 fovy;
/* 0x01C */ f32 zNear;
/* 0x020 */ f32 zFar;
/* 0x024 */ f32 scale;
/* 0x028 */ Vec3f eye;
/* 0x034 */ Vec3f at;
/* 0x040 */ Vec3f up;
/* 0x04C */ UNK_TYPE1 pad4C[0x4];
/* 0x050 */ Vp vp;
/* 0x060 */ Mtx projection;
/* 0x0A0 */ Mtx viewing;
/* 0x0E0 */ Mtx unkE0;
/* 0x120 */ Mtx* projectionPtr;
/* 0x124 */ Mtx* viewingPtr;
/* 0x128 */ Vec3f distortionDirRot;
/* 0x134 */ Vec3f distortionScale;
/* 0x140 */ f32 distortionSpeed;
/* 0x144 */ Vec3f curDistortionDirRot;
/* 0x150 */ Vec3f curDistortionScale;
/* 0x15C */ u16 normal;
/* 0x160 */ u32 flags; // bit 3: Render to an orthographic perspective
/* 0x164 */ s32 unk164;
} View; // size = 0x168
typedef void(*fault_update_input_func)(Input* input);
typedef struct {
@@ -791,103 +739,6 @@ typedef struct {
/* 0x24 */ u32 flags;
} PreRenderParams; // size = 0x28
typedef struct {
/* 0x00 */ u8 unk00;
/* 0x01 */ u8 unk01;
} MsgCtx11F00;
typedef struct {
/* 0x00000 */ View view;
/* 0x00168 */ Font font;
/* 0x11EF4 */ char unk_11EF4[0x4];
/* 0x11EF8 */ UNK_PTR unk11EF8;
/* 0x11EFC */ UNK_TYPE1 unk11EFC[0x4];
/* 0x11F00 */ MsgCtx11F00* unk11F00;
/* 0x11F04 */ u16 currentTextId;
/* 0x11F06 */ UNK_TYPE1 pad11F06[0x4];
/* 0x11F0A */ u8 unk11F0A;
/* 0x11F0B */ UNK_TYPE1 pad11F0B[0x5];
/* 0x11F10 */ s32 unk11F10;
/* 0x11F14 */ UNK_TYPE1 pad11F14[0x6];
/* 0x11F1A */ s16 unk11F1A[3];
/* 0x11F20 */ UNK_TYPE1 pad11F20[0x2];
/* 0x11F22 */ u8 msgMode;
/* 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 */ 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[0x6];
/* 0x1203A */ s16 unk1203A;
/* 0x1203C */ s16 unk1203C;
/* 0x1203E */ s16 pad1203E;
/* 0x12040 */ Actor* unkActor;
/* 0x12044 */ s16 unk12044;
/* 0x12046 */ s16 unk12046;
/* 0x12048 */ u8 unk12048; // EnKakasi
/* 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 */ 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 */ 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
#define TRANS_TRIGGER_OFF 0 // transition is not active
#define TRANS_TRIGGER_START 20 // start transition (exiting an area)
#define TRANS_TRIGGER_END -20 // transition is ending (arriving in a new area)
+179
View File
@@ -0,0 +1,179 @@
#ifndef Z64MESSAGE_H
#define Z64MESSAGE_H
#include "PR/ultratypes.h"
#include "z64view.h"
#include "unk.h"
struct Actor;
struct MessageTableEntry;
struct OcarinaStaff;
typedef enum TextState {
/* 0 */ TEXT_STATE_NONE,
/* 1 */ TEXT_STATE_1,
/* 2 */ TEXT_STATE_CLOSING,
/* 3 */ TEXT_STATE_3,
/* 4 */ TEXT_STATE_CHOICE,
/* 5 */ TEXT_STATE_5,
/* 6 */ TEXT_STATE_DONE,
/* 7 */ TEXT_STATE_7,
/* 8 */ TEXT_STATE_8,
/* 9 */ TEXT_STATE_9,
/* 10 */ TEXT_STATE_10,
/* 11 */ TEXT_STATE_11,
/* 12 */ TEXT_STATE_12,
/* 13 */ TEXT_STATE_13,
/* 14 */ TEXT_STATE_14,
/* 15 */ TEXT_STATE_15,
/* 16 */ TEXT_STATE_16,
/* 17 */ TEXT_STATE_17,
/* 18 */ TEXT_STATE_18
} TextState;
#define FONT_CHAR_TEX_WIDTH 16
#define FONT_CHAR_TEX_HEIGHT 16
//! @TODO: Make this use `sizeof(AnyFontTextureSymbol)`
#define FONT_CHAR_TEX_SIZE ((16 * 16) / 2) // 16x16 I4 texture
// TODO: should Font be in its own header or is it fine to have it here?
// Font textures are loaded into here
typedef struct {
/* 0x00000 */ union {
u8 charBuf[2][FONT_CHAR_TEX_SIZE * 120];
u64 force_structure_alignment_charTex;
};
/* 0x07800 */ union {
u8 iconBuf[FONT_CHAR_TEX_SIZE];
u64 force_structure_alignment_icon;
};
/* 0x07880 */ union {
u8 fontBuf[FONT_CHAR_TEX_SIZE * 320];
u64 force_structure_alignment_font;
};
/* 0x11880 */ union {
char schar[1280]; // msgBuf
u16 wchar[640]; // msgBufWide
u64 force_structure_alignment_msg;
} msgBuf;
/* 0x11D80 */ u8* messageStart;
/* 0x11D84 */ u8* messageEnd;
/* 0x11D88 */ u8 unk_11D88; // current Char Buffer ?
} Font; // size = 0x11D90
typedef struct MessageContext {
/* 0x00000 */ View view;
/* 0x00168 */ Font font;
/* 0x11EF8 */ UNK_PTR unk11EF8;
/* 0x11EFC */ UNK_TYPE1 unk11EFC[0x4];
/* 0x11F00 */ struct OcarinaStaff* unk11F00;
/* 0x11F04 */ u16 currentTextId;
/* 0x11F06 */ UNK_TYPE1 unk11F06[0x2];
/* 0x11F08 */ u16 unk11F08;
/* 0x11F0A */ u8 unk11F0A;
/* 0x11F0B */ s8 unk11F0B;
/* 0x11F0C */ s8 unk11F0C;
/* 0x11F0B */ UNK_TYPE1 unk11F0D[0x3];
/* 0x11F10 */ s32 msgLength;
/* 0x11F14 */ u16 unk11F14;
/* 0x11F16 */ u16 unk11F16;
/* 0x11F18 */ s8 unk11F18;
/* 0x11F19 */ UNK_TYPE1 unk11F19[0x1];
/* 0x11F1A */ s16 unk11F1A[3];
/* 0x11F20 */ UNK_TYPE1 unk11F20[0x2];
/* 0x11F22 */ u8 msgMode; // TODO: MessageMode enum
/* 0x11F23 */ UNK_TYPE1 unk11F23;
/* 0x11F24 */ union {
char schar[200];
u16 wchar[100];
} decodedBuffer;
/* 0x11FEC */ u16 msgBufPos;
/* 0x11FEE */ s16 unk11FEE;
/* 0x11FF0 */ s16 unk11FF0;
/* 0x11FF2 */ u16 unk11FF2;
/* 0x11FF4 */ s16 unk11FF4;
/* 0x11FF6 */ s16 unk11FF6;
/* 0x11FF8 */ s16 unk11FF8;
/* 0x11FFA */ s16 unk11FFA;
/* 0x11FFC */ s16 unk11FFC;
/* 0x11FFE */ s16 unk11FFE[0x3];
/* 0x12004 */ s16 unk12004;
/* 0x12006 */ s16 unk12006;
/* 0x12008 */ s16 unk12008;
/* 0x1200A */ UNK_TYPE2 unk1200A;
/* 0x1200C */ s16 unk1200C;
/* 0x1200E */ s16 unk1200E;
/* 0x12010 */ s16 unk12010;
/* 0x12012 */ s16 unk12012;
/* 0x12014 */ s16 unk12014;
/* 0x12014 */ s16 unk12016;
/* 0x12018 */ s16 unk12018; // messageR
/* 0x1201A */ s16 unk1201A; // messageG
/* 0x1201C */ s16 unk1201C; // messageB
/* 0x1201E */ s16 unk1201E; // messageA
/* 0x12020 */ u8 unk12020; // probably textboxEndType
/* 0x12021 */ u8 choiceIndex;
/* 0x12022 */ u8 unk12022;
/* 0x12023 */ u8 stateTimer;
/* 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 */ s16 unk12034;
/* 0x12036 */ s16 unk12036;
/* 0x12038 */ s16 unk12038;
/* 0x1203A */ s16 unk1203A;
/* 0x1203C */ s16 unk1203C;
/* 0x1203E */ s16 unk1203E;
/* 0x12040 */ struct Actor* unkActor;
/* 0x12044 */ s16 unk12044;
/* 0x12046 */ s16 unk12046;
/* 0x12048 */ u8 unk12048; // EnKakasi
/* 0x12049 */ UNK_TYPE1 unk12049[0x1];
/* 0x1204A */ s16 unk1204A[0x5];
/* 0x12054 */ s16 unk12054[6]; // First, second and third digits in lottery code guess
/* 0x1205A */ UNK_TYPE1 unk12060[0x8];
/* 0x12068 */ s16 unk12068;
/* 0x1206A */ s16 unk1206A;
/* 0x1206C */ s32 unk1206C;
/* 0x12070 */ s32 unk12070;
/* 0x12074 */ s32 unk12074;
/* 0x12078 */ s32 bankRupeesSelected;
/* 0x1207C */ s32 bankRupees;
/* 0x12080 */ struct MessageTableEntry* messageEntryTable;
/* 0x12084 */ struct MessageTableEntry* messageEntryTableNes;
/* 0x12088 */ UNK_TYPE4 unk12088;
/* 0x1208C */ struct 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 */ s16 unk120A4[6];
/* 0x120B0 */ u8 unk120B0;
/* 0x120B1 */ u8 unk120B1;
/* 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 unk120D8[0x8];
} MessageContext; // size = 0x120E0
#endif
+1 -1
View File
@@ -116,7 +116,7 @@ typedef struct {
/* 0x1 */ u8 buttonIndex[8];
} OcarinaSongButtons; // size = 0x9
typedef struct {
typedef struct OcarinaStaff {
/* 0x0 */ u8 buttonIndex;
/* 0x1 */ u8 state; // original name: "status"
/* 0x2 */ u8 pos; // original name: "locate"
+57
View File
@@ -0,0 +1,57 @@
#ifndef Z64VIEW_H
#define Z64VIEW_H
#include "PR/ultratypes.h"
#include "PR/gbi.h"
#include "z64math.h"
#include "unk.h"
struct GraphicsContext;
typedef struct Viewport {
/* 0x00 */ s32 topY; // uly (upper left y)
/* 0x04 */ s32 bottomY; // lry (lower right y)
/* 0x08 */ s32 leftX; // ulx (upper left x)
/* 0x0C */ s32 rightX; // lrx (lower right x)
} Viewport; // size = 0x10
typedef struct View {
/* 0x000 */ u32 magic; // string literal "VIEW" / 0x56494557
/* 0x004 */ struct GraphicsContext* gfxCtx;
/* 0x008 */ Viewport viewport;
/* 0x018 */ f32 fovy; // vertical field of view in degrees
/* 0x01C */ f32 zNear; // distance to near clipping plane
/* 0x020 */ f32 zFar; // distance to far clipping plane
/* 0x024 */ f32 scale; // scale for matrix elements
/* 0x028 */ Vec3f eye;
/* 0x034 */ Vec3f at;
/* 0x040 */ Vec3f up;
/* 0x04C */ UNK_TYPE1 pad4C[0x4];
/* 0x050 */ Vp vp;
/* 0x060 */ Mtx projection;
/* 0x0A0 */ Mtx viewing;
/* 0x0E0 */ Mtx unkE0;
/* 0x120 */ Mtx* projectionPtr;
/* 0x124 */ Mtx* viewingPtr;
/* 0x128 */ Vec3f distortionDirRot;
/* 0x134 */ Vec3f distortionScale;
/* 0x140 */ f32 distortionSpeed;
/* 0x144 */ Vec3f curDistortionDirRot;
/* 0x150 */ Vec3f curDistortionScale;
/* 0x15C */ u16 normal; // used to normalize the projection matrix
/* 0x160 */ u32 flags; // bit 3: Render to an orthographic perspective
/* 0x164 */ s32 unk164;
} View; // size = 0x168
#define SET_FULLSCREEN_VIEWPORT(view) \
{ \
Viewport viewport; \
viewport.bottomY = SCREEN_HEIGHT; \
viewport.rightX = SCREEN_WIDTH; \
viewport.topY = 0; \
viewport.leftX = 0; \
View_SetViewport(view, &viewport); \
} \
(void)0
#endif
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u8 sYaz0DataBuffer[0x400];
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u32 sDmaMgrDmaBuffSize = 0x2000;
+1 -1
View File
@@ -1886,7 +1886,7 @@ s32 func_800B863C(Actor* actor, PlayState* play) {
}
s32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 2) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
actor->flags &= ~ACTOR_FLAG_100;
return true;
}
+7 -6
View File
@@ -998,7 +998,7 @@ s32 Cutscene_CountNormalMasks(void) {
// Command 0xA: Textbox
void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdTextbox* cmd) {
static s32 D_801BB160 = CS_TEXTBOX_TYPE_DEFAULT;
u8 dialogState;
u8 talkState;
s32 pad;
u16 originalCsFrames;
s32 pad2;
@@ -1048,10 +1048,11 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
// a textbox that is expected to be closed by the user is still open.
originalCsFrames = csCtx->frames;
dialogState = Message_GetState(&play->msgCtx);
if ((dialogState != 2) && (dialogState != 0) && (dialogState != 7) && (dialogState != 8)) {
talkState = Message_GetState(&play->msgCtx);
if ((talkState != TEXT_STATE_CLOSING) && (talkState != TEXT_STATE_NONE) && (talkState != TEXT_STATE_7) &&
(talkState != TEXT_STATE_8)) {
csCtx->frames--;
if ((dialogState == 4) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
if (play->msgCtx.choiceIndex == 0) {
if (cmd->base == 0x33BD) {
func_8019F230();
@@ -1089,12 +1090,12 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
}
}
if (dialogState == 5 && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_80152434(play, cmd->base);
}
}
if ((dialogState == 2) && (D_801BB160 == CS_TEXTBOX_TYPE_3)) {
if ((talkState == TEXT_STATE_CLOSING) && (D_801BB160 == CS_TEXTBOX_TYPE_3)) {
csCtx->frames--;
D_801BB124++;
}
+77 -11
View File
@@ -99,8 +99,8 @@ s32 Message_ShouldAdvanceSilent(PlayState* play) {
void func_801477B4(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
if (play->msgCtx.unk11F10 != 0) {
msgCtx->unk12023 = 2;
if (play->msgCtx.msgLength != 0) {
msgCtx->stateTimer = 2;
msgCtx->msgMode = 0x43;
msgCtx->unk12020 = 0;
play_sound(NA_SE_PL_WALK_GROUND - SFX_FLAG);
@@ -325,7 +325,7 @@ void Message_StartTextbox(PlayState* play, u16 textId, Actor* Actor) {
func_80150D08(play, textId);
msgCtx->unkActor = Actor;
msgCtx->msgMode = 1;
msgCtx->unk12023 = 0;
msgCtx->stateTimer = 0;
msgCtx->unk12024 = 0;
play->msgCtx.ocarinaMode = 0;
}
@@ -334,11 +334,11 @@ void func_80151938(PlayState* play, u16 textId) {
MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
msgCtx->unk11F10 = 0;
msgCtx->msgLength = 0;
func_80150D08(play, textId);
func_80150A84(play);
msgCtx->msgMode = 5;
msgCtx->unk12023 = 8;
msgCtx->stateTimer = 8;
msgCtx->unk12024 = 0;
if (interfaceCtx->unk_222 == 0) {
@@ -354,24 +354,24 @@ void func_80151938(PlayState* play, u16 textId) {
msgCtx->unk12004 = 0x22;
msgCtx->unk12006 = 0x15E;
func_80149C18(play);
msgCtx->unk12023 = 1;
msgCtx->stateTimer = 1;
}
}
void func_80151A68(PlayState* play, u16 textId) {
MessageContext* msgCtx = &play->msgCtx;
msgCtx->unk11F10 = 0;
msgCtx->msgLength = 0;
func_80150D08(play, textId);
func_80150A84(play);
func_8015B198(play);
msgCtx->msgMode = 0x45;
msgCtx->unk12024 = 0;
msgCtx->unk1203C = msgCtx->unk1203A = msgCtx->unk1201E = 0;
msgCtx->unk12023 = 0x1E;
msgCtx->stateTimer = 30;
// Day/Dawn/Night.. Messages
if ((msgCtx->currentTextId >= 0x1BB2) && (msgCtx->currentTextId < 0x1BB7)) {
if ((msgCtx->currentTextId >= 0x1BB2) && (msgCtx->currentTextId <= 0x1BB6)) {
XREG(74) = 0x6A;
XREG(75) = 0;
XREG(77) = 0x58;
@@ -439,7 +439,73 @@ void func_80152464(PlayState* play, u16 arg1) {
func_80151DA4(play, arg1);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_GetState.s")
/**
* @return u8 A value of the TextState enum representing the current state of the on-screen message
*/
u8 Message_GetState(MessageContext* msgCtx) {
if (msgCtx->msgLength == 0) {
return TEXT_STATE_NONE;
}
if (msgCtx->msgMode == 0x42) {
if (msgCtx->unk11F14 != 0xFFFF) {
return TEXT_STATE_1;
}
if ((msgCtx->unk12020 == 0x10) || (msgCtx->unk12020 == 0x11)) {
return TEXT_STATE_CHOICE;
}
if ((msgCtx->unk12020 == 0x40) || (msgCtx->unk12020 == 0x42) || (msgCtx->unk12020 == 0x30)) {
return TEXT_STATE_5;
}
if (msgCtx->unk12020 == 0x41) {
return TEXT_STATE_16;
}
if ((msgCtx->unk12020 >= 0x50) && (msgCtx->unk12020 < 0x58)) {
return TEXT_STATE_3;
}
if ((msgCtx->unk12020 == 0x60) || (msgCtx->unk12020 == 0x61)) {
return TEXT_STATE_14;
}
if (msgCtx->unk12020 == 0x62) {
return TEXT_STATE_15;
}
if (msgCtx->unk12020 == 0x63) {
return TEXT_STATE_17;
}
if (msgCtx->unk12020 == 0x12) {
return TEXT_STATE_18;
}
return TEXT_STATE_DONE;
}
if (msgCtx->msgMode == 0x41) {
return TEXT_STATE_10;
}
if (msgCtx->msgMode == 0x1B) {
return TEXT_STATE_7;
}
if ((msgCtx->ocarinaMode == 3) || (msgCtx->msgMode == 0x37)) {
return TEXT_STATE_8;
}
if (msgCtx->msgMode == 0x20) {
return TEXT_STATE_9;
}
if ((msgCtx->msgMode == 0x21) || (msgCtx->msgMode == 0x3A)) {
return TEXT_STATE_11;
}
if (msgCtx->msgMode == 0x3D) {
return TEXT_STATE_12;
}
if (msgCtx->msgMode == 0x40) {
return TEXT_STATE_13;
}
if ((msgCtx->msgMode == 0x43) && (msgCtx->stateTimer == 1) && (msgCtx->unk120B1 == 0)) {
return TEXT_STATE_CLOSING;
}
return TEXT_STATE_3;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8015268C.s")
@@ -523,7 +589,7 @@ void Message_Init(PlayState* play) {
func_801586A4(play);
play->msgCtx.ocarinaMode = 0;
messageCtx->msgMode = 0;
messageCtx->unk11F10 = 0;
messageCtx->msgLength = 0;
messageCtx->currentTextId = 0;
messageCtx->unk12020 = 0;
messageCtx->choiceIndex = 0;
@@ -273,7 +273,7 @@ void func_80954340(BgIngate* this, PlayState* play) {
void func_809543D4(BgIngate* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == 4) || (talkState == 5)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_CHOICE) || (talkState == TEXT_STATE_5)) && Message_ShouldAdvance(play)) {
switch (this->dyna.actor.textId) {
case 0x9E4:
this->dyna.actor.textId = 0x9E5;
@@ -356,7 +356,7 @@ void func_808B93A0(DoorWarp1* this, PlayState* play) {
s32 pad;
Player* player = GET_PLAYER(play);
if (Message_GetState(&play->msgCtx) == 4 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
func_801477B4(play);
if (play->msgCtx.choiceIndex == 0) {
func_8019F208();
@@ -579,7 +579,7 @@ void func_808B9CE8(DoorWarp1* this, PlayState* play) {
}
void func_808B9E94(DoorWarp1* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 2) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
this->unk_1CE = 110;
DoorWarp1_SetupAction(this, func_808B9ED8);
}
@@ -426,7 +426,7 @@ void func_80BED3BC(EnAkindonuts* this, PlayState* play) {
this->unk_32C &= ~0x1;
this->unk_32C |= 0x40;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
return;
@@ -509,7 +509,7 @@ void func_80BED680(EnAkindonuts* this, PlayState* play) {
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
return;
@@ -604,7 +604,7 @@ void func_80BED8A4(EnAkindonuts* this, PlayState* play) {
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
return;
@@ -687,7 +687,7 @@ void func_80BEDB88(EnAkindonuts* this, PlayState* play) {
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
return;
@@ -777,7 +777,7 @@ void func_80BEDDAC(EnAkindonuts* this, PlayState* play) {
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
return;
@@ -855,7 +855,7 @@ void func_80BEE070(EnAkindonuts* this, PlayState* play) {
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x161A;
this->actionFunc = func_80BEF360;
return;
@@ -938,7 +938,7 @@ void func_80BEE274(EnAkindonuts* this, PlayState* play) {
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x1629;
this->actionFunc = func_80BEF360;
return;
@@ -1016,7 +1016,7 @@ void func_80BEE530(EnAkindonuts* this, PlayState* play) {
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
return;
@@ -1240,14 +1240,14 @@ void func_80BEEE10(EnAkindonuts* this, PlayState* play) {
}
void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (temp_v0 == 5) {
if (talkState == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0;
this->actionFunc = func_80BEEE10;
} else if (this->unk_32C & 0x20) {
@@ -1255,7 +1255,7 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_1;
this->unk_32C &= ~0x4;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_338 = 8;
this->unk_33C = 0;
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338);
@@ -1264,7 +1264,7 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
this->unk_2DC(this, play);
}
}
} else if (temp_v0 == 4) {
} else if (talkState == TEXT_STATE_CHOICE) {
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -1279,22 +1279,22 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
break;
}
}
} else if (temp_v0 == 16) {
} else if (talkState == TEXT_STATE_16) {
func_80BEE73C(this, play);
}
}
void func_80BEF18C(EnAkindonuts* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0;
this->actionFunc = func_80BEEE10;
}
}
void func_80BEF20C(EnAkindonuts* this, PlayState* play) {
u8 sp27 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
s16 sp24 = this->skelAnime.curFrame;
s16 sp22 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common);
@@ -1310,11 +1310,11 @@ void func_80BEF20C(EnAkindonuts* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 6);
}
if ((sp27 == 5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80BEF360;
} else {
this->unk_2DC(this, play);
@@ -1341,7 +1341,7 @@ void func_80BEF360(EnAkindonuts* this, PlayState* play) {
}
void func_80BEF450(EnAkindonuts* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 6) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
func_800B85E0(&this->actor, play, 400.0f, -1);
this->actionFunc = func_80BEF4B8;
}
+1 -1
View File
@@ -175,7 +175,7 @@ void EnAni_IdleStanding(EnAni* this, PlayState* play) {
void EnAni_Talk(EnAni* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if (Message_GetState(&play->msgCtx) == 2 && play->msgCtx.currentTextId == 0x6DE) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) && play->msgCtx.currentTextId == 0x6DE) {
this->actionFunc = EnAni_IdleInPain;
}
}
+17 -17
View File
@@ -394,7 +394,7 @@ void func_809C16DC(EnAob01* this, PlayState* play) {
Rupees_ChangeBy(-this->unk_434);
func_800B7298(play, NULL, 7);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_809C1C9C;
return;
}
@@ -426,9 +426,9 @@ void func_809C1C9C(EnAob01* this, PlayState* play) {
}
void func_809C1D64(EnAob01* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (temp_v0 == 4) {
if (talkState == TEXT_STATE_CHOICE) {
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -453,9 +453,9 @@ void func_809C1D64(EnAob01* this, PlayState* play) {
break;
}
}
} else if ((temp_v0 == 5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_210 = 0;
this->actionFunc = func_809C2060;
}
@@ -521,7 +521,7 @@ void func_809C2060(EnAob01* this, PlayState* play) {
}
void func_809C21E0(EnAob01* this, PlayState* play) {
u8 sp2F = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 4000, 1);
@@ -561,7 +561,7 @@ void func_809C21E0(EnAob01* this, PlayState* play) {
}
this->unk_2D2 &= ~8;
}
} else if (sp2F == 4) {
} else if (talkState == TEXT_STATE_CHOICE) {
if (Message_ShouldAdvance(play)) {
this->unk_2D2 &= ~0x40;
switch (play->msgCtx.choiceIndex) {
@@ -577,19 +577,19 @@ void func_809C21E0(EnAob01* this, PlayState* play) {
break;
}
}
} else if (sp2F == 5) {
} else if (talkState == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
this->unk_2D2 &= ~0x40;
if (this->unk_2D2 & 0x10) {
this->unk_2D2 &= ~0x10;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_809C2060;
} else {
func_809C16DC(this, play);
}
}
} else if ((sp2F == 14) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_14) && Message_ShouldAdvance(play)) {
this->unk_2D2 &= ~0x40;
this->unk_434 = play->msgCtx.bankRupeesSelected;
func_809C16DC(this, play);
@@ -746,13 +746,13 @@ void func_809C28B8(EnAob01* this, PlayState* play) {
}
void func_809C2A64(EnAob01* this, PlayState* play) {
u8 sp2F = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (func_809C15BC(this)) {
if ((sp2F == 5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->unk_434 = 0;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
}
if (Actor_HasParent(&this->actor, play)) {
@@ -776,9 +776,9 @@ void func_809C2A64(EnAob01* this, PlayState* play) {
}
void func_809C2BE4(EnAob01* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (((temp_v0 == 5) || (temp_v0 == 6)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (gSaveContext.save.weekEventReg[63] & 2) {
gSaveContext.save.weekEventReg[63] &= (u8)~2;
}
@@ -805,7 +805,7 @@ void func_809C2C9C(EnAob01* this, PlayState* play) {
}
void func_809C2D0C(EnAob01* this, PlayState* play) {
u8 sp2F = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 4000, 1);
@@ -819,7 +819,7 @@ void func_809C2D0C(EnAob01* this, PlayState* play) {
}
}
if ((sp2F == 5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->unk_2D2 &= ~0x40;
this->unk_2D2 &= ~0x80;
if (this->unk_434 >= 150) {
+6 -6
View File
@@ -582,9 +582,9 @@ void EnBaba_Idle(EnBaba* this, PlayState* play) {
void EnBaba_FollowSchedule_Talk(EnBaba* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == 5) || (talkState == 6)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = EnBaba_FollowSchedule;
}
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x1000, 0x100);
@@ -593,12 +593,12 @@ void EnBaba_FollowSchedule_Talk(EnBaba* this, PlayState* play) {
void EnBaba_Talk(EnBaba* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (talkState == 5) {
if (talkState == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
if (this->stateFlags & BOMB_SHOP_LADY_STATE_END_CONVERSATION) {
this->stateFlags &= ~BOMB_SHOP_LADY_STATE_END_CONVERSATION;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
if (this->stateFlags & BOMB_SHOP_LADY_STATE_AUTOTALK) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.unk120B1 == 0) {
@@ -617,13 +617,13 @@ void EnBaba_Talk(EnBaba* this, PlayState* play) {
} else if (this->stateFlags & BOMB_SHOP_LADY_STATE_GIVE_BLAST_MASK) {
this->stateFlags &= ~BOMB_SHOP_LADY_STATE_GIVE_BLAST_MASK;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = EnBaba_GiveBlastMask;
} else {
EnBaba_HandleConversation(this, play);
}
}
} else if (talkState == 6) {
} else if (talkState == TEXT_STATE_DONE) {
if (Message_ShouldAdvance(play) && (play->msgCtx.unk120B1 == 0)) {
gSaveContext.save.weekEventReg[81] |= 2;
EnBaba_TriggerTransition(play, 0xD670);
@@ -222,7 +222,7 @@ void func_80BE8AAC(EnBaisen* this, PlayState* play) {
EnBaisen_ChangeAnimation(this, 0);
}
}
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
this->textIdIndex++;
if (this->textIdIndex < 6) {
@@ -185,17 +185,19 @@ void EnBba01_Talk(EnHy* this, PlayState* play) {
u8 talkState;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xFA0, 1);
talkState = Message_GetState(&play->msgCtx);
this->inMsgState3 = (talkState == 3) ? true : false;
this->inMsgState3 = (talkState == TEXT_STATE_3) ? true : false;
switch (talkState) {
case 0:
case TEXT_STATE_NONE:
yaw = ABS_ALT(this->actor.shape.rot.y - this->actor.yawTowardsPlayer);
if (yaw < 0x64) {
Message_StartTextbox(play, this->textId, NULL);
}
break;
case 2:
case TEXT_STATE_CLOSING:
this->actor.textId = 0;
this->trackTarget = this->prevTrackTarget;
this->headRot = this->prevHeadRot;
@@ -99,7 +99,7 @@ void func_809CCEE8(EnBji01* this, PlayState* play) {
}
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
play->msgCtx.msgMode = 0;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_809CD028(this, play);
} else {
if (this->moonsTear != NULL) {
@@ -198,14 +198,14 @@ void func_809CD028(EnBji01* this, PlayState* play) {
void EnBji01_DialogueHandler(EnBji01* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 0:
case TEXT_STATE_NONE:
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x444);
func_809CCDE0(this, play);
if (this->actor.shape.rot.y == this->actor.yawTowardsPlayer) {
Message_StartTextbox(play, this->textId, &this->actor);
}
break;
case 4:
case TEXT_STATE_CHOICE:
if (Message_ShouldAdvance(play)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
this->actor.params = ENBJI01_PARAMS_FINISHED_CONVERSATION;
@@ -233,7 +233,7 @@ void EnBji01_DialogueHandler(EnBji01* this, PlayState* play) {
}
}
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
switch (play->msgCtx.currentTextId) {
@@ -282,7 +282,7 @@ void EnBji01_DialogueHandler(EnBji01* this, PlayState* play) {
}
}
break;
case 6:
case TEXT_STATE_DONE:
this->actor.params = ENBJI01_PARAMS_FINISHED_CONVERSATION;
this->actor.flags &= ~ACTOR_FLAG_10000;
func_809CCE98(this, play);
+3 -3
View File
@@ -243,13 +243,13 @@ s32 EnBjt_ChooseBehaviour(Actor* thisx, PlayState* play) {
switch (this->behaviour) {
case TOILET_HAND_BEHAVIOUR_WAIT_FOR_ITEM:
switch (Message_GetState(&play->msgCtx)) {
case 4:
case 5:
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
if (!Message_ShouldAdvance(play)) {
break;
}
// Fallthrough
case 16:
case TEXT_STATE_16:
itemAP = func_80123810(play);
if ((itemAP == EXCH_ITEM_DEED_LAND) || (itemAP == EXCH_ITEM_LETTER_TO_KAFEI) ||
(itemAP == EXCH_ITEM_DEED_SWAMP) || (itemAP == EXCH_ITEM_DEED_MOUNTAIN) ||
@@ -237,7 +237,7 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
}
}
if ((this->unk_2BC == 0) && (Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((this->unk_2BC == 0) && (Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
Player* player = GET_PLAYER(play);
s32 pad;
s32 sp28 = false;
@@ -273,7 +273,7 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
sp28 = true;
} else {
this->unk_2C0 = 3;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_809C493C(this, 1, 1.0f);
D_809C6100 = 1;
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@@ -301,7 +301,7 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
if (this->unk_2B8 != 2) {
ActorCutscene_Stop(this->unk_2D0);
}
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_809C493C(this, 1, 1.0f);
D_809C6100 = 1;
this->actionFunc = func_809C5B1C;
@@ -330,7 +330,8 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
void func_809C51B4(EnBomBowlMan* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((play->msgCtx.unk120B1 == 0) && ((play->msgCtx.msgMode == 0) || (Message_GetState(&play->msgCtx) == 6))) {
if ((play->msgCtx.unk120B1 == 0) &&
((play->msgCtx.msgMode == 0) || (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE))) {
play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(6);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
@@ -409,7 +410,7 @@ void func_809C5524(EnBomBowlMan* this, PlayState* play) {
}
void func_809C5598(EnBomBowlMan* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
if ((this->actor.textId == 0x72F) || (this->actor.textId == 0x730)) {
this->actor.textId = 0x731;
@@ -447,7 +448,8 @@ void func_809C5738(EnBomBowlMan* this, PlayState* play) {
s16 yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_2A0);
if (this->unk_2C2 == 0) {
if ((play->msgCtx.unk120B1 == 0) && ((play->msgCtx.msgMode == 0) || (Message_GetState(&play->msgCtx) == 6))) {
if ((play->msgCtx.unk120B1 == 0) &&
((play->msgCtx.msgMode == 0) || (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE))) {
this->unk_2C2 = 1;
func_809C4B6C(this);
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@@ -175,7 +175,7 @@ void func_80C038B4(EnBombers* this) {
void func_80C039A8(EnBombers* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->unk_2A6 = 5;
this->unk_2A6 = TEXT_STATE_5;
switch (player->transformation) {
case PLAYER_FORM_HUMAN:
@@ -296,7 +296,7 @@ void func_80C03AF4(EnBombers* this, PlayState* play) {
if (!Text_GetFaceReaction(play, 0x12)) {
func_80C039A8(this, play);
} else {
this->unk_2A6 = 5;
this->unk_2A6 = TEXT_STATE_5;
this->actor.textId = Text_GetFaceReaction(play, 0x12);
}
@@ -337,11 +337,11 @@ void func_80C03FAC(EnBombers* this, PlayState* play) {
if ((this->unk_2A6 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
sp2A = 0;
func_801477B4(play);
this->unk_2A6 = 5;
this->unk_2A6 = TEXT_STATE_5;
if ((this->actor.textId == 0x73D) || (this->actor.textId == 0x73E) || (this->actor.textId == 0x73F)) {
this->actor.textId = 0x740;
this->unk_2A6 = 4;
this->unk_2A6 = TEXT_STATE_CHOICE;
sp2A = 1;
} else if (this->actor.textId == 0x740) {
if (play->msgCtx.choiceIndex == 0) {
@@ -361,7 +361,7 @@ void func_80C03FAC(EnBombers* this, PlayState* play) {
sp2A = 1;
} else if (this->actor.textId == 0x74B) {
this->actor.textId = 0x74C;
this->unk_2A6 = 4;
this->unk_2A6 = TEXT_STATE_CHOICE;
sp2A = 1;
} else if (this->actor.textId == 0x74C) {
if (play->msgCtx.choiceIndex == 1) {
@@ -446,7 +446,7 @@ void func_80C04354(EnBombers* this, PlayState* play) {
void func_80C043C8(EnBombers* this, PlayState* play) {
Math_SmoothStepToS(&this->unk_288, this->unk_28E, 1, 0x3E8, 0);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80C042F8(this);
}
@@ -146,12 +146,12 @@ void func_80C04BA0(EnBombers2* this, PlayState* play) {
case PLAYER_FORM_GORON:
case PLAYER_FORM_ZORA:
this->textIdIndex = 1;
this->unk_2CE = 5;
this->talkState = TEXT_STATE_5;
break;
case PLAYER_FORM_DEKU:
case PLAYER_FORM_HUMAN:
this->textIdIndex = 2;
this->unk_2CE = 5;
this->talkState = TEXT_STATE_5;
break;
}
if (this->unk_2AC != 0) {
@@ -213,8 +213,8 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
default:
break;
}
if ((this->unk_2CE == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
if (this->unk_2CE == 0xF) {
if ((this->talkState == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
if (this->talkState == TEXT_STATE_15) {
s32 i;
s32 correctDigits;
@@ -234,7 +234,7 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
this->actor.textId = sTextIds[this->textIdIndex];
func_80151938(play, this->actor.textId);
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_PIECE_OF_HEART);
this->unk_2CE = 5;
this->talkState = TEXT_STATE_5;
return;
}
}
@@ -258,7 +258,7 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
this->textIdIndex = 3;
this->actor.textId = sTextIds[this->textIdIndex];
func_80151938(play, this->actor.textId);
this->unk_2CE = 0xF;
this->talkState = TEXT_STATE_15;
break;
case 3:
for (j = 0; j < ARRAY_COUNT(this->correctDigitSlots); j++) {
@@ -268,16 +268,16 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_ERROR);
this->actor.textId = sTextIds[this->textIdIndex];
func_80151938(play, this->actor.textId);
this->unk_2CE = 5;
this->talkState = TEXT_STATE_5;
break;
case 4:
this->textIdIndex = 5;
this->actor.textId = sTextIds[this->textIdIndex];
func_80151938(play, this->actor.textId);
this->unk_2CE = 5;
this->talkState = TEXT_STATE_5;
break;
case 6:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80C050B8(this, play);
break;
}
@@ -324,7 +324,7 @@ void func_80C0520C(EnBombers2* this, PlayState* play) {
this->actor.speedXZ = 0.0f;
if (fabsf(this->actor.world.rot.y - this->actor.yawTowardsPlayer) < 100.0f) {
func_801477B4(play);
this->unk_2CE = 5;
this->talkState = TEXT_STATE_5;
this->textIdIndex = 7;
EnBombers2_ChangeAnim(this, 6, 1.0f);
this->unk_2A8 = 0;
@@ -37,7 +37,7 @@ typedef struct EnBombers2 {
/* 0x2C0 */ s16 unk_2C0;
/* 0x2C2 */ s16 textIdIndex;
/* 0x2C4 */ s16 correctDigitSlots[5];
/* 0x2CE */ s16 unk_2CE;
/* 0x2CE */ s16 talkState;
/* 0x2D0 */ ColliderCylinder collider;
} EnBombers2; // size = 0x31C
@@ -581,7 +581,7 @@ void func_80BFF4F4(EnBomjima* this) {
}
void func_80BFF52C(EnBomjima* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
func_801477B4(play);
if (play->msgCtx.choiceIndex == 0) {
Player* player = GET_PLAYER(play);
@@ -624,7 +624,7 @@ void func_80BFF6CC(EnBomjima* this, PlayState* play) {
f32 curFrame = this->skelAnime.curFrame;
if (this->unk_2CC <= curFrame) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80BFE494(this, 1, 1.0f);
this->actionFunc = func_80BFF754;
@@ -729,7 +729,7 @@ void func_80BFF9B0(EnBomjima* this, PlayState* play) {
}
void func_80BFFB40(EnBomjima* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80BFE494(this, 15, 1.0f);
D_80C009F0 = 100;
@@ -916,7 +916,7 @@ void func_80C00284(EnBomjima* this, PlayState* play) {
break;
}
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
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))) {
@@ -214,7 +214,7 @@ s32 func_80C012FC(EnBomjimb* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!Play_InCsMode(play) && (this->actor.xzDistToPlayer < 40.0f) &&
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 50.0f) && (play->msgCtx.unk11F10 == 0)) {
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 50.0f) && (play->msgCtx.msgLength == 0)) {
this->actor.speedXZ = 0.0f;
func_80C02740(this, play);
return true;
@@ -759,7 +759,7 @@ void func_80C02A14(EnBomjimb* this, PlayState* play) {
player->actor.freezeTimer = 3;
}
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
if ((this->unk_2CA == 8) && (gSaveContext.save.bombersCaughtNum >= 5)) {
func_80C02CA4(this, play);
@@ -778,7 +778,7 @@ void func_80C02BCC(EnBomjimb* this, PlayState* play) {
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(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
this->unk_2C0 = 1;
player->stateFlags1 &= ~0x10000000;
@@ -579,7 +579,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
}
player->actor.speedXZ = 0.0f;
if (Message_GetState(&play->msgCtx) == 0) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
mainCam->eye = this->subCamEye;
mainCam->eyeNext = this->subCamEye;
@@ -175,17 +175,19 @@ void EnCne01_Talk(EnHy* this, PlayState* play) {
u8 talkState;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xFA0, 1);
talkState = Message_GetState(&play->msgCtx);
this->inMsgState3 = (talkState == 3) ? true : false;
this->inMsgState3 = (talkState == TEXT_STATE_3) ? true : false;
switch (talkState) {
case 0:
case TEXT_STATE_NONE:
yaw = ABS_ALT(this->actor.shape.rot.y - this->actor.yawTowardsPlayer);
if (yaw < 0x64) {
Message_StartTextbox(play, this->textId, NULL);
}
break;
case 2:
case TEXT_STATE_CLOSING:
this->actor.textId = 0;
this->trackTarget = this->prevTrackTarget;
this->headRot = this->prevHeadRot;
@@ -138,7 +138,7 @@ void func_80AFDE00(EnColMan* this, PlayState* play) {
}
void EnColMan_SetHeartPieceCollectedAndKill(EnColMan* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 6 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
gSaveContext.save.weekEventReg[56] |= 2;
Actor_MarkForDeath(&this->actor);
}
+3 -3
View File
@@ -200,7 +200,7 @@ void EnCow_UpdateAnimation(EnCow* this, PlayState* play) {
}
void EnCow_TalkEnd(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
func_801477B4(play);
this->actionFunc = EnCow_Idle;
@@ -224,7 +224,7 @@ void EnCow_GiveMilkWait(EnCow* this, PlayState* play) {
}
void EnCow_GiveMilk(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
func_801477B4(play);
this->actionFunc = EnCow_GiveMilkWait;
@@ -233,7 +233,7 @@ void EnCow_GiveMilk(EnCow* this, PlayState* play) {
}
void EnCow_CheckForEmptyBottle(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (Inventory_HasEmptyBottle()) {
func_80151938(play, 0x32C9); // Text to give milk.
this->actionFunc = EnCow_GiveMilk;
@@ -244,7 +244,7 @@ void func_80943BDC(EnDaiku* this, PlayState* play) {
}
}
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80943820(this);
}
@@ -294,7 +294,7 @@ void func_80BE6B40(EnDaiku2* this, PlayState* play) {
void func_80BE6BC0(EnDaiku2* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0x0);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
s32 day = gSaveContext.save.day - 1;
func_801477B4(play);
@@ -143,7 +143,7 @@ void EnDemoheishi_SetupTalk(EnDemoheishi* this) {
}
void EnDemoheishi_Talk(EnDemoheishi* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
EnDemoheishi_SetupIdle(this);
}
+1 -1
View File
@@ -1291,7 +1291,7 @@ void EnDg_SetupTalk(EnDg* this, PlayState* play) {
}
void EnDg_Talk(EnDg* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 2) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK_AFTER_TALKING);
this->actionFunc = EnDg_Held;
}
+13 -13
View File
@@ -322,7 +322,7 @@ void func_80A71C3C(EnDno* this, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
play->msgCtx.msgMode = 0;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80A71E54(this, play);
} else if (this->actor.xzDistToPlayer < 60.0f) {
func_800B8614(&this->actor, play, 60.0f);
@@ -356,7 +356,7 @@ void func_80A71E54(EnDno* this, PlayState* play) {
void func_80A71F18(EnDno* this, PlayState* play) {
Math_ScaledStepToS(&this->unk_466, 0, 0x16C);
switch (Message_GetState(&play->msgCtx)) {
case 0:
case TEXT_STATE_NONE:
if (!(this->unk_3B0 & 0x10) ||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xE38)) {
switch (this->textId) {
@@ -380,7 +380,7 @@ void func_80A71F18(EnDno* this, PlayState* play) {
}
break;
case 3:
case TEXT_STATE_3:
if (play->msgCtx.currentTextId == 0x80B) {
switch (this->unk_32C) {
case 16:
@@ -402,9 +402,9 @@ void func_80A71F18(EnDno* this, PlayState* play) {
}
break;
case 4:
case 5:
case 6:
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_DONE:
switch (play->msgCtx.currentTextId) {
case 0x80B:
switch (this->unk_32C) {
@@ -537,7 +537,7 @@ void func_80A725F8(EnDno* this, PlayState* play) {
func_80A71424(&this->unk_466, 0, 0, 0, 0x2000, 0x16C);
switch (Message_GetState(&play->msgCtx)) {
case 0:
case TEXT_STATE_NONE:
switch (this->unk_328) {
case 0:
if (this->unk_32C == 14) {
@@ -569,9 +569,9 @@ void func_80A725F8(EnDno* this, PlayState* play) {
}
break;
case 1:
case 2:
case 3:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
if (((play->msgCtx.currentTextId == 0x800) || (play->msgCtx.currentTextId == 0x801)) &&
(this->unk_32C == 8)) {
Math_SmoothStepToF(&this->unk_454, 1.0f, 1.0f, 0.1f, 0.01f);
@@ -593,9 +593,9 @@ void func_80A725F8(EnDno* this, PlayState* play) {
}
break;
case 4:
case 5:
case 6:
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_DONE:
switch (play->msgCtx.currentTextId) {
case 0x800:
case 0x801:
+1 -1
View File
@@ -296,7 +296,7 @@ void func_80B3D2D4(EnDnp* this, PlayState* play) {
void func_80B3D338(EnDnp* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((this->unk_32E != 0) && (Message_GetState(&play->msgCtx) == 2)) {
if ((this->unk_32E != 0) && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
Actor_MarkForDeath(&this->actor);
} else if (this->unk_32E == 0) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
+1 -1
View File
@@ -343,7 +343,7 @@ void func_80A52DC8(EnDnq* this, PlayState* play) {
if (!(gSaveContext.save.weekEventReg[23] & 0x20)) {
this->unk_390 = 70.0f;
if (Inventory_HasItemInBottle(ITEM_DEKU_PRINCESS) && !Play_InCsMode(play) &&
(Message_GetState(&play->msgCtx) == 0) && (ActorCutscene_GetCurrentIndex() == -1)) {
(Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) && (ActorCutscene_GetCurrentIndex() == -1)) {
if ((DECR(this->unk_384) == 0) && (gSaveContext.save.weekEventReg[29] & 0x40)) {
Message_StartTextbox(play, 0x969, NULL);
this->unk_384 = 200;
+4 -4
View File
@@ -1359,7 +1359,7 @@ void func_8088FE64(Actor* thisx, PlayState* play2) {
func_8088FA38(this, play);
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
if (Message_ShouldAdvance(play)) {
if (play->msgCtx.currentTextId == 0x202) {
switch (play->msgCtx.choiceIndex) {
@@ -1385,10 +1385,10 @@ void func_8088FE64(Actor* thisx, PlayState* play2) {
}
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 576:
case 0x240:
func_80151938(play, 0x245);
break;
@@ -1434,7 +1434,7 @@ void func_8088FE64(Actor* thisx, PlayState* play2) {
}
break;
case 2:
case TEXT_STATE_CLOSING:
func_8088FDCC(this);
break;
}
@@ -435,7 +435,7 @@ void func_80B29128(EnFish2* this) {
}
void func_80B2913C(EnFish2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80B28B5C(this);
}
@@ -1127,8 +1127,8 @@ void EnFishing_UpdateEffects(FishingEffect* effect, PlayState* play) {
Message_StartTextbox(play, 0x40B3, NULL);
}
if ((effect->unk_2C >= 100) && (Message_GetState(&play->msgCtx) == 5)) {
if (Message_ShouldAdvance(play) || Message_GetState(&play->msgCtx) == 0) {
if ((effect->unk_2C >= 100) && (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
if (Message_ShouldAdvance(play) || (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
func_801477B4(play);
Rupees_ChangeBy(-50);
effect->unk_2C = -1;
@@ -3055,7 +3055,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
this->unk_172[1] = 50;
}
if (Message_GetState(&play->msgCtx) == 0) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if ((gSaveContext.save.time >= CLOCK_TIME(18, 0)) && (gSaveContext.save.time <= 0xC01B)) {
this->unk_150 = 7;
this->unk_172[3] = Rand_ZeroFloat(150.0f) + 200.0f;
@@ -3855,7 +3855,8 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
if (this->unk_172[0] <= 50) {
switch (this->unk_1CD) {
case 0:
if ((Message_GetState(&play->msgCtx) == 4) || Message_GetState(&play->msgCtx) == 0) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) ||
Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (Message_ShouldAdvance(play)) {
func_801477B4(play);
if (play->msgCtx.choiceIndex == 0) {
@@ -3886,7 +3887,8 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
}
break;
case 1:
if ((Message_GetState(&play->msgCtx) == 4) || Message_GetState(&play->msgCtx) == 0) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) ||
Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (Message_ShouldAdvance(play)) {
func_801477B4(play);
if (play->msgCtx.choiceIndex != 0) {
@@ -4707,7 +4709,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 1:
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
func_801477B4(play);
switch (play->msgCtx.choiceIndex) {
@@ -4735,7 +4737,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 2:
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80151938(play, 0x407F);
this->unk_154 = 4;
@@ -4743,17 +4745,17 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 3:
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
this->unk_154 = 0;
}
if (Message_GetState(&play->msgCtx) == 6) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) {
this->unk_154 = 0;
}
break;
case 4:
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
func_801477B4(play);
switch (play->msgCtx.choiceIndex) {
@@ -4770,7 +4772,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 5:
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
play->interfaceCtx.unk_27E = 1;
@@ -4787,7 +4789,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
case 10:
if (D_8090CD0C != 0) {
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
func_801477B4(play);
switch (play->msgCtx.choiceIndex) {
@@ -4803,7 +4805,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
}
}
} else {
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
func_801477B4(play);
switch (play->msgCtx.choiceIndex) {
@@ -4875,7 +4877,8 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 11:
if (((Message_GetState(&play->msgCtx) == 5) || Message_GetState(&play->msgCtx) == 0) &&
if (((Message_GetState(&play->msgCtx) == TEXT_STATE_5) ||
Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) &&
Message_ShouldAdvance(play)) {
s32 getItemId;
@@ -4951,14 +4954,14 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 20:
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
this->unk_154 = 0;
}
break;
case 21:
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
func_801477B4(play);
switch (play->msgCtx.choiceIndex) {
@@ -4978,7 +4981,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 22:
if (Message_GetState(&play->msgCtx) == 0) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
this->unk_154 = 0;
if (D_8090CD0C != 0) {
D_8090CD08 = 1;
@@ -5000,7 +5003,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
case 24:
D_8090CCF4 = false;
if ((Message_GetState(&play->msgCtx) == 6) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
if (D_809171D0 == 0) {
this->unk_154 = 0;
} else {
@@ -5050,13 +5053,13 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
SkelAnime_Update(&this->skelAnime);
if ((D_8090CD04 != 0) || Message_GetState(&play->msgCtx)) {
if ((D_8090CD04 != 0) || Message_GetState(&play->msgCtx) != TEXT_STATE_NONE) {
this->actor.flags &= ~ACTOR_FLAG_1;
} else {
this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_20);
}
if ((this->actor.xzDistToPlayer < 120.0f) || Message_GetState(&play->msgCtx)) {
if ((this->actor.xzDistToPlayer < 120.0f) || Message_GetState(&play->msgCtx) != TEXT_STATE_NONE) {
headRotTarget = this->actor.shape.rot.y - this->actor.yawTowardsPlayer;
} else {
headRotTarget = 0;
@@ -5300,7 +5303,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
player->actor.world.pos.z = 1360.0f;
player->actor.speedXZ = 0.0f;
if (Message_GetState(&play->msgCtx) == 0) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
mainCam->eye = sSubCamEye;
@@ -5394,7 +5397,8 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
}
if (D_8090CD50 == 0) {
if ((Message_GetState(&play->msgCtx) == 4) || Message_GetState(&play->msgCtx) == 0) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) ||
Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (Message_ShouldAdvance(play)) {
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
@@ -5485,7 +5489,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
D_809171CB--;
}
if ((D_809171CB == 1) && Message_GetState(&play->msgCtx) == 0 && ((D_8090CD00 & 0xFFF) == 0xFFF)) {
if ((D_809171CB == 1) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) && ((D_8090CD00 & 0xFFF) == 0xFFF)) {
D_809171CB = 200;
if (Rand_ZeroOne() < 0.5f) {
+26 -26
View File
@@ -209,7 +209,7 @@ void EnFsn_HandleConversationBackroom(EnFsn* this, PlayState* play) {
}
void EnFsn_HandleSetupResumeInteraction(EnFsn* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 6 && Message_ShouldAdvance(play) &&
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) &&
this->cutsceneState == ENFSN_CUTSCENESTATE_STOPPED) {
Actor_ProcessTalkRequest(&this->actor, &play->state);
func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1);
@@ -392,7 +392,7 @@ void EnFsn_EndInteraction(EnFsn* this, PlayState* play) {
}
Actor_ProcessTalkRequest(&this->actor, &play->state);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
this->stickLeftPrompt.isEnabled = false;
@@ -822,7 +822,7 @@ void EnFsn_StartBuying(EnFsn* this, PlayState* play) {
Player* player = GET_PLAYER(play);
EnFsn_HandleLookToShopkeeperBuyingCutscene(this);
if (talkState == 5 && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
switch (this->actor.textId) {
case 0x29CC:
this->actor.textId = 0x29CD;
@@ -849,7 +849,7 @@ void EnFsn_StartBuying(EnFsn* this, PlayState* play) {
void EnFsn_AskBuyOrSell(EnFsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (talkState == 5) {
if (talkState == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
switch (this->actor.textId) {
case 0x29CC:
@@ -880,7 +880,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, PlayState* play) {
break;
}
}
} else if (talkState == 4) {
} else if (talkState == TEXT_STATE_CHOICE) {
func_8011552C(play, 6);
if (!EnFsn_TestEndInteraction(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
@@ -919,7 +919,7 @@ void EnFsn_DeterminePrice(EnFsn* this, PlayState* play) {
s32 itemActionParam;
u8 buttonItem;
if (Message_GetState(&play->msgCtx) == 16) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_16) {
itemActionParam = func_80123810(play);
if (itemActionParam > PLAYER_AP_NONE) {
if (player->heldItemButton == 0) {
@@ -955,12 +955,12 @@ void EnFsn_MakeOffer(EnFsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
Player* player = GET_PLAYER(play);
if (talkState == 4 && Message_ShouldAdvance(play)) {
if (talkState == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
func_8019F208();
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
if (this->cutsceneState == ENFSN_CUTSCENESTATE_PLAYING) {
ActorCutscene_Stop(this->cutscene);
this->cutsceneState = ENFSN_CUTSCENESTATE_STOPPED;
@@ -1106,7 +1106,7 @@ void EnFsn_BrowseShelf(EnFsn* this, PlayState* play) {
this->drawCursor = 0xFF;
this->stickLeftPrompt.isEnabled = true;
EnFsn_UpdateCursorPos(this, play);
if (talkstate == 5) {
if (talkstate == TEXT_STATE_5) {
func_8011552C(play, 6);
if (!EnFsn_HasPlayerSelectedItem(this, play, CONTROLLER1(&play->state))) {
EnFsn_CursorLeftRight(this);
@@ -1160,7 +1160,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) {
item->buyFanfareFunc(play, item);
Actor_PickUp(&this->actor, play, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
this->shopItemSelectedTween = 0.0f;
@@ -1191,13 +1191,13 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) {
void EnFsn_SetupEndInteraction(EnFsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if ((talkState == 5 || talkState == 6) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, play);
} else {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
}
} else {
EnFsn_EndInteraction(this, play);
@@ -1208,7 +1208,7 @@ void EnFsn_SetupEndInteraction(EnFsn* this, PlayState* play) {
void EnFsn_SelectItem(EnFsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (EnFsn_TakeItemOffShelf(this) && talkState == 4) {
if (EnFsn_TakeItemOffShelf(this) && (talkState == TEXT_STATE_CHOICE)) {
func_8011552C(play, 6);
if (!EnFsn_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
@@ -1225,7 +1225,7 @@ void EnFsn_SelectItem(EnFsn* this, PlayState* play) {
}
void EnFsn_PlayerCannotBuy(EnFsn* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 5 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->actionFunc = this->prevActionFunc;
func_80151938(play, this->items[this->cursorIdx]->actor.textId);
}
@@ -1246,7 +1246,7 @@ void EnFsn_AskCanBuyMore(EnFsn* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(this->cutscene);
}
}
if (talkState == 4) {
if (talkState == TEXT_STATE_CHOICE) {
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -1263,13 +1263,13 @@ void EnFsn_AskCanBuyMore(EnFsn* this, PlayState* play) {
break;
}
}
} else if ((talkState == 5 || talkState == 6) && Message_ShouldAdvance(play)) {
} else if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, play);
} else {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
}
} else {
EnFsn_EndInteraction(this, play);
@@ -1292,7 +1292,7 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(this->cutscene);
}
}
if (talkState == 4) {
if (talkState == TEXT_STATE_CHOICE) {
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -1310,13 +1310,13 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, PlayState* play) {
break;
}
}
} else if ((talkState == 5 || talkState == 6) && Message_ShouldAdvance(play)) {
} else if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, play);
} else {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
}
} else {
EnFsn_EndInteraction(this, play);
@@ -1328,7 +1328,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
u8 cursorIdx;
if (talkState == 4) {
if (talkState == TEXT_STATE_CHOICE) {
func_8011552C(play, 6);
if (!EnFsn_TestEndInteraction(this, play, CONTROLLER1(&play->state)) &&
(!Message_ShouldAdvance(play) || !EnFsn_FacingShopkeeperDialogResult(this, play)) &&
@@ -1342,7 +1342,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
play_sound(NA_SE_SY_CURSOR);
}
}
} else if (talkState == 5 && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->actor.textId = 0x29D6;
Message_StartTextbox(play, this->actor.textId, &this->actor);
if (play) {}
@@ -1350,7 +1350,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
}
void EnFsn_SetupEndInteractionImmediately(EnFsn* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 5 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
EnFsn_EndInteraction(this, play);
}
}
@@ -1366,16 +1366,16 @@ void EnFsn_IdleBackroom(EnFsn* this, PlayState* play) {
}
void EnFsn_ConverseBackroom(EnFsn* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 5 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->flags & ENFSN_END_CONVERSATION) {
this->flags &= ~ENFSN_END_CONVERSATION;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = EnFsn_IdleBackroom;
} else if (this->flags & ENFSN_GIVE_ITEM) {
this->flags &= ~ENFSN_GIVE_ITEM;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = EnFsn_GiveItem;
} else {
EnFsn_HandleConversationBackroom(this, play);
+13 -12
View File
@@ -577,24 +577,24 @@ void func_809628BC(EnFu* this) {
}
void func_809628D0(EnFu* this, PlayState* play) {
u8 sp27 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
switch (sp27) {
case 0:
case 1:
case 2:
case 3:
switch (talkState) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
case 4:
case TEXT_STATE_CHOICE:
func_80962588(this, play);
break;
case 5:
case TEXT_STATE_5:
func_80962660(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
this->unk_54A = 1;
switch (this->unk_552) {
@@ -617,7 +617,7 @@ void func_809628D0(EnFu* this, PlayState* play) {
break;
}
if (sp27 != 3) {
if (talkState != TEXT_STATE_3) {
func_80964190(this, play);
func_8096426C(this, play);
}
@@ -840,8 +840,9 @@ void func_80963350(EnFu* this, PlayState* play) {
static s32 D_80964C24 = 0;
BgFuKaiten* fuKaiten = (BgFuKaiten*)this->actor.child;
if ((this->unk_54A == 0) && (((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) ||
((Message_GetState(&play->msgCtx) == 2) && (play->msgCtx.unk12023 == 1)))) {
if ((this->unk_54A == 0) &&
(((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) ||
((Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) && (play->msgCtx.stateTimer == 1)))) {
func_801477B4(play);
this->unk_54A = 2;
D_80964C24 = 1;
+14 -14
View File
@@ -386,13 +386,13 @@ void func_80B0FEBC(EnGb2* this, PlayState* play) {
}
void func_80B0FFA8(EnGb2* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (temp_v0 == 5) {
if (talkState == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_26E = 0x14D1;
this->unk_288 = 30;
gSaveContext.eventInf[4] &= (u8)~0x80;
@@ -403,7 +403,7 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) {
Message_StartTextbox(play, this->unk_26E, &this->actor);
}
}
} else if ((temp_v0 == 4) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
if (this->unk_26E == 0x14D5) {
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -432,7 +432,7 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) {
func_8019F208();
Rupees_ChangeBy(-this->unk_288);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
func_800B7298(play, NULL, 7);
this->actionFunc = func_80B11344;
break;
@@ -548,13 +548,13 @@ void func_80B10584(EnGb2* this, PlayState* play) {
}
void func_80B10634(EnGb2* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (temp_v0 == 5) {
if (talkState == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_26C &= ~2;
if (this->unk_26E == 0x14DD) {
this->unk_26E = 0x14DE;
@@ -572,7 +572,7 @@ void func_80B10634(EnGb2* this, PlayState* play) {
Message_StartTextbox(play, this->unk_26E, &this->actor);
}
}
} else if ((temp_v0 == 4) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
if (gSaveContext.save.playerData.rupees < this->unk_288) {
@@ -584,7 +584,7 @@ void func_80B10634(EnGb2* this, PlayState* play) {
func_8019F208();
Rupees_ChangeBy(-this->unk_288);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
func_800B7298(play, NULL, 7);
this->actionFunc = func_80B11344;
}
@@ -746,11 +746,11 @@ void func_80B10DAC(EnGb2* this, PlayState* play) {
}
void func_80B10E98(EnGb2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
this->unk_26C &= ~2;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
if ((this->unk_26E != 0x14E8) && (this->unk_26E != 0x14EA)) {
ActorCutscene_Stop(this->unk_282[this->unk_290]);
this->actionFunc = func_80B10B5C;
@@ -790,10 +790,10 @@ void func_80B11048(EnGb2* this, PlayState* play) {
}
void func_80B110F8(EnGb2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_26C &= ~2;
this->actionFunc = func_80B10A48;
} else {
+12 -12
View File
@@ -543,7 +543,7 @@ void func_80BB2520(EnGeg* this, PlayState* play) {
}
void func_80BB26EC(EnGeg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
switch (this->unk_496) {
case 0xD5E:
this->unk_49A = this->unk_49C[1];
@@ -553,7 +553,7 @@ void func_80BB26EC(EnGeg* this, PlayState* play) {
case 0xD61:
ActorCutscene_Stop(this->unk_498);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_230 &= ~0x10;
this->actionFunc = func_80BB221C;
return;
@@ -565,18 +565,18 @@ void func_80BB26EC(EnGeg* this, PlayState* play) {
}
void func_80BB27D4(EnGeg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
switch (this->unk_496) {
case 0xD63:
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80BB221C;
break;
case 0xD69:
this->unk_49A = this->unk_49C[6];
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80BB2520;
break;
@@ -584,7 +584,7 @@ void func_80BB27D4(EnGeg* this, PlayState* play) {
case 0xD6F:
case 0xD8A:
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80BB31B8;
break;
@@ -592,7 +592,7 @@ void func_80BB27D4(EnGeg* this, PlayState* play) {
case 0xD75:
case 0xD8B:
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_230 &= ~0x10;
this->unk_49A = this->unk_49C[7];
this->actionFunc = func_80BB2520;
@@ -607,7 +607,7 @@ void func_80BB27D4(EnGeg* this, PlayState* play) {
}
void func_80BB2944(EnGeg* this, PlayState* play) {
u8 sp27 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
s16 curFrame = this->skelAnime.curFrame;
s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_4AC].animation);
@@ -616,10 +616,10 @@ void func_80BB2944(EnGeg* this, PlayState* play) {
this->unk_4AC = 6;
func_80BB2020(this, play);
}
} else if ((sp27 == 5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_496 == 0xD67) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_49A = this->unk_49C[4];
this->actionFunc = func_80BB2520;
} else {
@@ -630,13 +630,13 @@ void func_80BB2944(EnGeg* this, PlayState* play) {
}
void func_80BB2A54(EnGeg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_496 == 0xD65) {
ActorCutscene_Stop(this->unk_498);
this->unk_230 &= ~0x10;
this->unk_244 = 65;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80BB347C;
} else {
this->unk_496 = func_80BB16D0(this);
+2 -2
View File
@@ -247,10 +247,10 @@ void func_80B35450(EnGg* this, PlayState* play) {
}
void func_80B3556C(EnGg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_2E6 == 4) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_308 = 0;
this->actor.flags &= ~ACTOR_FLAG_80;
func_80B35250(this);
+2 -2
View File
@@ -172,9 +172,9 @@ void func_80B3B05C(EnGg2* this, PlayState* play) {
}
void func_80B3B0A0(EnGg2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_2F0 = 0;
this->actionFunc = func_80B3B5D4;
}
@@ -472,25 +472,30 @@ void EnGinkoMan_SetupDialogue(EnGinkoMan* this) {
void EnGinkoMan_Dialogue(EnGinkoMan* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 2:
case TEXT_STATE_CLOSING:
EnGinkoMan_SetupIdle(this);
break;
case 4:
case TEXT_STATE_CHOICE:
EnGinkoMan_WaitForDialogueInput(this, play);
break;
case 5:
case TEXT_STATE_5:
EnGinkoMan_DepositDialogue(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
this->isStampChecked = false;
EnGinkoMan_SetupIdle(this);
}
break;
case 14:
case TEXT_STATE_14:
EnGinkoMan_WaitForRupeeCount(this, play);
break;
case 0:
case TEXT_STATE_NONE:
default:
break;
}
@@ -547,7 +552,7 @@ void EnGinkoMan_BankAward2(EnGinkoMan* this, PlayState* play) {
EnGinkoMan_SetupDialogue(this);
} else if (this->curTextId == 0x45D) { // saved up 5000 rupees for HP
if ((Message_GetState(&play->msgCtx) == 6) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
if (!(gSaveContext.save.weekEventReg[59] & 8)) {
gSaveContext.save.weekEventReg[59] |= 8;
}
+8 -11
View File
@@ -456,9 +456,6 @@ s32 func_80B5100C(EnGk* this, PlayState* play) {
}
s32 func_80B5123C(EnGk* this, PlayState* play) {
s16 temp_v0;
s16 phi_v1;
if (DECR(this->unk_34E) != 0) {
this->unk_31E = 0;
this->unk_320 = 0;
@@ -660,9 +657,9 @@ void func_80B51760(EnGk* this, PlayState* play) {
}
void func_80B51970(EnGk* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (((temp_v0 == 6) || (temp_v0 == 5)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_DONE) || (talkState == TEXT_STATE_5)) && Message_ShouldAdvance(play)) {
if ((this->unk_31C == 0xE84) || (this->unk_31C == 0xE99)) {
ActorCutscene_Stop(this->unk_318);
this->unk_318 = ActorCutscene_GetAdditionalCutscene(this->unk_318);
@@ -710,9 +707,9 @@ void func_80B51970(EnGk* this, PlayState* play) {
}
void func_80B51B40(EnGk* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (temp_v0 == 6) {
if (talkState == TEXT_STATE_DONE) {
if (Message_ShouldAdvance(play)) {
if (this->unk_1E4 & 1) {
this->unk_1E4 &= ~1;
@@ -741,7 +738,7 @@ void func_80B51B40(EnGk* this, PlayState* play) {
this->unk_1E4 |= 2;
}
}
} else if ((temp_v0 == 4) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
func_8019F208();
@@ -873,9 +870,9 @@ void func_80B5202C(EnGk* this, PlayState* play) {
}
void func_80B5216C(EnGk* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80B51698;
}
}
@@ -928,7 +925,7 @@ void func_80B52340(EnGk* this, PlayState* play) {
}
void func_80B52430(EnGk* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 6) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
switch (this->unk_31C) {
case 0xE93:
this->unk_31C = 0xE89;
+6 -5
View File
@@ -857,11 +857,11 @@ void func_8094F2E8(EnGm* this) {
void func_8094F3D0(EnGm* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 sp28 = Message_GetState(&play->msgCtx);
s32 var = play->msgCtx.currentTextId;
s32 talkState = Message_GetState(&play->msgCtx);
s32 textId = play->msgCtx.currentTextId;
if ((&this->actor == player->targetActor) && ((var < 0xFF) || (var > 0x200)) && (sp28 == 3) &&
(this->unk_3F0 == 3)) {
if ((&this->actor == player->targetActor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3)) {
if ((play->state.frames % 3) == 0) {
if (this->unk_3AC == 120.0f) {
this->unk_3AC = 0.0f;
@@ -872,9 +872,10 @@ void func_8094F3D0(EnGm* this, PlayState* play) {
} else {
this->unk_3AC = 0.0f;
}
Math_SmoothStepToF(&this->unk_3B0, this->unk_3AC, 0.8f, 40.0f, 10.0f);
Matrix_Translate(this->unk_3B0, 0.0f, 0.0f, MTXMODE_APPLY);
this->unk_3F0 = sp28;
this->prevTalkState = talkState;
}
s32 func_8094F4EC(EnGm* this, PlayState* play) {
+2 -2
View File
@@ -33,7 +33,7 @@ typedef struct EnGm {
/* 0x262 */ s8 unk_262;
/* 0x264 */ s32* unk_264;
/* 0x268 */ Actor* unk_268;
/* 0x26C */ UNK_TYPE1 unk26C[0xC];
/* 0x26C */ UNK_TYPE1 unk_26C[0xC];
/* 0x278 */ Vec3f unk_278;
/* 0x284 */ Vec3f unk_284;
/* 0x290 */ Vec3f unk_290;
@@ -69,7 +69,7 @@ typedef struct EnGm {
/* 0x3E4 */ EnGmUnkFunc unk_3E4;
/* 0x3E8 */ s32 unk_3E8;
/* 0x3EC */ UNK_TYPE1 unk3EC[0x4];
/* 0x3F0 */ s32 unk_3F0;
/* 0x3F0 */ s32 prevTalkState;
/* 0x3F4 */ s32 unk_3F4;
/* 0x3F8 */ s32 unk_3F8;
/* 0x3FC */ s32 unk_3FC;
+11 -10
View File
@@ -181,7 +181,7 @@ void func_80997D14(EnGs* this, PlayState* play) {
void func_80997D38(EnGs* this, PlayState* play) {
static f32 D_8099A408[] = { 40.0f, 60.0f, 40.0f, 40.0f };
if (Message_GetState(&play->msgCtx) == 0) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (this->actor.xzDistToPlayer <= D_8099A408[this->actor.params]) {
func_8013E8F8(&this->actor, play, D_8099A408[this->actor.params], D_8099A408[this->actor.params],
EXCH_ITEM_NONE, 0x2000, 0x2000);
@@ -205,18 +205,18 @@ void func_80997DEC(EnGs* this, PlayState* play) {
void func_80997E4C(EnGs* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 0:
case TEXT_STATE_NONE:
Message_StartTextbox(play, this->unk_210, &this->actor);
break;
case 1:
case 2:
case 3:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
case 4:
case 5:
case 6:
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x20D0:
@@ -533,7 +533,8 @@ s32 func_80998A48(EnGs* this, PlayState* play) {
} else if (this->unk_19D == 1) {
if (func_80998334(this, play, &this->unk_1DC, &this->unk_1E0, &this->unk_1D4, 0.8f, 0.007f, 0.001f, 7, 0) ==
0.0f) {
if ((this->actor.params != ENGS_0) && !Play_InCsMode(play) && (Message_GetState(&play->msgCtx) == 0)) {
if ((this->actor.params != ENGS_0) && !Play_InCsMode(play) &&
(Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
this->unk_216 = 0;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FAIVE_LUPY_COUNT);
Message_StartTextbox(play, 0x20D2, NULL);
@@ -1005,7 +1006,7 @@ void EnGs_Update(Actor* thisx, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
play->msgCtx.msgMode = 0;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
this->collider.base.acFlags &= ~AC_HIT;
func_80997DEC(this, play);
} else if (func_800B8718(&this->actor, &play->state)) {
@@ -223,7 +223,7 @@ void func_80ABB590(EnGuardNuts* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.shape.rot.y, yaw, 1, 0xBB8, 0);
}
if (Message_GetState(&play->msgCtx) == 5) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
this->targetHeadPos.y = 0;
this->targetHeadPos.x = 0;
if ((this->guardTextIndex == 3) && (this->animIndex == WAIT_HEAD_TILT_ANIM)) {
@@ -255,7 +255,7 @@ void func_80ABB590(EnGuardNuts* this, PlayState* play) {
EnGuardNuts_SetupWait(this);
}
}
} else if ((Message_GetState(&play->msgCtx) >= 3) && (D_80ABBE20 == 0)) {
} else if ((Message_GetState(&play->msgCtx) >= TEXT_STATE_3) && (D_80ABBE20 == 0)) {
if ((this->guardTextIndex == 0) || (this->guardTextIndex == 3) || (this->guardTextIndex >= 7)) {
if (this->timer == 0) {
this->timer = 2;
@@ -191,7 +191,7 @@ void func_80BC7068(EnGuruguru* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
} else if (this->unusedTimer == 0) {
this->unusedTimer = 6;
if (Message_GetState(&play->msgCtx) != 5) {
if (Message_GetState(&play->msgCtx) != TEXT_STATE_5) {
if (this->unk266 == 0) {
if (this->headZRotTarget != 0) {
this->headZRotTarget = 0;
@@ -207,7 +207,7 @@ void func_80BC7068(EnGuruguru* this, PlayState* play) {
}
}
}
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
this->headZRotTarget = 0;
if ((this->textIdIndex == 13) || (this->textIdIndex == 14)) {
+2 -2
View File
@@ -176,7 +176,7 @@ void func_80BCF4AC(EnHg* this, PlayState* play) {
s32 pad;
this->actor.speedXZ = 1.6f;
if (!(player->stateFlags2 & 0x08000000) && Message_GetState(&play->msgCtx) == 0) {
if (!(player->stateFlags2 & 0x08000000) && Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (((this->skelAnime.curFrame > 9.0f) && (this->skelAnime.curFrame < 16.0f)) ||
((this->skelAnime.curFrame > 44.0f) && (this->skelAnime.curFrame < 51.0f))) {
Actor_MoveWithGravity(&this->actor);
@@ -215,7 +215,7 @@ void func_80BCF6D0(EnHg* this, PlayState* play) {
}
void func_80BCF710(EnHg* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 0) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
Message_StartTextbox(play, 0x24F, &this->actor);
} else {
+11 -7
View File
@@ -175,20 +175,24 @@ void EnHgo_SetupDialogueHandler(EnHgo* this) {
void EnHgo_DefaultDialogueHandler(EnHgo* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 0:
case 1:
case 2:
case 3:
case 4:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_CHOICE:
break;
case 5:
case TEXT_STATE_5:
func_80BD06FC(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
func_80BD049C(this);
}
break;
}
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0xA, 0x71C, 0xB6);
this->actor.shape.rot.y = this->actor.world.rot.y;
}
@@ -223,7 +223,7 @@ void func_80BDB59C(EnHiddenNuts* this, PlayState* play) {
this->unk_218 = 30;
}
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80BDB268(this);
}
@@ -425,29 +425,29 @@ void func_80C208D0(EnHintSkb* this, PlayState* play) {
this->unk_3DE = 0;
switch (Message_GetState(&play->msgCtx)) {
case 3:
case TEXT_STATE_3:
if ((play->gameplayFrames % 2) != 0) {
this->unk_3DE = 1;
}
break;
case 4:
case TEXT_STATE_CHOICE:
func_80C20B88(this, play);
break;
case 5:
case TEXT_STATE_5:
func_80C20C24(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
func_80C2075C(this);
}
break;
case 0:
case 1:
case 2:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
break;
}
+2 -2
View File
@@ -174,7 +174,7 @@ void func_80953098(EnHs* this, PlayState* play) {
}
void func_80953180(EnHs* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x33F4: // text: laughing that they are all roosters (!)
case 0x33F6: // text: Grog regrets not being able to see his chicks reach adult hood
@@ -196,7 +196,7 @@ void func_80953180(EnHs* this, PlayState* play) {
break;
case 0x33F5: // He heard from his gramps (?) the moon is going to fall
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
this->actionFunc = func_80952FE0;
this->stateTimer = 0;
this->headRot.z = 0;
+8 -9
View File
@@ -1181,12 +1181,12 @@ s32 func_808F5674(PlayState* play, EnIn* this, s32 arg2) {
s32 ret = false;
switch (Message_GetState(&play->msgCtx)) {
case 2:
case TEXT_STATE_CLOSING:
func_808F4054(play, this, arg2, this->actor.textId);
ret = true;
break;
case 4:
case 5:
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play) && func_808F4414(play, this, arg2)) {
func_801477B4(play);
ret = true;
@@ -1473,23 +1473,22 @@ void EnIn_Update(Actor* thisx, PlayState* play) {
void func_808F6334(EnIn* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 newUnk4C8;
s32 talkState = Message_GetState(&play->msgCtx);
newUnk4C8 = Message_GetState(&play->msgCtx);
this->unk4C4 += this->unk4C0 != 0.0f ? 40.0f : -40.0f;
this->unk4C4 = CLAMP(this->unk4C4, 0.0f, 80.0f);
Matrix_Translate(this->unk4C4, 0.0f, 0.0f, MTXMODE_APPLY);
if (&this->actor == player->targetActor &&
!(play->msgCtx.currentTextId >= 0xFF && play->msgCtx.currentTextId <= 0x200) && newUnk4C8 == 3 &&
this->unk4C8 == 3) {
if ((&this->actor == player->targetActor) &&
!((play->msgCtx.currentTextId >= 0xFF) && (play->msgCtx.currentTextId <= 0x200)) &&
(talkState == TEXT_STATE_3) && (this->prevTalkState == TEXT_STATE_3)) {
if (!(play->state.frames & 1)) {
this->unk4C0 = this->unk4C0 != 0.0f ? 0.0f : 1.0f;
}
} else {
this->unk4C0 = 0.0f;
}
this->unk4C8 = newUnk4C8;
this->prevTalkState = talkState;
}
s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
+1 -1
View File
@@ -59,7 +59,7 @@ typedef struct EnIn {
/* 0x4B4 */ Vec3f unk4B4;
/* 0x4C0 */ f32 unk4C0;
/* 0x4C0 */ f32 unk4C4;
/* 0x4C0 */ s32 unk4C8;
/* 0x4C0 */ s32 prevTalkState;
} EnIn; // size = 0x4CC
extern const ActorInit En_In_InitVars;
@@ -3402,7 +3402,7 @@ void func_80B4ADB8(EnInvadepoh* this) {
}
void func_80B4ADCC(EnInvadepoh* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->textId == 0x3331) {
if (gSaveContext.save.weekEventReg[22] & 2) {
EnInvadepoh_SetTextID(this, play, 0x3334);
@@ -3468,7 +3468,8 @@ void func_80B4B048(EnInvadepoh* this, PlayState* play) {
if (play->msgCtx.unk120B1 == 0) {
if (play->msgCtx.msgMode == 0) {
D_80B4E998 = 1;
} else if ((Message_GetState(&play->msgCtx) == 6) || (Message_GetState(&play->msgCtx) == 5)) {
} else if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) ||
(Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
D_80B4E998 = 1;
}
}
+4 -4
View File
@@ -216,11 +216,11 @@ s32 func_80BC1D70(EnJa* this, PlayState* play) {
void func_80BC1E40(EnJa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 sp20 = Message_GetState(&play->msgCtx);
s32 talkState = Message_GetState(&play->msgCtx);
f32 phi_f0;
if (((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) && (sp20 == 3) &&
(this->unk_374 == 3) && (&this->actor == player->targetActor)) {
if (((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3) && (&this->actor == player->targetActor)) {
if ((play->state.frames % 2) == 0) {
if (this->unk_348 != 0.0f) {
this->unk_348 = 0.0f;
@@ -236,7 +236,7 @@ void func_80BC1E40(EnJa* this, PlayState* play) {
this->unk_34C = CLAMP(this->unk_34C, 0.0f, 120.0f);
Matrix_Translate(this->unk_34C, 0.0f, 0.0f, MTXMODE_APPLY);
this->unk_374 = sp20;
this->prevTalkState = talkState;
}
s32 func_80BC1FC8(EnJa* this, PlayState* play, ScheduleOutput* scheduleOutput) {
+2 -2
View File
@@ -56,8 +56,8 @@ typedef struct EnJa {
/* 0x366 */ s16 unk_366;
/* 0x368 */ void* unk_368;
/* 0x36C */ s32 unk_36C;
/* 0x370 */ UNK_TYPE1 unk370[4];
/* 0x374 */ s32 unk_374;
/* 0x370 */ UNK_TYPE1 unk_370[4];
/* 0x374 */ s32 prevTalkState;
} EnJa; // size = 0x378
extern const ActorInit En_Ja_InitVars;
+12 -12
View File
@@ -358,11 +358,11 @@ void EnJg_GoronShrineIdle(EnJg* this, PlayState* play) {
}
void EnJg_GoronShrineTalk(EnJg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((this->textId == 0xDCC) || (this->textId == 0xDDD) || (this->textId == 0xDE0)) {
// There is nothing more to say after these lines, so end the current conversation.
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->flags &= ~FLAG_LOOKING_AT_PLAYER;
this->actionFunc = EnJg_GoronShrineIdle;
} else {
@@ -415,7 +415,7 @@ void EnJg_GoronShrineCheer(EnJg* this, PlayState* play) {
* set his speed to 0, causing him to walk in place.
*/
void EnJg_AlternateTalkOrWalkInPlace(EnJg* this, PlayState* play) {
u8 messageState = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
s16 currentFrame = this->skelAnime.curFrame;
s16 lastFrame = Animation_GetLastFrame(sAnimations[this->animationIndex].animation);
@@ -425,9 +425,9 @@ void EnJg_AlternateTalkOrWalkInPlace(EnJg* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
}
} else if (this->animationIndex == EN_JG_ANIMATION_SURPRISE_LOOP) {
if ((messageState == 5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->flags &= ~FLAG_LOOKING_AT_PLAYER;
this->animationIndex = EN_JG_ANIMATION_WALK;
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
@@ -470,7 +470,7 @@ void EnJg_Walk(EnJg* this, PlayState* play) {
}
void EnJg_Talk(EnJg* this, PlayState* play) {
u8 messageState = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
s16 currentFrame = this->skelAnime.curFrame;
s16 lastFrame = Animation_GetLastFrame(sAnimations[this->animationIndex].animation);
u16 temp;
@@ -480,12 +480,12 @@ void EnJg_Talk(EnJg* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
}
if ((messageState == 5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
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.
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->flags &= ~FLAG_LOOKING_AT_PLAYER;
this->actionFunc = EnJg_SetupWalk;
return;
@@ -497,7 +497,7 @@ void EnJg_Talk(EnJg* this, PlayState* play) {
// The player hasn't talked to the Goron Child at least once, so they can't learn
// the Lullaby Intro. End the current conversation with the player.
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->flags &= ~FLAG_LOOKING_AT_PLAYER;
this->actionFunc = EnJg_SetupWalk;
} else if (((gSaveContext.save.weekEventReg[24] & 0x40)) ||
@@ -511,7 +511,7 @@ void EnJg_Talk(EnJg* this, PlayState* play) {
// already have the Lullaby or Lullaby Intro. End the current conversation and
// start the cutscene that teaches the Lullaby Intro.
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->flags &= ~FLAG_LOOKING_AT_PLAYER;
this->cutscene = EnJg_GetCutsceneForTeachingLullabyIntro(this);
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@@ -600,9 +600,9 @@ void EnJg_FrozenIdle(EnJg* this, PlayState* play) {
}
void EnJg_EndFrozenInteraction(EnJg* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 6 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = EnJg_FrozenIdle;
}
}
@@ -251,21 +251,21 @@ void func_80C14030(EnJgameTsn* this) {
void func_80C14044(EnJgameTsn* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 0:
case 1:
case 2:
case 3:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
case 4:
case TEXT_STATE_CHOICE:
func_80C14684(this, play);
break;
case 5:
case TEXT_STATE_5:
func_80C147B4(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
if (ActorCutscene_GetCurrentIndex() == this->actor.cutscene) {
ActorCutscene_Stop(this->actor.cutscene);
+18 -17
View File
@@ -4,6 +4,7 @@
* Description: Pierre the Scarecorw
*/
#include "prevent_bss_reordering.h"
#include "z_en_kakasi.h"
#include "objects/object_ka/object_ka.h"
@@ -78,7 +79,7 @@ const ActorInit En_Kakasi_InitVars = {
(ActorFunc)EnKakasi_Draw,
};
static Vec3f D_80971DCC[] = {
Vec3f D_80971DCC[] = {
{ 0.0f, 60.0f, 60.0f }, { 40.0f, 40.0f, 50.0f }, { -40.0f, 40.0f, 50.0f },
{ 40.0f, 20.0f, 110.0f }, { -40.0f, 20.0f, 110.0f }, { 0.0f, 80.0f, 60.0f },
{ 50.0f, 40.0f, -30.0f }, { -50.0f, 40.0f, -30.0f }, { 0.0f, 50.0f, 60.0f },
@@ -309,7 +310,7 @@ void EnKakasi_TimeSkipDialogue(EnKakasi* this, PlayState* play) {
// dialogue after skipped time 'did you feel that? went by in an instant'
this->actor.textId = 0x1653;
gSaveContext.save.weekEventReg[83] &= (u8)~1;
this->unkMsgState1AC = 5;
this->talkState = TEXT_STATE_5;
player->stateFlags1 |= 0x20;
this->actor.flags |= ACTOR_FLAG_10000;
}
@@ -381,7 +382,7 @@ void EnKakasi_SetupDialogue(EnKakasi* this) {
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
}
this->unkMsgState1AC = 5;
this->talkState = TEXT_STATE_5;
this->unkState196 = 1;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SPIN_REACH_OFFER);
this->actionFunc = EnKakasi_RegularDialogue;
@@ -415,9 +416,9 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
this->unkState1A8 = 0;
}
if ((this->unkMsgState1AC == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
if ((this->talkState == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
func_801477B4(play);
if (this->unkMsgState1AC == 5) {
if (this->talkState == TEXT_STATE_5) {
// bad song input
if (this->unkState196 == 2 && this->actor.textId == 0x1647) {
func_800B7298(play, &this->actor, 6);
@@ -469,7 +470,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) {
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
}
this->unkMsgState1AC = 4;
this->talkState = TEXT_STATE_CHOICE;
} else if (this->actor.textId == 0x1644) {
if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) {
@@ -495,14 +496,14 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
this->actor.textId = 0x1655;
} else if (this->actor.textId == 0x1655) {
this->actor.textId = 0x1656;
this->unkMsgState1AC = 4;
this->talkState = TEXT_STATE_CHOICE;
} else if (this->actor.textId == 0x1658) {
this->actor.textId = 0x1659;
} else if (this->actor.textId == 0x165A) {
this->actor.textId = 0x165B;
} else if (this->actor.textId == 0x165B) {
this->actor.textId = 0x165C;
this->unkMsgState1AC = 4;
this->talkState = TEXT_STATE_CHOICE;
} else if (this->actor.textId == 0x165E) {
this->actor.textId = 0x165F;
@@ -511,7 +512,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
return;
}
} else {
this->unkMsgState1AC = 5;
this->talkState = TEXT_STATE_5;
if (play->msgCtx.choiceIndex == 1) {
func_8019F208();
@@ -560,7 +561,7 @@ void EnKakasi_SetupSongTeach(EnKakasi* this, PlayState* play) {
* before actually teaching
*/
void EnKakasi_OcarinaRemark(EnKakasi* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_80152434(play, 0x35);
this->unkState1A8 = 0;
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@@ -628,7 +629,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) {
this->subCamId = SUB_CAM_ID_DONE;
this->actor.textId = 0x1647;
this->unkState1A8 = 2;
this->unkMsgState1AC = 5;
this->talkState = TEXT_STATE_5;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING);
this->actionFunc = EnKakasi_RegularDialogue;
@@ -660,7 +661,7 @@ void EnKakasi_SetupPostSongLearnDialogue(EnKakasi* this, PlayState* play) {
this->unkCounter1A4 = 0;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR);
this->subCamId = SUB_CAM_ID_DONE;
this->unkMsgState1AC = 5;
this->talkState = TEXT_STATE_5;
this->unkState1A8 = 1;
this->actionFunc = EnKakasi_PostSongLearnDialogue;
this->subCamFov = 0.0f;
@@ -734,12 +735,12 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
func_8096FAAC(this, play);
if ((this->unkState1A8 != 0) && (Message_GetState(&play->msgCtx) == this->unkMsgState1AC) &&
if ((this->unkState1A8 != 0) && (Message_GetState(&play->msgCtx) == this->talkState) &&
Message_ShouldAdvance(play)) {
func_801477B4(play);
if (this->unkMsgState1AC == 5) {
if (this->talkState == TEXT_STATE_5) {
this->unk190++;
if (this->unk190 > 5) {
this->unk190 = 5;
@@ -754,7 +755,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
} else if (this->actor.textId == 0x1649) {
this->actor.textId = 0x1660;
this->unkMsgState1AC = 4;
this->talkState = TEXT_STATE_CHOICE;
} else if (this->actor.textId == 0x164A) {
this->actor.textId = 0x164B;
@@ -771,7 +772,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
}
} else {
this->unkMsgState1AC = 5;
this->talkState = TEXT_STATE_5;
if (play->msgCtx.choiceIndex == 1) {
func_8019F208(); // play 0x4808 sfx (decide) and calls func_801A75E8
this->actor.textId = 0x164A;
@@ -1101,7 +1102,7 @@ void EnKakasi_IdleRisen(EnKakasi* this, PlayState* play) {
void EnKakasi_RisenDialogue(EnKakasi* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 1000, 0);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
EnKakasi_SetupIdleRisen(this);
}
@@ -21,7 +21,7 @@ typedef struct EnKakasi {
/* 0x1A0 */ s32 animIndex;
/* 0x1A4 */ s32 unkCounter1A4; // counter, counts up to F while he digs away, reused elsewhere
/* 0x1A8 */ s32 unkState1A8;
/* 0x1AC */ s16 unkMsgState1AC; // might be dialog state, compared against func(msgCtx)
/* 0x1AC */ s16 talkState;
/* 0x1AE */ s16 actorCutscenes[3];
/* 0x1B4 */ f32 animeFrameCount;
/* 0x1B8 */ f32 unkHeight;
@@ -317,15 +317,15 @@ void func_80B26AFC(EnKendoJs* this, PlayState* play) {
Player* player = GET_PLAYER(play);
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
func_80B26758(this, play);
break;
case 5:
case TEXT_STATE_5:
func_80B269A4(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
if (this->unk_288 == 0x272C) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3);
@@ -339,10 +339,10 @@ void func_80B26AFC(EnKendoJs* this, PlayState* play) {
func_80B26538(this);
}
case 0:
case 1:
case 2:
case 3:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
}
}
@@ -509,7 +509,7 @@ void func_80B2714C(EnKendoJs* this) {
void func_80B27188(EnKendoJs* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_288 == 0x2729) {
func_80B26F14(this, play);
} else if (!func_80B26F6C(this, play)) {
+54 -54
View File
@@ -455,7 +455,7 @@ void func_80B4163C(EnKgy* this, PlayState* play) {
void func_80B417B8(EnKgy* this, PlayState* play) {
func_80B4163C(this, play);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80B413C8(this);
this->actor.flags &= ~ACTOR_FLAG_100;
@@ -479,7 +479,7 @@ void func_80B41858(EnKgy* this, PlayState* play) {
void func_80B418C4(EnKgy* this, PlayState* play) {
func_80B4163C(this, play);
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play) &&
(Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play) &&
((play->msgCtx.currentTextId == 0xC4E) || (play->msgCtx.currentTextId == 0xC4F))) {
func_801477B4(play);
this->actor.textId = 0xC4F;
@@ -522,7 +522,7 @@ void func_80B41ACC(EnKgy* this, PlayState* play) {
Player* player = GET_PLAYER(play);
SkelAnime_Update(&this->skelAnime);
if (Message_GetState(&play->msgCtx) == 0x10) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_16) {
itemActionParam = func_80123810(play);
if (itemActionParam != PLAYER_AP_NONE) {
this->actionFunc = func_80B41E18;
@@ -554,7 +554,7 @@ void func_80B41ACC(EnKgy* this, PlayState* play) {
this->actor.textId = 0xC47;
}
player->actor.textId = 0;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 4);
}
}
@@ -603,7 +603,7 @@ void func_80B41D64(EnKgy* this, PlayState* play) {
}
void func_80B41E18(EnKgy* this, PlayState* play) {
u16 temp;
u16 textId;
s32 pad;
Player* player = GET_PLAYER(play);
@@ -613,11 +613,11 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && func_80B40E54(this) == 0) {
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
if (Message_ShouldAdvance(play)) {
temp = play->msgCtx.currentTextId;
textId = play->msgCtx.currentTextId;
switch (temp) {
switch (textId) {
case 0xC3B:
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -633,7 +633,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
case 1:
func_8019F230();
func_80B40EBC(this, play, temp);
func_80B40EBC(this, play, textId);
break;
}
break;
@@ -655,21 +655,21 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
}
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
temp = play->msgCtx.currentTextId;
textId = play->msgCtx.currentTextId;
switch (temp) {
switch (textId) {
case 0xC35:
play->msgCtx.unk11F10 = 0;
this->actor.textId = temp;
play->msgCtx.msgLength = 0;
this->actor.textId = textId;
this->unk_29C |= 4;
this->unk_2E8 = 3;
func_80B40E38(this);
break;
case 0xC36:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 4);
this->actor.textId = func_80B41460();
break;
@@ -694,7 +694,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
case 0xC3C:
case 0xC3F:
case 0xC4C:
func_80B40EBC(this, play, temp);
func_80B40EBC(this, play, textId);
break;
case 0xC3D:
@@ -706,13 +706,13 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
break;
case 0xC40:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 0);
this->actor.textId = 0xC43;
break;
case 0xC42:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 0);
this->actor.textId = 0xC43;
CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_NONE;
@@ -726,7 +726,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
this->unk_29C |= 0x10;
case 0xC45:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 3);
this->actor.textId = 0xFF;
this->actionFunc = func_80B41ACC;
@@ -746,7 +746,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
func_80123D50(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
player->exchangeItemId = EXCH_ITEM_NONE;
this->unk_29C &= ~0x8;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 4);
if (this->unk_29C & 0x10) {
this->actor.textId = 0xC56;
@@ -762,19 +762,19 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
player->exchangeItemId = EXCH_ITEM_NONE;
this->unk_29C &= ~8;
}
func_80B40EBC(this, play, temp);
func_80B40EBC(this, play, textId);
break;
case 0xC48:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 0);
this->actor.textId = temp + 1;
this->actor.textId = textId + 1;
break;
case 0xC49:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 4);
this->actor.textId = temp + 1;
this->actor.textId = textId + 1;
break;
case 0xC4A:
@@ -803,9 +803,9 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
case 0xC51:
case 0xC53:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 0);
this->actor.textId = temp + 1;
this->actor.textId = textId + 1;
func_80B40D30(play);
break;
@@ -854,7 +854,7 @@ void func_80B425A0(EnKgy* this, PlayState* play) {
void func_80B42660(EnKgy* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
this->actor.focus.pos = this->unk_2A8;
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
func_80B413C8(this);
this->actor.flags &= ~ACTOR_FLAG_100;
@@ -883,7 +883,7 @@ void func_80B42714(EnKgy* this, PlayState* play) {
void func_80B427C8(EnKgy* this, PlayState* play) {
s32 pad;
u16 temp_a2;
u16 textId;
if (SkelAnime_Update(&this->skelAnime)) {
if (this->unk_2D2 == 5) {
@@ -895,26 +895,26 @@ void func_80B427C8(EnKgy* this, PlayState* play) {
}
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
temp_a2 = play->msgCtx.currentTextId;
(Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
textId = play->msgCtx.currentTextId;
switch (temp_a2) {
switch (textId) {
case 0xC30:
play->msgCtx.unk11F10 = 0;
this->actor.textId = temp_a2;
play->msgCtx.msgLength = 0;
this->actor.textId = textId;
this->unk_29C |= 4;
this->unk_2E8 = 3;
break;
case 0xC31:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 4);
this->actor.textId = temp_a2 + 1;
this->actor.textId = textId + 1;
break;
case 0xC32:
case 0xC33:
func_80B40EBC(this, play, temp_a2);
func_80B40EBC(this, play, textId);
break;
case 0xC34:
@@ -953,7 +953,7 @@ void func_80B4296C(EnKgy* this, PlayState* play) {
}
void func_80B42A8C(EnKgy* this, PlayState* play) {
u16 temp_a2;
u16 textId;
s32 pad;
if (SkelAnime_Update(&this->skelAnime)) {
@@ -967,21 +967,21 @@ void func_80B42A8C(EnKgy* this, PlayState* play) {
}
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
temp_a2 = play->msgCtx.currentTextId;
switch (temp_a2) {
(Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
textId = play->msgCtx.currentTextId;
switch (textId) {
case 0xC1D:
case 0xC2D:
play->msgCtx.unk11F10 = 0;
this->actor.textId = temp_a2;
play->msgCtx.msgLength = 0;
this->actor.textId = textId;
this->unk_29C |= 4;
this->unk_2E8 = 3;
break;
case 0xC1E:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 1);
this->actor.textId = temp_a2 + 1;
this->actor.textId = textId + 1;
func_80B40E38(this);
break;
@@ -989,39 +989,39 @@ void func_80B42A8C(EnKgy* this, PlayState* play) {
case 0xC23:
case 0xC24:
case 0xC27:
func_80B40EBC(this, play, temp_a2);
func_80B40EBC(this, play, textId);
break;
case 0xC20:
case 0xC28:
func_80B40BC0(this, 1);
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
this->unk_29C |= 4;
this->unk_2E8 = 3;
this->actor.textId = temp_a2;
this->actor.textId = textId;
func_80B40E38(this);
break;
case 0xC21:
case 0xC29:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 0);
this->actor.textId = temp_a2 + 1;
this->actor.textId = textId + 1;
break;
case 0xC22:
case 0xC26:
case 0xC2B:
case 0xC2E:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 1);
this->actor.textId = temp_a2 + 1;
this->actor.textId = textId + 1;
break;
case 0xC25:
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
func_80B41368(this, play, 2);
this->actor.textId = temp_a2 + 1;
this->actor.textId = textId + 1;
break;
case 0xC2A:
@@ -183,24 +183,24 @@ void EnKujiya_SetupTalk(EnKujiya* this) {
void EnKujiya_Talk(EnKujiya* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 0:
case TEXT_STATE_NONE:
break;
case 4:
case TEXT_STATE_CHOICE:
EnKujiya_HandlePlayerChoice(this, play);
break;
case 5:
case TEXT_STATE_5:
EnKujiya_ChooseNextDialogue(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
EnKujiya_SetupWait(this);
}
break;
case 17:
case TEXT_STATE_17:
if (Message_ShouldAdvance(play)) {
Inventory_SaveLotteryCodeGuess(play);
Message_StartTextbox(play, 0x2B60, &this->actor);
@@ -227,7 +227,7 @@ void EnKujiya_SetupFinishGivePrize(EnKujiya* this) {
}
void EnKujiya_FinishGivePrize(EnKujiya* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 6) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
EnKujiya_SetupWait(this);
}
}
@@ -293,7 +293,7 @@ void EnLookNuts_SetupSendPlayerToSpawn(EnLookNuts* this) {
void EnLookNuts_SendPlayerToSpawn(EnLookNuts* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(this->spawnIndex);
gSaveContext.nextCutsceneIndex = 0;
+7 -9
View File
@@ -628,31 +628,29 @@ void EnMa4_SetupDialogueHandler(EnMa4* this) {
}
void EnMa4_DialogueHandler(EnMa4* this, PlayState* play) {
s32 temp_v0;
switch (Message_GetState(&play->msgCtx)) {
default:
break;
case 4: // Player answered a question
case TEXT_STATE_CHOICE: // Player answered a question
EnMa4_HandlePlayerChoice(this, play);
break;
case 5: // End message block
case TEXT_STATE_5: // End message block
EnMa4_ChooseNextDialogue(this, play);
break;
case 6: // End conversation
case TEXT_STATE_DONE: // End conversation
if (Message_ShouldAdvance(play)) {
if ((play->msgCtx.unk120B1 == 0) || !CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
EnMa4_SetupWait(this);
}
}
case 0:
case 1:
case 2:
case 3:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
}
+31 -31
View File
@@ -409,25 +409,25 @@ void EnMaYto_SetupDefaultDialogueHandler(EnMaYto* this) {
void EnMaYto_DefaultDialogueHandler(EnMaYto* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
EnMaYto_DefaultHandlePlayerChoice(this, play);
break;
case 5:
case TEXT_STATE_5:
EnMaYto_DefaultChooseNextDialogue(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
this->unk31E = 0;
EnMaYto_SetupDefaultWait(this);
}
break;
case 0:
case 1:
case 2:
case 3:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
}
@@ -541,24 +541,24 @@ void EnMaYto_SetupDinnerDialogueHandler(EnMaYto* this) {
void EnMaYto_DinnerDialogueHandler(EnMaYto* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
EnMaYto_DinnerHandlePlayerChoice(this, play);
break;
case 5:
case TEXT_STATE_5:
EnMaYto_DinnerChooseNextDialogue(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
EnMaYto_SetupDinnerWait(this);
}
break;
case 0:
case 1:
case 2:
case 3:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
}
}
@@ -731,22 +731,22 @@ void EnMaYto_SetupBarnDialogueHandler(EnMaYto* this) {
void EnMaYto_BarnDialogueHandler(EnMaYto* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 5:
case TEXT_STATE_5:
EnMaYto_BarnChooseNextDialogue(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
this->unk31E = 0;
EnMaYto_SetupBarnWait(this);
}
break;
case 0:
case 1:
case 2:
case 3:
case 4:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_CHOICE:
break;
}
}
@@ -911,15 +911,15 @@ void EnMaYto_SetupAfterMilkRunDialogueHandler(EnMaYto* this) {
void EnMaYto_AfterMilkRunDialogueHandler(EnMaYto* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 6:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_CHOICE:
case TEXT_STATE_DONE:
break;
case 5:
case TEXT_STATE_5:
EnMaYto_AfterMilkRunChooseNextDialogue(this, play);
break;
}
@@ -1063,14 +1063,14 @@ void EnMaYto_SetupPostMilkRunWaitDialogueEnd(EnMaYto* this) {
}
void EnMaYto_PostMilkRunWaitDialogueEnd(EnMaYto* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 6 || Message_GetState(&play->msgCtx) == 5) {
if (Message_ShouldAdvance(play) && Message_GetState(&play->msgCtx) == 5) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE || Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
if (Message_ShouldAdvance(play) && Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
func_800B7298(play, &this->actor, 7);
func_801477B4(play);
}
}
if (Message_GetState(&play->msgCtx) == 0 && play->msgCtx.unk120B1 == 0) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE && play->msgCtx.unk120B1 == 0) {
EnMaYto_SetupPostMilkRunEnd(this);
}
}
@@ -354,21 +354,21 @@ void EnMaYts_SetupDialogueHandler(EnMaYts* this) {
void EnMaYts_DialogueHandler(EnMaYts* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 5: // End message block
case TEXT_STATE_5: // End message block
EnMaYts_ChooseNextDialogue(this, play);
break;
case 6: // End conversation
case TEXT_STATE_DONE: // End conversation
if (Message_ShouldAdvance(play)) {
EnMaYts_SetupStartDialogue(this);
}
break;
case 0:
case 1:
case 2:
case 3:
case 4:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_CHOICE:
break;
}
}
@@ -9,7 +9,6 @@ typedef struct EnMag {
/* 0x00000 */ Actor actor;
/* 0x00144 */ UNK_TYPE1 unk144[0x2C];
/* 0x00170 */ Font font;
/* 0x11EFC */ UNK_TYPE1 unk11EFC[4];
/* 0x11F00 */ s16 unk11F00; // Set and not used.
/* 0x11F02 */ s16 unk11F02; // Set and not used.
/* 0x11F04 */ s16 state; // State of whole actor, uses EnMagState enum
@@ -258,7 +258,7 @@ void EnMinifrog_ReturnFrogCutscene(EnMinifrog* this, PlayState* play) {
EnMinifrog_TurnToPlayer(this);
EnMinifrog_Jump(this);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
EnMinifrog_SetJumpState(this);
switch (play->msgCtx.currentTextId) {
@@ -496,13 +496,13 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, PlayState* play) {
EnMinifrog_TurnToPlayer(this);
EnMinifrog_Jump(this);
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0: // Yes
func_8019F208();
this->actionFunc = EnMinifrog_BeginChoirCutscene;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
break;
case 1: // No
func_8019F230();
@@ -511,7 +511,8 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, PlayState* play) {
}
}
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
EnMinifrog_SetJumpState(this);
switch (play->msgCtx.currentTextId) {
@@ -530,7 +531,7 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, PlayState* play) {
break;
case 0xD77: // "Let us begin our chorus"
this->actionFunc = EnMinifrog_BeginChoirCutscene;
play->msgCtx.unk11F10 = 0;
play->msgCtx.msgLength = 0;
break;
case 0xD7C: // "The conducting was spectacular. And all of our members rose to the occasion!"
if (gSaveContext.save.weekEventReg[35] & 0x80) { // Obtained Heart Piece
@@ -554,6 +555,7 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, PlayState* play) {
break;
}
}
break;
}
}
+4 -4
View File
@@ -168,14 +168,14 @@ void func_809596A0(EnMk* this, PlayState* play) {
}
switch (Message_GetState(&play->msgCtx)) {
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
func_801477B4(play);
this->actionFunc = func_80959774;
}
break;
case 2:
case TEXT_STATE_CLOSING:
this->actionFunc = func_80959774;
break;
}
@@ -268,10 +268,10 @@ void func_80959A24(EnMk* this, PlayState* play) {
this->unk_27A |= 1;
switch (Message_GetState(&play->msgCtx)) {
case 2:
case TEXT_STATE_CLOSING:
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0xFA1:
+9 -7
View File
@@ -46,15 +46,17 @@ void EnMm2_Destroy(Actor* thisx, PlayState* play) {
* Action function whilst Link is reading the letter.
*/
void EnMm2_Reading(EnMm2* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
func_801477B4(play);
this->actionFunc = EnMm2_WaitForRead;
}
break;
if (talkState != 2) {
if (talkState == 5 && Message_ShouldAdvance(play)) {
func_801477B4(play);
case TEXT_STATE_CLOSING:
this->actionFunc = EnMm2_WaitForRead;
}
} else {
this->actionFunc = EnMm2_WaitForRead;
break;
}
}
+7 -7
View File
@@ -314,24 +314,24 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) {
this->unk_2B0 &= ~2;
switch (Message_GetState(&play->msgCtx)) {
case 0:
case 1:
case 2:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
break;
case 3:
case TEXT_STATE_3:
this->unk_2B0 |= 2;
break;
case 4:
case TEXT_STATE_CHOICE:
func_80A6F3B4(this, play);
break;
case 5:
case TEXT_STATE_5:
func_80A6F5E4(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
if (this->unk_2B4 == 0x2790) {
Player* player = GET_PLAYER(play);
+4 -3
View File
@@ -98,13 +98,13 @@ void EnMs_Wait(EnMs* this, PlayState* play) {
void EnMs_Talk(EnMs* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
this->actionFunc = EnMs_Wait;
}
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
func_801477B4(play);
Actor_PickUp(&this->actor, play, GI_MAGIC_BEANS, this->actor.xzDistToPlayer,
@@ -113,7 +113,7 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
}
break;
case 4:
case TEXT_STATE_CHOICE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0: // yes
@@ -140,6 +140,7 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
}
}
break;
default:
break;
}
@@ -416,7 +416,7 @@ void EnMttag_RaceFinish(EnMttag* this, PlayState* play) {
void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == 5 && Message_ShouldAdvance(play)) || talkState == 2)) {
if (((talkState == TEXT_STATE_5 && Message_ShouldAdvance(play)) || talkState == TEXT_STATE_CLOSING)) {
if (this->shouldRestartRace) {
play->nextEntranceIndex = 0xD010;
@@ -453,7 +453,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
* responded to the Goron Elder's son's question.
*/
void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
if (play->msgCtx.choiceIndex != 0) {
// Exit the race
func_8019F230();
+1 -1
View File
@@ -198,7 +198,7 @@ void EnMuto_SetupDialogue(EnMuto* this, PlayState* play) {
void EnMuto_InDialogue(EnMuto* this, PlayState* play) {
if (!this->isInMayorsRoom) {
this->yawTowardsTarget = this->actor.yawTowardsPlayer;
if (Message_GetState(&play->msgCtx) == 5 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
if (this->actor.textId == 0x62C) {
@@ -57,8 +57,8 @@ void func_8096B104(EnOkarinaEffect* this, PlayState* play) {
void func_8096B174(EnOkarinaEffect* this, PlayState* play) {
DECR(this->unk144);
if (!play->pauseCtx.state && !play->gameOverCtx.state && !play->msgCtx.unk11F10 &&
!FrameAdvance_IsEnabled(&play->state) && this->unk144 == 0) {
if ((play->pauseCtx.state == 0) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
(play->msgCtx.msgLength == 0) && !FrameAdvance_IsEnabled(&play->state) && this->unk144 == 0) {
EnOkarinaEffect_SetupAction(this, func_8096B1FC);
}
}
@@ -102,7 +102,7 @@ void func_80B11F78(EnOnpuman* this, PlayState* play) {
void func_80B1202C(EnOnpuman* this, PlayState* play2) {
PlayState* play = play2;
if ((Message_GetState(&play->msgCtx) == 5) && (Message_ShouldAdvance(play))) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && (Message_ShouldAdvance(play))) {
switch (play->msgCtx.currentTextId) {
case 0x8D4:
this->unk_2A4 |= 1;
@@ -138,7 +138,7 @@ void func_80B1202C(EnOnpuman* this, PlayState* play2) {
}
void func_80B1217C(EnOnpuman* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && (Message_ShouldAdvance(play))) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && (Message_ShouldAdvance(play))) {
this->actionFunc = func_80B121D8;
func_801477B4(play);
}
+3 -3
View File
@@ -759,13 +759,13 @@ void func_80AD16A8(EnOsn* this, PlayState* play) {
}
void func_80AD19A0(EnOsn* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if ((temp_v0 == 6 || temp_v0 == 5) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_DONE) || (talkState == TEXT_STATE_5)) && Message_ShouldAdvance(play)) {
if (this->unk_1EA & 0x20) {
this->unk_1EA &= ~0x20;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80AD14C8;
} else {
func_80AD10FC(this, play);
+15 -15
View File
@@ -301,7 +301,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) {
Actor_ProcessTalkRequest(&this->actor, &play->state);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
this->stickLeftPrompt.isEnabled = false;
@@ -563,7 +563,7 @@ void EnOssan_Hello(EnOssan* this, PlayState* play) {
Player* player = GET_PLAYER(play);
EnOssan_RotateHead(this, play);
if (talkState == 5 && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
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);
@@ -580,7 +580,7 @@ void EnOssan_Hello(EnOssan* this, PlayState* play) {
return;
}
}
if ((talkState == 10) && (this->actor.params == ENOSSAN_PART_TIME_WORKER) &&
if ((talkState == TEXT_STATE_10) && (this->actor.params == ENOSSAN_PART_TIME_WORKER) &&
(player->transformation == PLAYER_FORM_ZORA) && Message_ShouldAdvance(play)) {
this->animationIndex = ANI_ANIMATION_APOLOGY_LOOP;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, ANI_ANIMATION_APOLOGY_LOOP);
@@ -629,7 +629,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(this->cutscene);
this->cutsceneState = ENOSSAN_CUTSCENESTATE_WAITING;
} else {
if (talkState == 4) {
if (talkState == TEXT_STATE_CHOICE) {
func_8011552C(play, 6);
if (!EnOssan_TestEndInteraction(this, play, CONTROLLER1(&play->state)) &&
(!Message_ShouldAdvance(play) || !EnOssan_FacingShopkeeperDialogResult(this, play))) {
@@ -665,7 +665,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_TalkToShopkeeper(EnOssan* this, PlayState* play) {
AnimationInfoS* animations = sAnimations[this->actor.params];
if (Message_GetState(&play->msgCtx) == 5 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
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);
@@ -852,7 +852,7 @@ void EnOssan_BrowseLeftShelf(EnOssan* this, PlayState* play) {
this->drawCursor = 0xFF;
this->stickRightPrompt.isEnabled = true;
EnOssan_UpdateCursorPos(play, this);
if (talkState == 5) {
if (talkState == TEXT_STATE_5) {
func_8011552C(play, 6);
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
if (this->moveHorizontal) {
@@ -910,7 +910,7 @@ void EnOssan_BrowseRightShelf(EnOssan* this, PlayState* play) {
this->drawCursor = 0xFF;
this->stickLeftPrompt.isEnabled = true;
EnOssan_UpdateCursorPos(play, this);
if (talkState == 5) {
if (talkState == TEXT_STATE_5) {
func_8011552C(play, 6);
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
if (this->moveHorizontal != 0) {
@@ -983,7 +983,7 @@ void EnOssan_SetupBuyItemWithFanfare(PlayState* play, EnOssan* this) {
Actor_PickUp(&this->actor, play, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
player->stateFlags2 &= ~0x20000000;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
@@ -1051,7 +1051,7 @@ void EnOssan_HandleCanBuyItem(PlayState* play, EnOssan* this) {
void EnOssan_SelectItem(EnOssan* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (EnOssan_TakeItemOffShelf(this) && talkState == 4) {
if (EnOssan_TakeItemOffShelf(this) && (talkState == TEXT_STATE_CHOICE)) {
func_8011552C(play, 6);
if (!EnOssan_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
@@ -1069,7 +1069,7 @@ void EnOssan_SelectItem(EnOssan* this, PlayState* play) {
}
void EnOssan_CannotBuy(EnOssan* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 5 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->actionFunc = this->prevActionFunc;
func_80151938(play, this->items[this->cursorIdx]->actor.textId);
}
@@ -1078,7 +1078,7 @@ void EnOssan_CannotBuy(EnOssan* this, PlayState* play) {
void EnOssan_CanBuy(EnOssan* this, PlayState* play) {
EnGirlA* item;
if (Message_GetState(&play->msgCtx) == 5 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->shopItemSelectedTween = 0.0f;
EnOssan_ResetItemPosition(this);
item = this->items[this->cursorIdx];
@@ -1098,9 +1098,9 @@ void EnOssan_BuyItemWithFanfare(EnOssan* this, PlayState* play) {
}
void EnOssan_SetupItemPurchased(EnOssan* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == 6 && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
EnOssan_SetupAction(this, EnOssan_ItemPurchased);
if (this->cutsceneState == ENOSSAN_CUTSCENESTATE_STOPPED) {
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@@ -1118,7 +1118,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) {
Player* player = GET_PLAYER(play);
EnGirlA* item;
if (talkState == 4) {
if (talkState == TEXT_STATE_CHOICE) {
func_8011552C(play, 6);
if (Message_ShouldAdvance(play)) {
EnOssan_ResetItemPosition(this);
@@ -1142,7 +1142,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) {
}
}
}
} else if (talkState == 5 && Message_ShouldAdvance(play)) {
} else if (talkState == TEXT_STATE_5 && Message_ShouldAdvance(play)) {
EnOssan_ResetItemPosition(this);
item = this->items[this->cursorIdx];
item->restockFunc(play, item);
+15 -15
View File
@@ -644,7 +644,7 @@ void func_80B5CD40(EnOt* this, PlayState* play) {
s32 temp;
switch (Message_GetState(&play->msgCtx)) {
case 0:
case TEXT_STATE_NONE:
temp = Math_SmoothStepToS(&this->actor.shape.rot.y,
BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play))), 3, 0xE38, 0x38E);
this->actor.world.rot.y = this->actor.shape.rot.y;
@@ -655,14 +655,14 @@ void func_80B5CD40(EnOt* this, PlayState* play) {
}
break;
case 1:
case 2:
case 3:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
case 4:
case 5:
case 6:
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1069)) {
this->unk_32C |= 4;
ActorCutscene_Stop(this->cutscenes[0]);
@@ -740,10 +740,10 @@ void func_80B5D160(EnOt* this, PlayState* play) {
s32 temp;
switch (Message_GetState(&play->msgCtx)) {
case 0:
case TEXT_STATE_NONE:
temp = Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0xE38, 0x38E);
this->actor.world.rot.y = this->actor.shape.rot.y;
if (!temp) {
if (temp == 0) {
switch (this->unk_384) {
case 0:
if ((this->unk_33C != 1) && (this->unk_33C == 2)) {
@@ -778,14 +778,14 @@ void func_80B5D160(EnOt* this, PlayState* play) {
}
break;
case 1:
case 2:
case 3:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
break;
case 4:
case 5:
case 6:
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
default:
+7 -7
View File
@@ -324,7 +324,7 @@ void func_8095ACEC(EnOwl* this) {
}
void func_8095AD54(EnOwl* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 4) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case OWL_REPEAT:
func_80151938(play, 0x7D1);
@@ -340,14 +340,14 @@ void func_8095AD54(EnOwl* this, PlayState* play) {
}
void func_8095AE00(EnOwl* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_80151938(play, 0x7D2);
this->actionFunc = func_8095AD54;
}
}
void func_8095AE60(EnOwl* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_80151938(play, 0x7D1);
this->actionFunc = func_8095AE00;
}
@@ -363,7 +363,7 @@ void func_8095AEC0(EnOwl* this, PlayState* play) {
void func_8095AF2C(EnOwl* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
if (play->msgCtx.currentTextId == 0xBFE) {
func_8095ACEC(this);
@@ -375,7 +375,7 @@ void func_8095AF2C(EnOwl* this, PlayState* play) {
}
break;
case 6:
case TEXT_STATE_DONE:
func_8095ACEC(this);
this->actionFunc = func_8095ABF0;
break;
@@ -606,7 +606,7 @@ void func_8095BA84(EnOwl* this, PlayState* play) {
func_8095A920(this, play);
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0xBEC:
@@ -645,7 +645,7 @@ void func_8095BA84(EnOwl* this, PlayState* play) {
}
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0xBEA:
@@ -628,20 +628,23 @@ void func_80BD9A9C(EnPamera* this) {
void EnPamera_HandleDialogue(EnPamera* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 0:
case 1:
case 2:
case 3:
case 4:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_CHOICE:
break;
case 5:
case TEXT_STATE_5:
func_80BD9B4C(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
func_80BD9938(this);
}
break;
default:
break;
}
+10 -10
View File
@@ -1132,11 +1132,11 @@ void func_80AF8BA8(s32 arg0) {
void func_80AF8C68(EnPm* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 sp28 = Message_GetState(&play->msgCtx);
u16 temp_a0 = play->msgCtx.currentTextId;
s32 talkState = Message_GetState(&play->msgCtx);
u16 textId = play->msgCtx.currentTextId;
if ((player->targetActor == &this->actor) && ((temp_a0 < 255) || (temp_a0 > 512)) && (sp28 == 3) &&
(this->unk_388 == 3)) {
if ((player->targetActor == &this->actor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3)) {
if ((play->state.frames % 3) == 0) {
if (this->unk_360 == 120.0f) {
this->unk_360 = 0.0f;
@@ -1149,7 +1149,7 @@ void func_80AF8C68(EnPm* this, PlayState* play) {
}
Math_SmoothStepToF(&this->unk_364, this->unk_360, 0.8f, 40.0f, 10.0f);
Matrix_Translate(this->unk_364, 0.0f, 0.0f, MTXMODE_APPLY);
this->unk_388 = sp28;
this->prevTalkState = talkState;
}
s32 func_80AF8D84(EnPm* this, PlayState* play) {
@@ -1167,20 +1167,20 @@ s32 func_80AF8D84(EnPm* this, PlayState* play) {
s32 func_80AF8DD4(EnPm* this, PlayState* play) {
Player* player = GET_PLAYER(play);
u16 temp = play->msgCtx.currentTextId;
u16 textId = play->msgCtx.currentTextId;
s32 pad;
if (player->stateFlags1 & (0x400 | 0x40)) {
this->unk_356 |= 0x400;
if (this->unk_358 != temp) {
if (this->unk_358 != textId) {
if ((this->unk_384 == 0) || (this->unk_384 == 1)) {
func_80AF7E98(this, 7);
}
if ((temp == 0x277C) || (temp == 0x277D)) {
if ((textId == 0x277C) || (textId == 0x277D)) {
func_80AF7E98(this, 10);
}
}
this->unk_358 = temp;
this->unk_358 = textId;
} else {
if (this->unk_356 & 0x400) {
this->unk_358 = 0;
@@ -1700,7 +1700,7 @@ s32 func_80AF9BF8(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
s32 func_80AF9D04(EnPm* this, PlayState* play) {
EnDoor* door = (EnDoor*)func_80AF7D60(play, this->unk_258);
Vec3f sp38;
Vec3f* sp28;
s32 pad;
f32 temp;
if (!SubS_InCsMode(play) && (this->timePathTimeSpeed != 0)) {
+3 -3
View File
@@ -50,12 +50,12 @@ typedef struct EnPm {
/* 0x37C */ EnPmFunc unk_37C;
/* 0x380 */ s32 unk_380;
/* 0x384 */ s32 unk_384;
/* 0x388 */ s32 unk_388;
/* 0x388 */ s32 prevTalkState;
/* 0x38C */ s32 unk_38C;
/* 0x390 */ UNK_TYPE1 unk390[0x4];
/* 0x390 */ UNK_TYPE1 unk_390[0x4];
/* 0x394 */ s32 unk_394;
/* 0x398 */ s32 unk_398;
/* 0x39C */ UNK_TYPE1 unk39C[0x4];
/* 0x39C */ UNK_TYPE1 unk_39C[0x4];
} EnPm; // size = 0x3A0
extern const ActorInit En_Pm_InitVars;
@@ -513,26 +513,26 @@ void func_80B717E0(EnRailSkb* this, PlayState* play) {
this->unk_3FA = 0;
switch (Message_GetState(&play->msgCtx)) {
case 0:
case 1:
case 2:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
break;
case 3:
case TEXT_STATE_3:
if ((play->gameplayFrames % 2) != 0) {
this->unk_3FA = 1;
}
break;
case 4:
case TEXT_STATE_CHOICE:
func_80B72100(this, play);
break;
case 5:
case TEXT_STATE_5:
func_80B71F3C(this, play);
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
func_80B71650(this);
}
@@ -968,14 +968,14 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, PlayState* play) {
}
} else {
switch (Message_GetState(&play->msgCtx)) {
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
Message_StartTextbox(play, 0x13B3, &this->actor);
this->textId = 0x13B3;
}
break;
case 6:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
this->textId = 0;
this->isInvincible = false;
@@ -983,11 +983,11 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, PlayState* play) {
}
break;
case 0:
case 1:
case 2:
case 3:
case 4:
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_CHOICE:
break;
}
}
@@ -141,10 +141,10 @@ void EnRecepgirl_Talk(EnRecepgirl* this, PlayState* play) {
}
talkState = Message_GetState(&play->msgCtx);
if (talkState == 2) {
if (talkState == TEXT_STATE_CLOSING) {
this->actor.textId = 0x2ADC; // hear directions again?
EnRecepgirl_SetupWait(this);
} else if ((talkState == 5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->actor.textId == 0x2AD9) { // "Welcome..."
Flags_SetSwitch(play, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 10.0f);
+1 -1
View File
@@ -313,7 +313,7 @@ void func_808FA4F4(EnRr* this, PlayState* play) {
sp34 = false;
}
if (sp34 && (Message_GetState(&play->msgCtx) == 0)) {
if (sp34 && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
Message_StartTextbox(play, 0xF6, NULL);
}
@@ -312,14 +312,14 @@ void func_80BCB52C(EnScopenuts* this, PlayState* play) {
}
void func_80BCB6D0(EnScopenuts* this, PlayState* play) {
u8 temp_v0 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
if (temp_v0 == 5) {
if (talkState == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
if (this->unk_328 & 1) {
this->unk_328 &= ~1;
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actor.flags &= ~ACTOR_FLAG_1;
this->unk_328 &= ~4;
this->unk_348 = 8;
@@ -330,7 +330,7 @@ void func_80BCB6D0(EnScopenuts* this, PlayState* play) {
Message_StartTextbox(play, this->unk_33C, &this->actor);
}
}
} else if (temp_v0 == 4) {
} else if (talkState == TEXT_STATE_CHOICE) {
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -342,7 +342,7 @@ void func_80BCB6D0(EnScopenuts* this, PlayState* play) {
} else {
func_8019F208();
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
Rupees_ChangeBy(-this->unk_358);
this->actionFunc = func_80BCB90C;
}
@@ -359,7 +359,7 @@ void func_80BCB6D0(EnScopenuts* this, PlayState* play) {
break;
}
}
} else if (temp_v0 == 6) {
} else if (talkState == TEXT_STATE_DONE) {
func_800B85E0(&this->actor, play, 400.0f, -1);
this->actionFunc = func_80BCB980;
}
@@ -111,7 +111,7 @@ void func_80A44DE8(EnSekihi* this, PlayState* play) {
void func_80A44F40(EnSekihi* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case 4:
case TEXT_STATE_CHOICE:
if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1019)) {
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -132,7 +132,7 @@ void func_80A44F40(EnSekihi* this, PlayState* play) {
break;
}
break;
case 5:
case TEXT_STATE_5:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x1018:
@@ -416,10 +416,10 @@ void func_80ADB544(EnSellnuts* this, PlayState* play) {
void func_80ADB924(EnSellnuts* this, PlayState* play) {
Player* player = GET_PLAYER(play);
u8 msgState = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
s32 item;
if (msgState == 0x10) {
if (talkState == TEXT_STATE_16) {
item = func_80123810(play);
if (item > EXCH_ITEM_NONE) {
if (item == EXCH_ITEM_MOON_TEAR) {
@@ -438,7 +438,7 @@ void func_80ADB924(EnSellnuts* this, PlayState* play) {
func_80151938(play, this->unk_340);
this->actionFunc = func_80ADB0D8;
}
} else if ((msgState == 5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if (this->unk_340 == D_80ADD910[this->unk_33A]) {
this->unk_340 = D_80ADD938[this->unk_33A];
func_80151938(play, this->unk_340);
@@ -452,7 +452,7 @@ void func_80ADB924(EnSellnuts* this, PlayState* play) {
}
void func_80ADBAB8(EnSellnuts* this, PlayState* play) {
u8 sp27 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
s16 currentFrame = this->skelAnime.curFrame;
s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation);
@@ -468,9 +468,9 @@ void func_80ADBAB8(EnSellnuts* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 6);
}
if ((sp27 == 5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80ADBBEC;
func_800B7298(play, NULL, 0x13);
}
@@ -497,7 +497,7 @@ void func_80ADBC60(EnSellnuts* this, PlayState* play) {
}
void func_80ADBCE4(EnSellnuts* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 6) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1);
this->unk_340 = D_80ADD930[this->unk_33A];
this->actionFunc = func_80ADBC60;
@@ -505,7 +505,7 @@ void func_80ADBCE4(EnSellnuts* this, PlayState* play) {
}
void func_80ADBD64(EnSellnuts* this, PlayState* play) {
u8 sp27 = Message_GetState(&play->msgCtx);
u8 talkState = Message_GetState(&play->msgCtx);
s16 currentFrame = this->skelAnime.curFrame;
s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation);
@@ -514,9 +514,9 @@ void func_80ADBD64(EnSellnuts* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 0);
}
if ((sp27 == 5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_338 &= ~2;
this->actor.flags &= ~ACTOR_FLAG_1;
this->unk_34C = 8;
@@ -556,9 +556,9 @@ void func_80ADBE80(EnSellnuts* this, PlayState* play) {
}
void func_80ADBFA0(EnSellnuts* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
if (this->unk_34C == 0) {
this->actionFunc = func_80ADB544;
} else {
@@ -719,9 +719,9 @@ void func_80ADC5A4(EnSellnuts* this, PlayState* play) {
void func_80ADC6D0(EnSellnuts* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
if (player->transformation == PLAYER_FORM_DEKU) {
if (gSaveContext.save.day == 3) {
this->unk_33A = 2;
@@ -737,7 +737,7 @@ void func_80ADC6D0(EnSellnuts* this, PlayState* play) {
}
void func_80ADC7B4(EnSellnuts* this, PlayState* play) {
s32 temp = Message_GetState(&play->msgCtx);
s32 talkState = Message_GetState(&play->msgCtx);
if (this->unk_366 == 0) {
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
@@ -749,9 +749,9 @@ void func_80ADC7B4(EnSellnuts* this, PlayState* play) {
}
ActorCutscene_SetIntentToPlay(this->cutscene);
}
} else if ((this->unk_366 == 1) && (temp == 5) && Message_ShouldAdvance(play)) {
} else if ((this->unk_366 == 1) && (talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.unk12023 = 4;
play->msgCtx.stateTimer = 4;
this->unk_366 = 0;
ActorCutscene_Stop(this->cutscene);
this->cutscene = ActorCutscene_GetAdditionalCutscene(this->cutscene);
+4 -5
View File
@@ -177,17 +177,16 @@ void func_80AE63A8(EnShn* this, PlayState* play) {
void func_80AE6488(EnShn* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 tempMsgState;
s32 talkState = Message_GetState(&play->msgCtx);
f32 phi_f0_2;
f32 phi_f0;
tempMsgState = Message_GetState(&play->msgCtx);
this->unk_2D4 += (this->unk_2D0 != 0.0f) ? 40.0f : -40.0f;
this->unk_2D4 = CLAMP(this->unk_2D4, 0.0f, 80.0f);
Matrix_Translate(this->unk_2D4, 0.0f, 0.0f, MTXMODE_APPLY);
if ((&this->actor == player->targetActor) &&
((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId >= 0x201)) && (tempMsgState == 3) &&
(this->msgState == 3)) {
((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId >= 0x201)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3)) {
if (play->state.frames % 2 == 0) {
if (this->unk_2D0 != 0.0f) {
this->unk_2D0 = 0.0f;
@@ -198,7 +197,7 @@ void func_80AE6488(EnShn* this, PlayState* play) {
} else {
this->unk_2D0 = 0.0f;
}
this->msgState = tempMsgState;
this->prevTalkState = talkState;
}
s32 func_80AE65F4(EnShn* this, PlayState* play) {

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