Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_event_data.h
Go to the documentation of this file.
1#ifndef D_EVENT_D_EVENT_DATA_H
2#define D_EVENT_D_EVENT_DATA_H
3
4#include "global.h"
5
6class msg_class;
7
9 /* 0x00 */ u32 eventTop; // offset to Event chunk
10 /* 0x04 */ s32 eventNum;
11 /* 0x08 */ u32 staffTop; // offset to Staff chunk
12 /* 0x0C */ s32 staffNum;
13 /* 0x10 */ u32 cutTop; // offset to Cut chunk
14 /* 0x14 */ s32 cutNum;
15 /* 0x18 */ u32 dataTop; // offset to Data chunk
16 /* 0x1C */ s32 dataNum;
17 /* 0x20 */ u32 fDataTop; // offset to FData chunk
18 /* 0x24 */ s32 fDataNum;
19 /* 0x28 */ u32 iDataTop; // offset to IData chunk
20 /* 0x2C */ s32 iDataNum;
21 /* 0x30 */ u32 sDataTop; // offset to SData chunk
22 /* 0x34 */ s32 sDataNum;
23 /* 0x38 */ u8 unk[8];
24}; // Size: 0x40
25
27public:
28 enum DataType {
29 /* 0x0 */ TYPE_FLOAT,
30 /* 0x1 */ TYPE_VEC,
31 /* 0x3 */ TYPE_INT = 3,
32 /* 0x4 */ TYPE_STRING
33 };
34
35 int getIndex() { return mDataIndex; }
36 int getNumber() { return mNumber; }
37 int getType() { return mType; }
38 int getNext() { return mNext; }
39 char* getName() { return mName; }
40
41 /* 0x00 */ char mName[32];
42 /* 0x20 */ u32 mIndex;
43 /* 0x24 */ int mType;
44 /* 0x28 */ int mDataIndex;
45 /* 0x2C */ int mNumber;
46 /* 0x30 */ int mNext;
47 /* 0x34 */ u8 field_0x34[12];
48}; // Size: 0x40
49
51public:
52 int startCheck();
53
54 int getDataTop() { return mDataTop; }
55 int getFlagId() { return mFlagId; }
56 char* getName() { return mName; }
57 int getNext() { return mNext; }
58 int getStartFlag(int idx) { return mFlags[idx]; }
59
60private:
61 /* 0x00 */ char mName[32];
62 /* 0x20 */ u32 mTagID;
63 /* 0x24 */ u32 mIndex;
64 /* 0x28 */ int mFlags[3];
65 /* 0x34 */ u32 mFlagId;
66 /* 0x38 */ int mDataTop;
67 /* 0x3C */ int mNext;
68 /* 0x40 */ u8 field_0x40[0x10];
69}; // Size: 0x50
70
72public:
73 enum StaffType {
74 /* 0x0 */ TYPE_DEFAULT,
75 /* 0x1 */ TYPE_ALL,
76 /* 0x2 */ TYPE_CAMERA,
77 /* 0x3 */ TYPE_EFFECT,
78 /* 0x4 */ TYPE_TIMEKEEPER,
79 /* 0x6 */ TYPE_DIRECTOR = 6,
80 /* 0x7 */ TYPE_MESSAGE,
81 /* 0x8 */ TYPE_SOUND,
82 /* 0x9 */ TYPE_LIGHT,
83 /* 0xB */ TYPE_PACKAGE = 11,
84 /* 0xC */ TYPE_CREATE,
85 };
86
87 struct StaffWork {
88 unsigned int _0;
90 unsigned int mMsgNo;
93 };
94
95 struct MessageData {
97 };
98
99 struct SoundData {
102 };
103
106 };
107
112
113 struct EffectData {
114 u8 pad[8];
116 };
117
118 void specialProc_WaitStart(int index);
119 void specialProc_WaitProc(int);
120 void specialProc();
121 void init();
122 void advanceCut(int cut);
123 void specialProcLight();
124 void specialProcMessage();
125 void specialProcSound();
126 void specialProcCreate();
127 void specialProcDirector();
128 void specialProcPackage();
130 void specialProcEffect();
131
132 int getType() { return mType; }
133 char* getName() { return mName; }
134 int getCurrentCut() { return mCurrentCut; }
135 int getStartCut() { return mStartCut; }
136
137 // private:
138 /* 0x00 */ char mName[8];
139 /* 0x08 */ StaffWork mWork;
140 /* 0x0C */ u8 field_0x1C[0x20 - 0x1C];
141 /* 0x20 */ s32 mTagID;
142 /* 0x24 */ u32 mIndex;
143 /* 0x28 */ u32 mFlagID;
144 /* 0x2C */ int mType;
145 /* 0x30 */ int mStartCut;
146 /* 0x34 */ u8 field_0x34[2];
147 /* 0x36 */ s16 mWaitTimer;
148 /* 0x38 */ int mCurrentCut;
149 /* 0x3C */ s32 field_0x3c;
150 /* 0x40 */ bool field_0x40;
151 /* 0x41 */ bool field_0x41;
152 /* 0x42 */ u8 mData[0x50 - 0x42];
153}; // Size: 0x50
154
156
158public:
159 int finishCheck();
160 int forceFinish();
162 int getNStaff() { return mNStaff; }
163 int getStaff(int idx) { return mStaff[idx]; }
164 char* getName() { return mName; }
165 int getPriority() { return mPriority; }
166
167 /* 0x00 */ char mName[32];
168 /* 0x20 */ u32 mIndex;
169 /* 0x24 */ int field_0x24;
170 /* 0x28 */ int mPriority;
171 /* 0x2C */ int mStaff[20];
172 /* 0x7C */ int mNStaff;
173 /* 0x80 */ u8 field_0x80[4];
174 /* 0x84 */ int field_0x84;
175 /* 0x88 */ int field_0x88[3];
176 /* 0x94 */ bool mPlaySound;
177 /* 0x95 */ u8 field_0x95[0xF];
178 /* 0xA4 */ int mEventState;
179 /* 0xA8 */ u8 field_0xa8[8];
180}; // Size: 0xB0
181
183public:
185 BOOL flagCheck(int flag);
186 BOOL flagSet(int flag);
188 void init();
189
190#define FlagMax 0x2800
191
192private:
194}; // Size = 0x500
195
197public:
200 int init();
201 int init(char* p_data, int roomNo);
204
206 dEvDtStaff_c* getStaffP(int i) { return &mStaffP[i]; }
207 dEvDtEvent_c* getEventP(int i) { return &mEventP[i]; }
208 dEvDtData_c* getDataP(int i) { return &mDataP[i]; }
209 dEvDtCut_c* getCutP(int i) { return &mCutP[i]; }
210 char* getEventName(int i) { return mEventP[i].getName(); }
213 int getStaffStartCut(int i) { return mStaffP[i].getStartCut(); }
215 int* getIDataP(int i) { return &mIDataP[i]; }
216 f32* getFDataP(int i) { return &mFDataP[i]; }
217 char* getSDataP(int i) { return &mSDataP[i]; }
232 s32 roomNo() { return mRoomNo; }
233
241 void setSDataP(char* p_sdata) { mSDataP = p_sdata; }
242
243 // private:
247 /* 0x0C */ dEvDtCut_c* mCutP;
248 /* 0x10 */ dEvDtData_c* mDataP;
249 /* 0x14 */ f32* mFDataP;
250 /* 0x18 */ int* mIDataP;
251 /* 0x1C */ char* mSDataP;
252 /* 0x20 */ s32 mRoomNo;
253}; // Size = 0x24
254
255STATIC_ASSERT(sizeof(dEvDtBase_c) == 0x24);
256
257#endif /* D_EVENT_D_EVENT_DATA_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition d_event_data.h:196
char * getSDataP(int i)
Definition d_event_data.h:217
dEvDtCut_c * mCutP
Definition d_event_data.h:247
dEvDtEvent_c * getEventP(int i)
Definition d_event_data.h:207
dEvDtData_c * mDataP
Definition d_event_data.h:248
void setStaffP(dEvDtStaff_c *p_staff)
Definition d_event_data.h:236
s32 getDataNum()
Definition d_event_data.h:225
s32 roomNo()
Definition d_event_data.h:232
dEvDtCut_c * getCutStaffStartCutP(int i)
Definition d_event_data.h:214
dEvDtCut_c * getCutStaffCurrentCutP(int i)
Definition d_event_data.h:212
s32 getCutNum()
Definition d_event_data.h:223
void setIDataP(int *p_idata)
Definition d_event_data.h:240
void setSDataP(char *p_sdata)
Definition d_event_data.h:241
void setCutP(dEvDtCut_c *p_cut)
Definition d_event_data.h:237
char * mSDataP
Definition d_event_data.h:251
s32 getIDataNum()
Definition d_event_data.h:229
void setDataP(dEvDtData_c *p_data)
Definition d_event_data.h:238
u32 getIDataTop()
Definition d_event_data.h:228
s32 getEventNum()
Definition d_event_data.h:219
s32 mRoomNo
Definition d_event_data.h:252
s32 getSDataNum()
Definition d_event_data.h:231
dEvDtCut_c * getCutP(int i)
Definition d_event_data.h:209
char * getEventName(int i)
Definition d_event_data.h:210
s32 getFDataNum()
Definition d_event_data.h:227
u32 getCutTop()
Definition d_event_data.h:222
void setEventP(dEvDtEvent_c *p_event)
Definition d_event_data.h:235
int init()
Definition d_event_data.cpp:1210
int * mIDataP
Definition d_event_data.h:250
dEvDtData_c * getDataP(int i)
Definition d_event_data.h:208
event_binary_data_header * getHeaderP()
Definition d_event_data.h:205
dEvDtStaff_c * getStaffP(int i)
Definition d_event_data.h:206
int * getIDataP(int i)
Definition d_event_data.h:215
u32 getFDataTop()
Definition d_event_data.h:226
u32 getSDataTop()
Definition d_event_data.h:230
u32 getDataTop()
Definition d_event_data.h:224
void setFDataP(f32 *p_fdata)
Definition d_event_data.h:239
int getStaffStartCut(int i)
Definition d_event_data.h:213
void setHeaderP(event_binary_data_header *p_header)
Definition d_event_data.h:234
dEvDtEvent_c * mEventP
Definition d_event_data.h:245
dEvDtStaff_c * mStaffP
Definition d_event_data.h:246
void advanceCut(dEvDtEvent_c *p_event)
Definition d_event_data.cpp:1265
f32 * mFDataP
Definition d_event_data.h:249
event_binary_data_header * mHeaderP
Definition d_event_data.h:244
s32 getStaffNum()
Definition d_event_data.h:221
f32 * getFDataP(int i)
Definition d_event_data.h:216
u32 getStaffTop()
Definition d_event_data.h:220
~dEvDtBase_c()
Definition d_event_data.h:199
dEvDtBase_c()
Definition d_event_data.h:198
u32 getEventTop()
Definition d_event_data.h:218
BOOL advanceCutLocal(dEvDtStaff_c *p_staff)
Definition d_event_data.cpp:1273
int getStaffCurrentCut(int i)
Definition d_event_data.h:211
Definition d_event_data.h:50
int getFlagId()
Definition d_event_data.h:55
u32 mIndex
Definition d_event_data.h:63
u32 mTagID
Definition d_event_data.h:62
u32 mFlagId
Definition d_event_data.h:65
int getStartFlag(int idx)
Definition d_event_data.h:58
int startCheck()
Definition d_event_data.cpp:1191
int mDataTop
Definition d_event_data.h:66
int mFlags[3]
Definition d_event_data.h:64
int getNext()
Definition d_event_data.h:57
int getDataTop()
Definition d_event_data.h:54
int mNext
Definition d_event_data.h:67
char * getName()
Definition d_event_data.h:56
char mName[32]
Definition d_event_data.h:61
u8 field_0x40[0x10]
Definition d_event_data.h:68
Definition d_event_data.h:26
int getType()
Definition d_event_data.h:37
char mName[32]
Definition d_event_data.h:41
int getNext()
Definition d_event_data.h:38
char * getName()
Definition d_event_data.h:39
int mNumber
Definition d_event_data.h:45
int getNumber()
Definition d_event_data.h:36
int mType
Definition d_event_data.h:43
u8 field_0x34[12]
Definition d_event_data.h:47
int mDataIndex
Definition d_event_data.h:44
u32 mIndex
Definition d_event_data.h:42
int getIndex()
Definition d_event_data.h:35
DataType
Definition d_event_data.h:28
@ TYPE_VEC
Definition d_event_data.h:30
@ TYPE_STRING
Definition d_event_data.h:32
@ TYPE_INT
Definition d_event_data.h:31
@ TYPE_FLOAT
Definition d_event_data.h:29
int mNext
Definition d_event_data.h:46
Definition d_event_data.h:157
int field_0x24
Definition d_event_data.h:169
u8 field_0xa8[8]
Definition d_event_data.h:179
char mName[32]
Definition d_event_data.h:167
bool mPlaySound
Definition d_event_data.h:176
int field_0x84
Definition d_event_data.h:174
int getPriority()
Definition d_event_data.h:165
u8 field_0x80[4]
Definition d_event_data.h:173
int getStaff(int idx)
Definition d_event_data.h:163
char * getName()
Definition d_event_data.h:164
int mNStaff
Definition d_event_data.h:172
int field_0x88[3]
Definition d_event_data.h:175
int mEventState
Definition d_event_data.h:178
int mPriority
Definition d_event_data.h:170
int mStaff[20]
Definition d_event_data.h:171
u8 field_0x95[0xF]
Definition d_event_data.h:177
int forceFinish()
Definition d_event_data.cpp:286
int finishCheck()
Definition d_event_data.cpp:271
int getNStaff()
Definition d_event_data.h:162
u32 mIndex
Definition d_event_data.h:168
void specialStaffProc(dEvDtStaff_c *p_staff)
Definition d_event_data.cpp:300
Definition d_event_data.h:182
u32 mFlags[320]
Definition d_event_data.h:193
BOOL flagSet(int flag)
Definition d_event_data.cpp:243
dEvDtFlag_c()
Definition d_event_data.h:184
void init()
Definition d_event_data.cpp:264
BOOL flagCheck(int flag)
Definition d_event_data.cpp:230
BOOL flagMaxCheck(int flag)
Definition d_event_data.cpp:252
Definition d_event_data.h:71
int getType()
Definition d_event_data.h:132
void specialProcMessage()
Definition d_event_data.cpp:421
int mStartCut
Definition d_event_data.h:145
int mCurrentCut
Definition d_event_data.h:148
u8 field_0x1C[0x20 - 0x1C]
Definition d_event_data.h:140
s32 field_0x3c
Definition d_event_data.h:149
u32 mFlagID
Definition d_event_data.h:143
void specialProcCreate()
Definition d_event_data.cpp:656
char mName[8]
Definition d_event_data.h:138
StaffType
Definition d_event_data.h:73
@ TYPE_DEFAULT
Definition d_event_data.h:74
@ TYPE_MESSAGE
Definition d_event_data.h:80
@ TYPE_TIMEKEEPER
Definition d_event_data.h:78
@ TYPE_EFFECT
Definition d_event_data.h:77
@ TYPE_LIGHT
Definition d_event_data.h:82
@ TYPE_SOUND
Definition d_event_data.h:81
@ TYPE_CREATE
Definition d_event_data.h:84
@ TYPE_PACKAGE
Definition d_event_data.h:83
@ TYPE_ALL
Definition d_event_data.h:75
@ TYPE_CAMERA
Definition d_event_data.h:76
@ TYPE_DIRECTOR
Definition d_event_data.h:79
int getCurrentCut()
Definition d_event_data.h:134
void specialProcLight()
Definition d_event_data.cpp:380
bool field_0x41
Definition d_event_data.h:151
s32 mTagID
Definition d_event_data.h:141
void specialProcSound()
Definition d_event_data.cpp:604
u32 mIndex
Definition d_event_data.h:142
void specialProc()
Definition d_event_data.cpp:326
u8 mData[0x50 - 0x42]
Definition d_event_data.h:152
int getStartCut()
Definition d_event_data.h:135
char * getName()
Definition d_event_data.h:133
void advanceCut(int cut)
Definition d_event_data.cpp:371
StaffWork mWork
Definition d_event_data.h:139
void init()
Definition d_event_data.cpp:360
void specialProc_WaitProc(int)
Definition d_event_data.cpp:317
void specialProcTimekeeper()
Definition d_event_data.cpp:1020
void specialProcPackage()
Definition d_event_data.cpp:952
u8 field_0x34[2]
Definition d_event_data.h:146
void specialProcDirector()
Definition d_event_data.cpp:715
void specialProcEffect()
Definition d_event_data.cpp:1054
int mType
Definition d_event_data.h:144
bool field_0x40
Definition d_event_data.h:150
s16 mWaitTimer
Definition d_event_data.h:147
void specialProc_WaitStart(int index)
Definition d_event_data.cpp:307
Definition f_op_msg.h:9
STATIC_ASSERT(sizeof(dEvDtStaff_c)==0x50)
static volatile BOOL flag
Definition dspproc.cpp:20
int i
Definition e_pow.c:165
Definition d_event_data.h:108
s16 unk
Definition d_event_data.h:109
s16 unk2
Definition d_event_data.h:110
Definition d_event_data.h:113
s32 unk
Definition d_event_data.h:115
u8 pad[8]
Definition d_event_data.h:114
Definition d_event_data.h:95
s16 unk
Definition d_event_data.h:96
Definition d_event_data.h:99
s16 timer
Definition d_event_data.h:101
s16 unk
Definition d_event_data.h:100
Definition d_event_data.h:87
unsigned int _0
Definition d_event_data.h:88
unsigned int mMsgNo
Definition d_event_data.h:90
int * mMsgSubstanceP
Definition d_event_data.h:92
s32 mMsgSubstanceNum
Definition d_event_data.h:91
msg_class * mLMsg
Definition d_event_data.h:89
Definition d_event_data.h:104
s32 timer
Definition d_event_data.h:105
Definition d_event_data.h:8
u32 dataTop
Definition d_event_data.h:15
u32 fDataTop
Definition d_event_data.h:17
u32 cutTop
Definition d_event_data.h:13
u8 unk[8]
Definition d_event_data.h:23
u32 iDataTop
Definition d_event_data.h:19
u32 staffTop
Definition d_event_data.h:11
s32 staffNum
Definition d_event_data.h:12
s32 fDataNum
Definition d_event_data.h:18
s32 iDataNum
Definition d_event_data.h:20
u32 eventTop
Definition d_event_data.h:9
s32 dataNum
Definition d_event_data.h:16
u32 sDataTop
Definition d_event_data.h:21
s32 eventNum
Definition d_event_data.h:10
s32 sDataNum
Definition d_event_data.h:22
s32 cutNum
Definition d_event_data.h:14
int BOOL
Definition types.h:27
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
signed short s16
Definition types.h:5
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8