Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
f_op_actor.h
Go to the documentation of this file.
1#ifndef F_OP_ACTOR_H_
2#define F_OP_ACTOR_H_
3
4#include "d/d_kankyo.h"
5#include "f_pc/f_pc_leaf.h"
6#include "global.h"
7
10 /* 0x14 */ u8 field_0x14[0xC]; // Likely padding
11};
12
20
21// Unclear what this is. Only appears in 4 profiles (BG,DSHUTTER,PATH,SCENE_EXIT)
26
28 fopAcStts_NOEXEC_e = 0x00000080,
29 fopAcStts_CULL_e = 0x00000100,
30 fopAcStts_FREEZE_e = 0x00000400,
31 fopAcStts_CARRY_e = 0x00002000,
32 fopAcStts_NOPAUSE_e = 0x00020000,
33 fopAcStts_NODRAW_e = 0x01000000,
34 fopAcStts_BOSS_e = 0x04000000,
35};
36
41 /* 3 */ fopAc_ENV_e, // is this correct?
42 /* 4 */ fopAc_NPC_e,
44};
45
51
84
96
97class JKRSolidHeap;
98
108
118
120public:
121 dEvt_info_c();
122 virtual ~dEvt_info_c() {}
123 void setEventName(char*);
124 char* getEventName();
125 void beforeProc();
126 void onCondition(u16);
131
132 void setCommand(u16 command) { mCommand = command; }
133 void setMapToolId(u8 id) { mMapToolId = id; }
134 void setEventId(s16 id) { mEventId = id; }
137 void setArchiveName(char* name) { mArchiveName = name; }
139 s16 getEventId() { return mEventId; }
140 s16 getIdx() { return mIndex; }
142 char* getArchiveName() { return mArchiveName; }
146
152
153 void suspendProc(void* actor) {
154 if (field_0x10 != NULL) {
156 }
157 }
158
159 /* 0x04 */ u16 mCommand;
160 /* 0x06 */ u16 mCondition;
161 /* 0x08 */ s16 mEventId;
162 /* 0x0A */ u8 mMapToolId;
163 /* 0x0B */ s8 mIndex;
164 /* 0x0C */ char* mArchiveName;
165 /* 0x10 */ u8 field_0x10;
166 /* 0x14 */ void (*field_0x14)(void*);
167}; // Size = 0x18
168
170 /* 0x00 */ cXyz pos;
171 /* 0x0C */ csXyz angle;
172 /* 0x12 */ s8 roomNo;
173 /* 0x13 */ u8 field_0x13;
174};
175
177 /* 0x00 */ u8 distances[9];
178 /* 0x0A */ s16 field_0xa;
179 /* 0x0C */ cXyz position;
180 /* 0x18 */ u32 flags;
181}; // Size = 0x1C
182
183class dJntCol_c;
184
186 /* 0x0 */ Vec center;
187 /* 0xC */ f32 radius;
188};
189
190struct cull_box {
191 /* 0x0 */ Vec min;
192 /* 0xC */ Vec max;
193};
194
195class fopAc_ac_c : public leafdraw_class {
196public:
197 /* 0x0C0 */ int actor_type;
201 /* 0x0F0 */ JKRSolidHeap* heap;
203 /* 0x10C */ dKy_tevstr_c tevStr;
204 /* 0x494 */ u16 setID;
205 /* 0x496 */ u8 group;
206 /* 0x497 */ u8 cullType;
207 /* 0x498 */ u8 demoActorID;
208 /* 0x499 */ s8 subtype;
209 /* 0x49A */ u8 carryType;
210 /* 0x49C */ u32 actor_status;
211 /* 0x4A0 */ u32 actor_condition;
213 /* 0x4A8 */ actor_place home;
214 /* 0x4BC */ actor_place old;
215 /* 0x4D0 */ actor_place current;
216 /* 0x4E4 */ csXyz shape_angle;
217 /* 0x4EC */ cXyz scale;
218 /* 0x4F8 */ cXyz speed;
219 /* 0x504 */ MtxP cullMtx;
220 union {
221 /* 0x508 */ cull_box box;
222 /* 0x508 */ cull_sphere sphere;
224 /* 0x520 */ f32 cullSizeFar;
225 /* 0x524 */ J3DModel* model;
226 /* 0x528 */ dJntCol_c* jntCol;
227 /* 0x52C */ f32 speedF;
228 /* 0x530 */ f32 gravity;
229 /* 0x534 */ f32 maxFallSpeed;
230 /* 0x538 */ cXyz eyePos;
232 /* 0x560 */ s16 field_0x560;
233 /* 0x562 */ s16 health;
234 /* 0x564 */ u8 field_0x564;
235 /* 0x565 */ u8 field_0x565;
236 /* 0x566 */ u8 field_0x566;
237 /* 0x567 */ s8 field_0x567;
238
241
243
245}; // Size: 0x568
246
247STATIC_ASSERT(sizeof(fopAc_ac_c) == 0x568);
248
249class fopEn_enemy_c : public fopAc_ac_c {
250public:
251 /* 80019404 */ bool initBallModel();
252 /* 800194FC */ bool checkBallModelDraw();
253 /* 80019520 */ void setBallModelEffect(dKy_tevstr_c*);
254 /* 800196A0 */ void drawBallModel(dKy_tevstr_c*);
255
256 bool checkWolfNoLock() const { return mFlags & 0x200; }
257 bool checkHeadLockFlg() const { return mFlags & 0x80; }
258 bool checkWolfBiteDamage() const { return mFlags & 0x40; }
259 bool checkDownFlg() const { return mFlags & 0x1; }
260 bool checkCutDownHitFlg() const { return mFlags & 0x2; }
261 bool checkDeadFlg() const { return mFlags & 0x8; }
262
265 cXyz& getDownPos() { return mDownPos; }
267
268 void onCutDownHitFlg() { mFlags |= 2; }
269 void onWolfBiteDamage() { mFlags |= 0x40; }
270 void onWolfDownStartFlg() { mFlags |= 0x14; }
271 void onWolfDownPullEndFlg() { mFlags |= 0x20; }
272 void onWolfNoLock() { mFlags |= 0x200; }
273 void onDownFlg() { mFlags |= 1; }
274 void onHeadLockFlg() { mFlags |= 0x80; }
275
276 void offWolfBiteDamage() { mFlags &= ~0x40; }
277 void offCutDownHitFlg() { mFlags &= ~0x2; }
278 void offWolfDownPullFlg() { mFlags &= ~0x10; }
279 void offDownFlg() { mFlags &= ~0x17; }
280 void offWolfNoLock() { mFlags &= ~0x200; }
281 void offHeadLockFlg() { mFlags &= ~0x80; }
282
289 void setDownPos(const cXyz* i_pos) { mDownPos = *i_pos; }
291
292 /* 0x568 */ cXyz mDownPos;
293 /* 0x574 */ cXyz mHeadLockPos;
294 /* 0x580 */ J3DModel* mBallModel;
296 /* 0x588 */ J3DAnmTevRegKey* mBrk;
297 /* 0x58C */ u8 field_0x58c;
298 /* 0x58D */ u8 mThrowMode;
299 /* 0x58E */ u16 mFlags;
300 /* 0x590 */ f32 field_0x590;
301 /* 0x594 */ u32 mEffectID1;
302 /* 0x598 */ u32 mEffectID2;
303 /* 0x59C */ u32 mMidnaBindID[3];
304 /* 0x5A8 */ u8 mMidnaBindMode;
305}; // Size: 0x5AC
306
307s32 fopAc_IsActor(void* actor);
308
310
311#endif
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRSolidHeap.h:10
Definition f_op_actor.h:119
void setCommand(u16 command)
Definition f_op_actor.h:132
BOOL i_checkCommandDoor()
Definition f_op_actor.h:149
char * getArchiveName()
Definition f_op_actor.h:142
BOOL checkCommandDemoAccrpt()
Definition f_op_actor.h:130
BOOL checkCommandCatch()
s16 getEventId()
Definition f_op_actor.h:139
void setEventName(char *)
Definition d_event.cpp:1126
u16 mCondition
Definition f_op_actor.h:160
char * getEventName()
Definition d_event.cpp:1135
void setMapToolId(u8 id)
Definition f_op_actor.h:133
void beforeProc()
Definition d_event.cpp:1148
s16 mEventId
Definition f_op_actor.h:161
void onCondition(u16)
Definition d_a_e_po.cpp:3174
bool checkCommandTalk()
Definition f_op_actor.h:147
void setCondition(u16 condition)
Definition f_op_actor.h:135
u16 mCommand
Definition f_op_actor.h:159
void setArchiveName(char *name)
Definition f_op_actor.h:137
bool i_checkCommandDemoAccrpt()
Definition f_op_actor.h:150
dEvt_info_c()
Definition d_event.cpp:1116
void(* field_0x14)(void *)
Definition f_op_actor.h:166
char * mArchiveName
Definition f_op_actor.h:164
u8 getMapToolId()
Definition f_op_actor.h:138
BOOL checkCommandDoor()
void setIdx(u8 i_idx)
Definition f_op_actor.h:141
virtual ~dEvt_info_c()
Definition f_op_actor.h:122
void i_offCondition(u16 cond)
Definition f_op_actor.h:145
bool checkCommandItem()
Definition f_op_actor.h:148
s16 getIdx()
Definition f_op_actor.h:140
void setEventId(s16 id)
Definition f_op_actor.h:134
u8 field_0x10
Definition f_op_actor.h:165
bool i_checkCommandCatch()
Definition f_op_actor.h:151
u8 mMapToolId
Definition f_op_actor.h:162
void offCondition(u16)
u16 getCondition()
Definition f_op_actor.h:136
void i_onCondition(u16 cond)
Definition f_op_actor.h:144
BOOL chkCondition(u16 condition)
Definition f_op_actor.h:143
s8 mIndex
Definition f_op_actor.h:163
void suspendProc(void *actor)
Definition f_op_actor.h:153
Definition d_jnt_col.h:19
Definition f_op_actor.h:249
void onWolfDownStartFlg()
Definition f_op_actor.h:270
u32 mEffectID1
Definition f_op_actor.h:301
u32 mMidnaBindID[3]
Definition f_op_actor.h:303
void offWolfNoLock()
Definition f_op_actor.h:280
void setDownPos(const cXyz *i_pos)
Definition f_op_actor.h:289
void offHeadLockFlg()
Definition f_op_actor.h:281
cXyz & getHeadLockPos()
Definition f_op_actor.h:266
void offWolfBiteDamage()
Definition f_op_actor.h:276
void offCutDownHitFlg()
Definition f_op_actor.h:277
void onHeadLockFlg()
Definition f_op_actor.h:274
bool checkHeadLockFlg() const
Definition f_op_actor.h:257
u8 getMidnaBindMode()
Definition f_op_actor.h:264
J3DAnmTextureSRTKey * mBtk
Definition f_op_actor.h:295
void setThrowModeThrowLeft()
Definition f_op_actor.h:288
void setThrowModeThrowRight()
Definition f_op_actor.h:287
u8 field_0x58c
Definition f_op_actor.h:297
cXyz mHeadLockPos
Definition f_op_actor.h:293
void setHeadLockPos(const cXyz *i_pos)
Definition f_op_actor.h:290
void onWolfNoLock()
Definition f_op_actor.h:272
u32 mEffectID2
Definition f_op_actor.h:302
void offDownFlg()
Definition f_op_actor.h:279
bool checkWolfNoLock() const
Definition f_op_actor.h:256
void setBallModelEffect(dKy_tevstr_c *)
Definition f_op_actor.cpp:252
void drawBallModel(dKy_tevstr_c *)
Definition f_op_actor.cpp:275
void onDownFlg()
Definition f_op_actor.h:273
void onWolfDownPullEndFlg()
Definition f_op_actor.h:271
cXyz mDownPos
Definition f_op_actor.h:292
f32 field_0x590
Definition f_op_actor.h:300
void setMidnaBindMode(u8 i_bindMode)
Definition f_op_actor.h:283
void offWolfDownPullFlg()
Definition f_op_actor.h:278
bool checkCutDownHitFlg() const
Definition f_op_actor.h:260
void setThrowModeDash()
Definition f_op_actor.h:286
bool checkBallModelDraw()
Definition f_op_actor.cpp:246
void onCutDownHitFlg()
Definition f_op_actor.h:268
void onWolfBiteDamage()
Definition f_op_actor.h:269
J3DAnmTevRegKey * mBrk
Definition f_op_actor.h:296
bool initBallModel()
Definition f_op_actor.cpp:227
cXyz & getDownPos()
Definition f_op_actor.h:265
u8 mThrowMode
Definition f_op_actor.h:298
bool checkWolfBiteDamage() const
Definition f_op_actor.h:258
void setMidnaBindID(u8 i_idx, u32 i_bindID)
Definition f_op_actor.h:284
void setThrowModeCatch()
Definition f_op_actor.h:285
u8 mMidnaBindMode
Definition f_op_actor.h:304
bool checkDeadFlg() const
Definition f_op_actor.h:261
bool checkDownFlg() const
Definition f_op_actor.h:259
J3DModel * mBallModel
Definition f_op_actor.h:294
u16 mFlags
Definition f_op_actor.h:299
u32 * getMidnaBindID(int i_idx)
Definition f_op_actor.h:263
static SECTION_RODATA u8 const id[8]
Definition d_a_npc_bans.cpp:1309
fopAc_attention_type
Definition f_op_actor.h:85
@ fopAc_attn_DOOR_e
Definition f_op_actor.h:91
@ fopAc_attn_SPEAK_e
Definition f_op_actor.h:89
@ fopAc_attn_ETC_e
Definition f_op_actor.h:93
@ fopAc_attn_CHECK_e
Definition f_op_actor.h:94
@ fopAc_attn_BATTLE_e
Definition f_op_actor.h:88
@ fopAc_attn_LOCK_e
Definition f_op_actor.h:86
@ fopAc_attn_CARRY_e
Definition f_op_actor.h:90
@ fopAc_attn_TALK_e
Definition f_op_actor.h:87
@ fopAc_attn_JUEL_e
Definition f_op_actor.h:92
s32 fopAc_IsActor(void *actor)
Definition f_op_actor.cpp:27
STATIC_ASSERT(sizeof(fopAc_ac_c)==0x568)
fopAc_Cull_e
Definition f_op_actor.h:52
@ fopAc_CULLSPHERE_12_e
Definition f_op_actor.h:80
@ fopAc_CULLSPHERE_2_e
Definition f_op_actor.h:70
@ fopAc_CULLSPHERE_0_e
Definition f_op_actor.h:68
@ fopAc_CULLSPHERE_9_e
Definition f_op_actor.h:77
@ fopAc_CULLSPHERE_4_e
Definition f_op_actor.h:72
@ fopAc_CULLBOX_2_e
Definition f_op_actor.h:55
@ fopAc_CULLBOX_5_e
Definition f_op_actor.h:58
@ fopAc_CULLBOX_9_e
Definition f_op_actor.h:62
@ fopAc_CULLSPHERE_3_e
Definition f_op_actor.h:71
@ fopAc_CULLBOX_4_e
Definition f_op_actor.h:57
@ fopAc_CULLBOX_7_e
Definition f_op_actor.h:60
@ fopAc_CULLSPHERE_11_e
Definition f_op_actor.h:79
@ fopAc_CULLSPHERE_6_e
Definition f_op_actor.h:74
@ fopAc_CULLBOX_CUSTOM_e
Definition f_op_actor.h:67
@ fopAc_CULLSPHERE_13_e
Definition f_op_actor.h:81
@ fopAc_CULLBOX_1_e
Definition f_op_actor.h:54
@ fopAc_CULLBOX_8_e
Definition f_op_actor.h:61
@ fopAc_CULLBOX_13_e
Definition f_op_actor.h:66
@ fopAc_CULLSPHERE_1_e
Definition f_op_actor.h:69
@ fopAc_CULLSPHERE_10_e
Definition f_op_actor.h:78
@ fopAc_CULLSPHERE_5_e
Definition f_op_actor.h:73
@ fopAc_CULLSPHERE_CUSTOM_e
Definition f_op_actor.h:82
@ fopAc_CULLBOX_10_e
Definition f_op_actor.h:63
@ fopAc_CULLBOX_6_e
Definition f_op_actor.h:59
@ fopAc_CULLBOX_11_e
Definition f_op_actor.h:64
@ fopAc_CULLSPHERE_8_e
Definition f_op_actor.h:76
@ fopAc_CULLBOX_12_e
Definition f_op_actor.h:65
@ fopAc_CULLSPHERE_7_e
Definition f_op_actor.h:75
@ fopAc_CULLBOX_0_e
Definition f_op_actor.h:53
@ fopAc_CULLBOX_3_e
Definition f_op_actor.h:56
dEvt_Condition_e
Definition f_op_actor.h:109
@ dEvtCnd_CANGETITEM_e
Definition f_op_actor.h:114
@ dEvtCnd_CANDEMO_e
Definition f_op_actor.h:112
@ dEvtCnd_CANTALKITEM_e
Definition f_op_actor.h:115
@ dEvtCnd_CANDOOR_e
Definition f_op_actor.h:113
@ dEvtCnd_NONE_e
Definition f_op_actor.h:110
@ dEvtCnd_CANTALK_e
Definition f_op_actor.h:111
@ dEvtCnd_DUMMY
Definition f_op_actor.h:116
fopAc_Status_e
Definition f_op_actor.h:27
@ fopAcStts_NOPAUSE_e
Definition f_op_actor.h:32
@ fopAcStts_CARRY_e
Definition f_op_actor.h:31
@ fopAcStts_NODRAW_e
Definition f_op_actor.h:33
@ fopAcStts_BOSS_e
Definition f_op_actor.h:34
@ fopAcStts_CULL_e
Definition f_op_actor.h:29
@ fopAcStts_NOEXEC_e
Definition f_op_actor.h:28
@ fopAcStts_FREEZE_e
Definition f_op_actor.h:30
fopAc_Group_e
Definition f_op_actor.h:37
@ fopAc_ENEMY_e
Definition f_op_actor.h:40
@ fopAc_ACTOR_e
Definition f_op_actor.h:38
@ fopAc_PLAYER_e
Definition f_op_actor.h:39
@ fopAc_UNK_GROUP_5_e
Definition f_op_actor.h:43
@ fopAc_ENV_e
Definition f_op_actor.h:41
@ fopAc_NPC_e
Definition f_op_actor.h:42
dEvt_Command_e
Definition f_op_actor.h:99
@ dEvtCmd_INCATCH_e
Definition f_op_actor.h:105
@ dEvtCmd_DUMMY
Definition f_op_actor.h:106
@ dEvtCmd_INTALK_e
Definition f_op_actor.h:101
@ dEvtCmd_INDEMO_e
Definition f_op_actor.h:102
@ dEvtCmd_INGETITEM_e
Definition f_op_actor.h:104
@ dEvtCmd_INDOOR_e
Definition f_op_actor.h:103
@ dEvtCmd_NONE_e
Definition f_op_actor.h:100
fopAc_Condition_e
Definition f_op_actor.h:46
@ fopAcCnd_INIT_e
Definition f_op_actor.h:49
@ fopAcCnd_NOEXEC_e
Definition f_op_actor.h:47
@ fopAcCnd_NODRAW_e
Definition f_op_actor.h:48
actor_method_class g_fopAc_Method
struct profile_method_class profile_method_class
Definition f_pc_base.h:15
unsigned int fpc_ProcID
Definition f_pc_base.h:10
static s32 status
Definition fstload.c:6
f32(* MtxP)[4]
Definition mtx.h:18
Definition d_a_obj_sekizoa.cpp:45
Definition d_a_hozelda.cpp:45
Definition d_a_ep.cpp:155
Definition d_a_hozelda.cpp:18
Definition f_op_actor.h:176
u8 distances[9]
Definition f_op_actor.h:177
u32 flags
Definition f_op_actor.h:180
s16 field_0xa
Definition f_op_actor.h:178
cXyz position
Definition f_op_actor.h:179
Definition f_op_actor.h:8
u8 field_0x14[0xC]
Definition f_op_actor.h:10
leafdraw_method_class base
Definition f_op_actor.h:9
Definition f_op_actor.h:169
csXyz angle
Definition f_op_actor.h:171
s8 roomNo
Definition f_op_actor.h:172
cXyz pos
Definition f_op_actor.h:170
u8 field_0x13
Definition f_op_actor.h:173
Definition f_op_actor.h:22
u32 field_0x30
Definition f_op_actor.h:24
actor_process_profile_definition def
Definition f_op_actor.h:23
Definition f_op_actor.h:13
u8 cullType
Definition f_op_actor.h:18
u32 status
Definition f_op_actor.h:16
actor_method_class * sub_method
Definition f_op_actor.h:15
leaf_process_profile_definition mBase
Definition f_op_actor.h:14
u8 mActorType
Definition f_op_actor.h:17
Definition d_a_hozelda.cpp:20
Definition c_tag.h:10
Definition d_a_ep.cpp:66
Definition f_op_actor.h:190
Vec min
Definition f_op_actor.h:191
Vec max
Definition f_op_actor.h:192
Definition f_op_actor.h:185
f32 radius
Definition f_op_actor.h:187
Vec center
Definition f_op_actor.h:186
Definition d_a_ep.cpp:49
Definition d_a_ep.cpp:19
dJntCol_c * jntCol
Definition f_op_actor.h:226
fpc_ProcID parentActorID
Definition f_op_actor.h:212
u8 field_0x565
Definition f_op_actor.h:235
MtxP cullMtx
Definition f_op_actor.h:219
cull_box box
Definition f_op_actor.h:221
dKy_tevstr_c tevStr
Definition f_op_actor.h:203
s8 field_0x567
Definition f_op_actor.h:237
int actor_type
Definition f_op_actor.h:197
actor_attention_types attention_info
Definition f_op_actor.h:231
actor_place old
Definition f_op_actor.h:214
f32 gravity
Definition f_op_actor.h:228
cXyz speed
Definition f_op_actor.h:218
u8 cullType
Definition f_op_actor.h:206
s8 subtype
Definition f_op_actor.h:208
u8 carryType
Definition f_op_actor.h:209
union fopAc_ac_c::@92 cull
actor_place home
Definition f_op_actor.h:213
cXyz eyePos
Definition f_op_actor.h:230
u8 field_0x564
Definition f_op_actor.h:234
cull_sphere sphere
Definition f_op_actor.h:222
u8 field_0x566
Definition f_op_actor.h:236
profile_method_class * sub_method
Definition f_op_actor.h:200
csXyz shape_angle
Definition f_op_actor.h:216
u16 setID
Definition f_op_actor.h:204
f32 maxFallSpeed
Definition f_op_actor.h:229
static void setStopStatus(u32 status)
Definition f_op_actor.h:242
J3DModel * model
Definition f_op_actor.h:225
s16 field_0x560
Definition f_op_actor.h:232
u8 group
Definition f_op_actor.h:205
f32 cullSizeFar
Definition f_op_actor.h:224
create_tag_class draw_tag
Definition f_op_actor.h:199
JKRSolidHeap * heap
Definition f_op_actor.h:201
u32 actor_condition
Definition f_op_actor.h:211
dEvt_info_c eventInfo
Definition f_op_actor.h:202
u8 demoActorID
Definition f_op_actor.h:207
actor_place current
Definition f_op_actor.h:215
u32 actor_status
Definition f_op_actor.h:210
create_tag_class actor_tag
Definition f_op_actor.h:198
f32 speedF
Definition f_op_actor.h:227
s16 health
Definition f_op_actor.h:233
static u32 stopStatus
Definition f_op_actor.h:244
cXyz scale
Definition f_op_actor.h:217
Definition f_pc_leaf.h:24
Definition f_pc_leaf.h:16
Definition f_pc_leaf.h:11
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