Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_event.h
Go to the documentation of this file.
1#ifndef D_EVENT_D_EVENT_H
2#define D_EVENT_D_EVENT_H
3
5
6int dEv_noFinishSkipProc(void*, int);
7
9class fopAc_ac_c;
10
11#ifdef DEBUG
13public:
14 /* 0x00 */ char* mFlagName;
15 /* 0x04 */ char* mFlagDescription;
16 /* 0x08 */ char* mFlagAuthor;
17 /* 0x0C */ u16 mFlagValue;
18 /* 0x10 */ char* mArea; // Area in the game where flag is used
19 /* 0x14 */ u8 field_0x14;
20 /* 0x15 */ u8 field_0x15;
21};
22
24public:
25 /* 0x00 */ char* mFlagName;
26 /* 0x04 */ char* mFlagDescription;
27 /* 0x08 */ char* mFlagAuthor;
28 /* 0x0C */ u16 mFlagValue;
29 /* 0x10 */ char* mArea; // Area in the game where flag is used
30 /* 0x14 */ u8 field_0x14;
31 /* 0x15 */ u8 field_0x15;
32};
33
35public:
38 /* 0x08 */ int mBitNum;
39 /* 0x0C */ int mRegNum;
40 /* 0x10 */ int field_0x10;
41 /* 0x14 */ int field_0x14;
42};
43#endif
44
46public:
49
50 /* 0x00 */ u16 mEventType;
51 /* 0x02 */ u16 mFlag;
52 /* 0x04 */ u16 mHindFlag;
53 /* 0x08 */ fopAc_ac_c* mActor1;
54 /* 0x0C */ fopAc_ac_c* mActor2;
55 /* 0x10 */ s16 mEventId;
56 /* 0x12 */ u16 mPriority;
57 /* 0x14 */ s8 mNextOrderIdx;
58 /* 0x15 */ u8 mEventInfoIdx;
59}; // Size = 0x18
60
61STATIC_ASSERT(sizeof(dEvt_order_c) == 0x18);
62
63typedef int (*SkipFunc)(void*, int);
64
66 /* 0x0 */ EVT_MODE_NONE,
67 /* 0x1 */ EVT_MODE_TALK,
68 /* 0x2 */ EVT_MODE_DEMO,
69 /* 0x3 */
70};
71
73 /* 0x0 */ EVT_TYPE_TALK,
74 /* 0x1 */ EVT_TYPE_DOOR,
75 /* 0x2 */ EVT_TYPE_OTHER,
78 /* 0x5 */ EVT_TYPE_ITEM,
81 /* 0xA */ EVT_TYPE_CATCH = 10,
83};
84
86 /* 0x0 */ STATUS_NONE,
87};
88
89class dEvt_control_c {
90public:
92 s32 orderOld(u16 eventType, u16 priority, u16 flag, u16 param_3, void* param_4, void* param_5,
93 void const* param_6);
94 s32 order(u16 eventType, u16 priority, u16 flag, u16 param_3, void* param_4, void* param_5,
95 s16 eventID, u8 infoIdx);
103 int talkEnd();
105 int demoEnd();
109 int endProc();
110 int change();
111 int entry();
112 void reset(void*);
113 void reset();
114 void clearSkipSystem();
115 char* getSkipEventName();
116 void setSkipProc(void*, SkipFunc, int);
117 void setSkipZev(void*, char*);
119 void offSkipFade();
120 bool skipper();
121 int Step();
122 int moveApproval(void*);
123 BOOL compulsory(void*, char const*, u16);
124 void remove();
126 void sceneChange(int exitId);
127 u32 getPId(void*);
129 void* getStbDemoData(char* resName);
132 s16 runningEventID(s16 eventID);
133 void setPt1(void* ptr);
134 void setPt2(void* ptr);
135 void setPtT(void* ptr);
136 void setPtI(void* ptr);
137 void setPtI_Id(fpc_ProcID id);
138 void setPtD(void* ptr);
139 void setGtItm(u8 itemNo);
140
142 BOOL runCheck() { return mEventStatus != 0; }
147 u8 getMode() const { return mMode; }
153 void onFlag2(u16 flag) { mFlag2 |= flag; }
155 void setCullRate(f32 f) { mCullRate = f; }
156 BOOL chkTalkXY() { return field_0xed == 1 || field_0xed == 2; }
157
158 BOOL isOrderOK() { return mEventStatus == 0 || mEventStatus == 2; }
164 bool isChangeOK(void* param_0) { return mChangeOK == param_0; }
166 u8 getGtItm() { return mGtItm; }
168 bool checkSkipEdge() { return chkFlag2(8) != false; }
169
170public:
171 /* 0x000 */ u8 field_0x0[4];
172 /* 0x004 */ dEvt_order_c mOrder[8];
173 /* 0x0C4 */ fpc_ProcID mPt1;
174 /* 0x0C8 */ fpc_ProcID mPt2;
175 /* 0x0CC */ fpc_ProcID mPtT;
176 /* 0x0D0 */ fpc_ProcID mPtI;
177 /* 0x0D4 */ fpc_ProcID mPtd;
178 /* 0x0D8 */ u16 mEventFlag;
179 /* 0x0DA */ u16 mFlag2;
180 /* 0x0DC */ u16 mHindFlag;
181 /* 0x0DE */ s16 mSpecifiedEvent; // name maybe wrong
182 /* 0x0E0 */ s16 mEventID;
183 /* 0x0E2 */ s8 mNum;
184 /* 0x0E3 */ s8 mOrderIdx;
185 /* 0x0E4 */ u8 mMode;
186 /* 0x0E5 */ u8 mEventStatus;
187 /* 0x0E6 */ u8 field_0xe6;
188 /* 0x0E7 */ u8 field_0xe7;
189 /* 0x0E8 */ u8 field_0xe8;
190 /* 0x0E9 */ u8 mDebugStb;
191 /* 0x0EA */ u8 field_0xea;
192 /* 0x0EB */ u8 mMapToolId;
193 /* 0x0EC */ u8 field_0xec;
194 /* 0x0ED */ u8 field_0xed;
195 /* 0x0EE */ u8 mPreItemNo;
196 /* 0x0EF */ u8 mGtItm;
197 /* 0x0F0 */ f32 mCullRate;
199 /* 0x0F8 */ void* mChangeOK;
200 /* 0x0FC */ u8 field_0xfc[4];
201 /* 0x100 */ SkipFunc mSkipFunc;
202 /* 0x104 */ u32 field_0x104;
203 /* 0x108 */ int mSkipTimer;
204 /* 0x10C */ int field_0x10c;
205 /* 0x110 */ int mSkipFade;
206 /* 0x114 */ char mSkipEventName[20];
207 /* 0x128 */ u8 mCompulsory;
208 /* 0x129 */ bool mRoomInfoSet;
209 /* 0x12C */ int mRoomNo;
210}; // Size = 0x130
211
212int dEv_defaultSkipProc(void* param_0, int param_1);
213int dEv_defaultSkipZev(void* param_0, int param_1);
214int dEv_defaultSkipStb(void* param_0, int param_1);
215int dEv_noFinishSkipProc(void* param_0, int param_1);
216
217#endif /* D_EVENT_D_EVENT_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition d_event.h:12
char * mFlagAuthor
Definition d_event.h:16
u8 field_0x14
Definition d_event.h:19
char * mArea
Definition d_event.h:18
char * mFlagDescription
Definition d_event.h:15
u8 field_0x15
Definition d_event.h:20
u16 mFlagValue
Definition d_event.h:17
char * mFlagName
Definition d_event.h:14
Definition d_event.h:34
int mBitNum
Definition d_event.h:38
dEvDb_bit_c * mBitTable
Definition d_event.h:36
int mRegNum
Definition d_event.h:39
dEvDb_reg_c * mRegTable
Definition d_event.h:37
int field_0x14
Definition d_event.h:41
int field_0x10
Definition d_event.h:40
Definition d_event.h:23
u16 mFlagValue
Definition d_event.h:28
u8 field_0x15
Definition d_event.h:31
char * mFlagAuthor
Definition d_event.h:27
u8 field_0x14
Definition d_event.h:30
char * mFlagDescription
Definition d_event.h:26
char * mFlagName
Definition d_event.h:25
char * mArea
Definition d_event.h:29
Definition d_event.h:45
s8 mNextOrderIdx
Definition d_event.h:57
~dEvt_order_c()
Definition d_event.h:47
s16 mEventId
Definition d_event.h:55
u16 mHindFlag
Definition d_event.h:52
u8 mEventInfoIdx
Definition d_event.h:58
fopAc_ac_c * mActor1
Definition d_event.h:53
fopAc_ac_c * mActor2
Definition d_event.h:54
dEvt_order_c()
Definition d_event.cpp:80
u16 mEventType
Definition d_event.h:50
u16 mFlag
Definition d_event.h:51
u16 mPriority
Definition d_event.h:56
static SECTION_RODATA u32 const itemNo
Definition d_a_obj_poFire.cpp:380
int dEv_noFinishSkipProc(void *, int)
Definition d_event.cpp:729
EventMode
Definition d_event.h:65
@ EVT_MODE_DEMO
Definition d_event.h:68
@ EVT_MODE_NONE
Definition d_event.h:66
@ EVT_MODE_TALK
Definition d_event.h:67
int dEv_defaultSkipProc(void *param_0, int param_1)
Definition d_event.cpp:635
int dEv_defaultSkipStb(void *param_0, int param_1)
Definition d_event.cpp:684
EventType
Definition d_event.h:72
@ EVT_TYPE_TALK
Definition d_event.h:73
@ EVT_TYPE_DOOR
Definition d_event.h:74
@ EVT_TYPE_OTHER
Definition d_event.h:75
@ EVT_TYPE_ITEM
Definition d_event.h:78
@ EVT_TYPE_SHOWITEM_Y
Definition d_event.h:80
@ EVT_TYPE_COMPULSORY
Definition d_event.h:76
@ EVT_TYPE_POTENTIAL
Definition d_event.h:77
@ EVT_TYPE_CATCH
Definition d_event.h:81
@ EVT_TYPE_SHOWITEM_X
Definition d_event.h:79
@ EVT_TYPE_TREASURE
Definition d_event.h:82
int dEv_defaultSkipZev(void *param_0, int param_1)
Definition d_event.cpp:641
STATIC_ASSERT(sizeof(dEvt_order_c)==0x18)
EventStatus
Definition d_event.h:85
@ STATUS_NONE
Definition d_event.h:86
int(* SkipFunc)(void *, int)
Definition d_event.h:63
static volatile BOOL flag
Definition dspproc.cpp:20
unsigned int fpc_ProcID
Definition f_pc_base.h:10
Definition d_a_ep.cpp:81
fpc_ProcID mPt1
Definition d_event.h:173
int mSkipTimer
Definition d_event.h:203
u16 mFlag2
Definition d_event.h:179
bool mRoomInfoSet
Definition d_event.h:208
int field_0x10c
Definition d_event.h:204
bool isChangeOK(void *param_0)
Definition d_event.h:164
s32 beforeFlagProc(dEvt_order_c *p_order)
Definition d_event.cpp:198
fopAc_ac_c * getPtI()
Definition d_event.h:162
u8 field_0xe6
Definition d_event.h:187
void setGtItm(u8 itemNo)
Definition d_event.cpp:1216
void setPt1(void *ptr)
Definition d_event.cpp:1192
void setPtD(void *ptr)
Definition d_event.cpp:1212
void setCullRate(f32 f)
Definition d_event.h:155
u8 field_0xe7
Definition d_event.h:188
void startCheckSkipEdge(void *param_0)
Definition d_event.h:167
int commonCheck(dEvt_order_c *p_order, u16 condition, u16 command)
Definition d_event.cpp:222
fopAc_ac_c * getPtT()
Definition d_event.h:161
u8 field_0xec
Definition d_event.h:193
void reset(void *)
int doorCheck(dEvt_order_c *p_order)
Definition d_event.cpp:438
s16 mSpecifiedEvent
Definition d_event.h:181
void onFlag2(u16 flag)
Definition d_event.h:153
void * mChangeOK
Definition d_event.h:199
u8 mEventStatus
Definition d_event.h:186
u8 getMapToolId()
Definition d_event.h:152
void setPtT(void *ptr)
Definition d_event.cpp:1200
u8 mMode
Definition d_event.h:185
u16 mHindFlag
Definition d_event.h:180
dEvt_control_c()
Definition d_event.cpp:76
void * getStbDemoData(char *resName)
Definition d_event.cpp:1087
int talkCheck(dEvt_order_c *p_order)
Definition d_event.cpp:239
u8 mGtItm
Definition d_event.h:196
u8 mDebugStb
Definition d_event.h:190
s16 runningEventID(s16 eventID)
Definition d_event.cpp:1188
int Step()
Definition d_event.cpp:839
dStage_MapEvent_dt_c * mStageEventDt
Definition d_event.h:198
int demoCheck(dEvt_order_c *p_order)
Definition d_event.cpp:358
u16 chkEventFlag(u16 flag)
Definition d_event.h:144
void clearSkipSystem()
Definition d_event.cpp:622
char * getSkipEventName()
Definition d_event.cpp:734
dEvt_order_c mOrder[8]
Definition d_event.h:172
u8 field_0xed
Definition d_event.h:194
u16 checkHind(u16 flag)
Definition d_event.h:150
fopAc_ac_c * convPId(fpc_ProcID)
Definition d_event.cpp:1081
int change()
Definition d_event.cpp:512
u8 field_0xfc[4]
Definition d_event.h:200
void afterFlagProc(dEvt_order_c *p_order)
Definition d_event.cpp:214
fpc_ProcID mPt2
Definition d_event.h:174
u8 field_0xe8
Definition d_event.h:189
u32 field_0x104
Definition d_event.h:202
u8 field_0xea
Definition d_event.h:191
fopAc_ac_c * getPt2()
Definition d_event.h:160
fpc_ProcID mPtd
Definition d_event.h:177
s16 mEventID
Definition d_event.h:182
u16 mEventFlag
Definition d_event.h:178
u8 field_0x0[4]
Definition d_event.h:171
s8 mNum
Definition d_event.h:183
void setParam(dEvt_order_c *p_order)
Definition d_event.cpp:153
u8 getMode() const
Definition d_event.h:147
BOOL isOrderOK()
Definition d_event.h:158
s32 orderOld(u16 eventType, u16 priority, u16 flag, u16 param_3, void *param_4, void *param_5, void const *param_6)
Definition d_event.cpp:84
int moveApproval(void *)
Definition d_event.cpp:958
static dStage_MapEvent_dt_c * searchMapEventData(u8 mapToolID, s32 roomNo)
Definition d_event.cpp:1158
f32 getCullRate()
Definition d_event.h:143
fpc_ProcID mPtI
Definition d_event.h:176
int demoEnd()
Definition d_event.cpp:404
int mSkipFade
Definition d_event.h:205
void setSkipZev(void *, char *)
void onHindFlag(u16 flag)
Definition d_event.h:148
void setPtI_Id(fpc_ProcID id)
Definition d_event.cpp:1208
s8 mOrderIdx
Definition d_event.h:184
int catchCheck(dEvt_order_c *p_order)
Definition d_event.cpp:309
int talkXyCheck(dEvt_order_c *p_order)
Definition d_event.cpp:269
void setPtI(void *ptr)
Definition d_event.cpp:1204
char mSkipEventName[20]
Definition d_event.h:206
BOOL runCheck()
Definition d_event.h:142
int endProc()
Definition d_event.cpp:487
f32 mCullRate
Definition d_event.h:197
void offSkipFade()
Definition d_event.cpp:753
u8 checkCompulsory()
Definition d_event.h:151
bool skipper()
Definition d_event.cpp:761
int potentialCheck(dEvt_order_c *p_order)
Definition d_event.cpp:422
BOOL chkTalkXY()
Definition d_event.h:156
bool checkSkipEdge()
Definition d_event.h:168
fopAc_ac_c * getPt1()
Definition d_event.h:159
u8 getGtItm()
Definition d_event.h:166
u8 mPreItemNo
Definition d_event.h:195
BOOL compulsory(void *, char const *, u16)
Definition d_event.cpp:1027
u8 mCompulsory
Definition d_event.h:207
void offFlag2(u16 flag)
Definition d_event.h:154
int mRoomNo
Definition d_event.h:209
void offEventFlag(u16 flag)
Definition d_event.h:146
void remove()
Definition d_event.cpp:1038
void onEventFlag(u16 flag)
Definition d_event.h:145
SkipFunc mSkipFunc
Definition d_event.h:201
dStage_MapEvent_dt_c * getStageEventDt()
Definition d_event.cpp:1064
u16 chkFlag2(u16 flag)
Definition d_event.h:141
void sceneChange(int exitId)
Definition d_event.cpp:1068
u8 getPreItemNo()
Definition d_event.h:165
fpc_ProcID mPtT
Definition d_event.h:175
int talkEnd()
Definition d_event.cpp:333
u32 getPId(void *)
Definition d_event.cpp:1072
int entry()
Definition d_event.cpp:536
void setSkipProc(void *, SkipFunc, int)
Definition d_event.cpp:738
int itemCheck(dEvt_order_c *p_order)
Definition d_event.cpp:473
void setPt2(void *ptr)
u8 mMapToolId
Definition d_event.h:192
void offHindFlag(u16 flag)
Definition d_event.h:149
s32 order(u16 eventType, u16 priority, u16 flag, u16 param_3, void *param_4, void *param_5, s16 eventID, u8 infoIdx)
Definition d_event.cpp:91
fopAc_ac_c * getPtD()
Definition d_event.h:163
Definition d_stage.h:341
Definition d_a_ep.cpp:19
int BOOL
Definition types.h:27
signed char s8
Definition types.h:4
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8