1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
#ifndef D_LYT_MSG_WINDOW_H
#define D_LYT_MSG_WINDOW_H
#include "common.h"
#include "d/d_tag_processor.h"
#include "d/d_textwindow_unk.h"
#include "d/lyt/d2d.h"
#include "d/lyt/msg_window/d_lyt_msg_window_common.h"
#include "d/lyt/msg_window/d_lyt_msg_window_select_btn.h"
#include "m/m_vec.h"
#include "s/s_State.hpp"
#include "sized_string.h"
#include "toBeSorted/d_flow_mgr.h"
// Forward declarations required for vtable order
class dLytMsgWindowTalk_c;
class dLytMsgWindowLink_c;
class dLytMsgWindowGet_c;
class dLytMsgWindowSword_c;
class dLytMsgWindowWood_c;
class dLytMsgWindowStone_c;
class dLytMsgWindowDemo_c;
class dLytAutoExplain_c;
class dLytAutoCaption_c;
struct dLytMsgWindowCharData;
class dLytMsgWindow_c {
public:
enum MsgWindow_e {
MSG_WINDOW_0 = 0,
MSG_WINDOW_1 = 1,
MSG_WINDOW_SWORD_FI = 2,
MSG_WINDOW_SWORD_GHIRAHIM = 3,
MSG_WINDOW_SWORD_LASTBOSS = 4,
MSG_WINDOW_GET = 5,
MSG_WINDOW_WOOD = 6,
MSG_WINDOW_STONE = 7,
MSG_WINDOW_8 = 8,
MSG_WINDOW_LINK = 9,
MSG_WINDOW_10 = 10,
MSG_WINDOW_22 = 22,
MSG_WINDOW_DEMO = 30,
MSG_WINDOW_31 = 31,
MSG_WINDOW_34 = 34,
// Maybe none
MSG_WINDOW_36 = 36,
};
dLytMsgWindow_c() : mStateMgr(*this) {
sInstance = this;
}
virtual ~dLytMsgWindow_c() {
sInstance = nullptr;
}
bool build();
bool remove();
bool execute();
bool draw();
bool isVisible() const;
bool isOutputtingText() const;
bool setCurrentLabelName(const char *name, bool storeFile);
void setCurrentEntrypointName(const char *name);
void setCurrentFlowFilename(const char *name);
void setNumericArg0(s32 arg);
void setNumericArgs(s32 *arg, s32 argCount);
static dLytMsgWindow_c *getInstance() {
return sInstance;
}
SizedString<64> getLabel() const {
return mNameCopy;
}
bool fn_80117310() const;
void fn_80117360();
void fn_80117380();
const char *fn_80117390(bool) const;
// This function appears to be related to a compiler quirk.
// 0x800D7B40 is in d_lyt_meter, but calling a static method
// on an instance via dLytMsgWindow_c::getInstance()->fn_800D7B40()
// causes the method to be emitted there.
static u16 fn_800D7B40() {
return sInstance->mEntryPointToTrigger;
}
dTagProcessor_c *getTagProcessor() const {
return mpTagProcessor;
}
s32 getMsgIdx() const {
return mMsgIdx;
}
u8 getField_0x80D() const {
return field_0x80D;
}
u8 getField_0x815() const {
return field_0x815;
}
u8 getField_0x81B() const {
return field_0x81B;
}
s32 getTextOptionSelection() const {
return mTextOptionSelection;
}
void enableChangeBtn(u16 flag) {
mValidChangeBtnMask |= flag;
}
private:
bool setTextToDisplay(const wchar_t *text);
void createSubMsgManager(u8 type);
void removeSubMsgManagers();
bool checkChangeBtnTrig();
static dLytMsgWindow_c *sInstance;
static dFlowMgrBase_c *sFlowMgr;
STATE_FUNC_DECLARE(dLytMsgWindow_c, Invisible);
STATE_FUNC_DECLARE(dLytMsgWindow_c, In);
STATE_FUNC_DECLARE(dLytMsgWindow_c, OutputText);
STATE_FUNC_DECLARE(dLytMsgWindow_c, WaitKeyChangePage0);
STATE_FUNC_DECLARE(dLytMsgWindow_c, WaitKeyChangePage1);
STATE_FUNC_DECLARE(dLytMsgWindow_c, WaitKeyMsgEnd0);
STATE_FUNC_DECLARE(dLytMsgWindow_c, WaitKeyMsgEnd1);
STATE_FUNC_DECLARE(dLytMsgWindow_c, WaitKeyMsgEnd2);
STATE_FUNC_DECLARE(dLytMsgWindow_c, WaitKeySelectQuestion);
STATE_FUNC_DECLARE(dLytMsgWindow_c, MapOpen);
STATE_FUNC_DECLARE(dLytMsgWindow_c, WaitKeyMapClose);
STATE_FUNC_DECLARE(dLytMsgWindow_c, MapClose);
STATE_FUNC_DECLARE(dLytMsgWindow_c, Out);
STATE_FUNC_DECLARE(dLytMsgWindow_c, ExplainIn);
STATE_FUNC_DECLARE(dLytMsgWindow_c, ExplainVisible);
STATE_FUNC_DECLARE(dLytMsgWindow_c, ExplainOut);
STATE_FUNC_DECLARE(dLytMsgWindow_c, DemoIn);
STATE_FUNC_DECLARE(dLytMsgWindow_c, DemoVisible);
STATE_FUNC_DECLARE(dLytMsgWindow_c, DemoOut);
/* 0x004 */ UI_STATE_MGR_DECLARE(dLytMsgWindow_c);
/* 0x040 */ d2d::ResAccIf_c mResAcc1;
/* 0x3B0 */ d2d::ResAccIf_c mResAcc2;
/* 0x720 */ TextWindowUnk *mpMsgWindowUnk;
/* 0x724 */ dTagProcessor_c *mpTagProcessor;
/* 0x728 */ dLytMsgWindowSubtype *mpCurrentSubtype;
/* 0x72C */ dLytMsgWindowTalk_c *mpWindowTalk;
/* 0x730 */ dLytMsgWindowLink_c *mpWindowLink;
/* 0x734 */ dLytMsgWindowSword_c *mpWindowSword;
/* 0x738 */ dLytMsgWindowWood_c *mpWindowWood;
/* 0x73C */ dLytMsgWindowStone_c *mpWindowStone;
/* 0x740 */ dLytMsgWindowGet_c *mpWindowGet;
/* 0x744 */ dLytMsgWindowDemo_c *mpWindowDemo;
/* 0x748 */ dLytAutoExplain_c *mpAutoExplain;
/* 0x74C */ dLytAutoCaption_c *mpAutoCaption;
/* 0x750 */ u8 _0x750[0x75C - 0x750];
/* 0x75C */ mVec3_c field_0x75C;
/* 0x768 */ mVec3_c field_0x768;
/* 0x774 */ s32 field_0x774;
/* 0x778 */ s32 field_0x778;
/* 0x77C */ s32 field_0x77C;
/* 0x780 */ s32 field_0x780;
/* 0x784 */ s32 mMsgIdx;
/* 0x788 */ u16 mEntryPointToTrigger;
/* 0x78A */ u16 mAlsoEntryPointToTrigger;
/* 0x78C */ SizedString<0x40> mName;
/* 0x7CC */ SizedString<0x40> mNameCopy;
/* 0x80C */ u8 field_0x80C;
/* 0x80D */ u8 field_0x80D;
/* 0x80E */ u8 field_0x80E;
/* 0x80F */ u8 mShowAutoMessage;
/* 0x810 */ u8 field_0x810;
/* 0x811 */ u8 field_0x811;
/* 0x812 */ u8 field_0x812;
/* 0x813 */ u8 field_0x813;
/* 0x814 */ u8 field_0x814;
/* 0x815 */ u8 field_0x815;
/* 0x816 */ u8 field_0x816;
/* 0x817 */ u8 field_0x817;
/* 0x818 */ u8 field_0x818;
/* 0x819 */ u8 field_0x819;
/* 0x81A */ u8 field_0x81A;
/* 0x81B */ u8 field_0x81B;
/* 0x81C */ u8 field_0x81C;
/* 0x81D */ u8 field_0x81D;
/* 0x81E */ u8 field_0x81E;
/* 0x820 */ u16 mValidChangeBtnMask;
/* 0x824 */ s32 mNumOptions;
/* 0x828 */ dLytMsgWindowCharData *field_0x828;
/* 0x82C */ u32 mTextOptionSelection;
/* 0x830 */ u32 mSpecialFiMenuValue;
/* 0x834 */ dLytMsgWindowSelectBtn_c mSelectBtn;
/* 0x1208 */ SizedString<8> mCurrentEntrypointName;
/* 0x1210 */ SizedString<16> mCurrentFlowFileName;
/* 0x1220 */ u8 field_0x1220;
};
#endif
|