Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_a_npc_ash.h
Go to the documentation of this file.
1#ifndef D_A_NPC_ASH_H
2#define D_A_NPC_ASH_H
3
4#include "d/actor/d_a_npc.h"
5
14class daNpcAsh_c : public daNpcF_c {
15public:
17 typedef BOOL (daNpcAsh_c::*EventFn)(int);
18
19 enum Type {
20 /* 0 */ TYPE_BAR,
21 /* 1 */ TYPE_CASTLE,
22 };
23
24 enum Animation {
25 /* 0x00 */ ANM_NONE,
26 /* 0x01 */ ANM_F_TALK_A,
27 /* 0x02 */ ANM_F_TALK_B,
28 /* 0x03 */ ANM_F_SILENT,
29 /* 0x04 */ ANM_F_COOL,
30 /* 0x05 */ ANM_F_ASK,
31 /* 0x06 */ ANM_F_EXPLAIN_A,
32 /* 0x07 */ ANM_F_EXPLAIN_B,
33 /* 0x08 */ ANM_WAIT_A,
34 /* 0x09 */ ANM_WAIT_B,
35 /* 0x0A */ ANM_WAIT_C,
36 /* 0x0B */ ANM_STEP,
37 /* 0x0C */ ANM_COOL,
38 /* 0x0D */ ANM_ASK,
39 /* 0x0E */ ANM_EXPLAIN_A,
40 /* 0x0F */ ANM_EXPLAIN_B,
41 /* 0x10 */ ANM_BOWWAIT,
42 /* 0x11 */ ANM_BOWRUN,
43 };
44
46 /* 0x0 */ EXPR_TALK_A,
47 /* 0x1 */ EXPR_TALK_B,
48 /* 0x2 */ EXPR_SILENT,
49 /* 0x3 */ EXPR_COOL,
50 /* 0x4 */ EXPR_ASK,
51 /* 0x5 */ EXPR_EXPLAIN_A,
52 /* 0x6 */ EXPR_EXPLAIN_B,
53 /* 0x7 */ EXPR_NONE,
54 };
55
56 enum Motion {
57 /* 0x0 */ MOT_WAIT_A,
58 /* 0x1 */ MOT_WAIT_B,
59 /* 0x2 */ MOT_WAIT_C,
60 /* 0x3 */ MOT_COOL,
61 /* 0x4 */ MOT_ASK,
62 /* 0x5 */ MOT_EXPLAIN_A,
63 /* 0x6 */ MOT_EXPLAIN_B,
64 /* 0x7 */ MOT_BOWWAIT,
65 /* 0x8 */ MOT_BOWRUN,
66 /* 0x9 */ MOT_STEP,
67 };
68
69private:
71 /* 0xBD8 */ J3DModel* mModelBow;
72 /* 0xBDC */ J3DModel* mModelQuiver;
77 /* 0xCB4 */ u32 field_0xcb4; // unused
78 /* 0xCB8 */ dCcD_Cyl mCcCyl[2];
79 /* 0xF30 */ ActionFn mpActionFn;
81 /* 0xF4C */ u32 mItemPartnerId;
82 /* 0xF50 */ u32 field_0xf50; // unused
83 /* 0xF54 */ u32 field_0xf54;
84 /* 0xF58 */ s16 mFlowID;
85 /* 0xF5A */ s16 mLookMode;
86 /* 0xF5C */ u16 mMode;
87 /* 0xF5E */ u8 mMapToolId;
88 /* 0xF5F */ u8 field_0xf5f;
89 /* 0xF60 */ u8 mType;
90
91public:
92 /* 809582EC */ daNpcAsh_c();
93 /* 80958610 */ ~daNpcAsh_c();
94 /* 809587A0 */ cPhs__Step Create();
95 /* 80958B68 */ BOOL CreateHeap();
96 /* 809590C4 */ int Delete();
97 /* 809590F8 */ int Execute();
98 /* 8095911C */ int Draw();
99 /* 80959238 */ bool ctrlJoint(J3DJoint*, J3DModel*);
100 /* 80959458 */ static BOOL createHeapCallBack(fopAc_ac_c*);
101 /* 80959478 */ static BOOL ctrlJointCallBack(J3DJoint*, int);
102 /* 809594C4 */ bool setExpressionAnm(int, bool);
103 /* 809596E0 */ bool setExpressionBtp(int);
104 /* 809597C0 */ bool setMotionAnm(int i_idx, f32 i_morf);
105 /* 80959910 */ void reset();
106 /* 80959B28 */ inline bool setAction(ActionFn);
107 /* 80959BD0 */ inline bool isSneaking();
108 /* 80959C40 */ bool wait_type0(void*);
109 /* 8095A67C */ void setMotion(int, f32, int);
110 /* 8095A6C0 */ void setExpression(int, f32);
111 /* 8095A6EC */ bool wait_type1(void*);
112 /* 8095A8EC */ bool talk(void*);
113 /* 8095AD28 */ bool demo(void*);
114 /* 8095B164 */ bool leave(void*);
115 /* 8095B48C */ BOOL EvCut_Introduction(int i_staffID);
116 /* 8095B58C */ BOOL EvCut_Meeting(int i_staffID);
117 /* 8095B83C */ BOOL EvCut_WiretapSponsor(int i_staffID);
118 /* 8095BA80 */ BOOL EvCut_WiretapEntrant(int i_staffID);
119 /* 8095BCF0 */ void setParam();
120 /* 8095BF6C */ BOOL main();
121 /* 8095C200 */ void playMotion();
122 /* 8095C520 */ BOOL ctrlBtk();
123 /* 8095C5C4 */ void setAttnPos();
124 /* 8095C9BC */ void lookat();
125 /* 8095CC8C */ BOOL drawDbgInfo();
126
128 bool isMap() { return !(daNpcF_chkEvtBit(0x10c) || !daNpcF_chkEvtBit(0x108)); }
129 inline void setExpressionTalkAfter() { setExpression(7, -1.0f); }
131 inline void searchActors();
132 inline BOOL chkFindPlayer();
133 inline bool step(s16, bool);
134 inline void playExpression();
135
136 static EventFn mEvtSeqList[6];
137};
138
139STATIC_ASSERT(sizeof(daNpcAsh_c) == 0xF64);
140
142public:
143 /* 8095D5D4 */ virtual ~daNpcAsh_Param_c() {}
144
145 struct param {
146 /* 0x00 */ f32 mAttnOffsetY;
147 /* 0x04 */ f32 mGravity;
148 /* 0x08 */ f32 mScale;
149 /* 0x0C */ f32 mShadowDepth;
150 /* 0x10 */ f32 mCcWeight;
151 /* 0x14 */ f32 mCylH;
152 /* 0x18 */ f32 mWallH;
153 /* 0x1C */ f32 mWallR;
154 /* 0x20 */ f32 mBodyUpAngle;
155 /* 0x24 */ f32 mBodyDownAngle;
156 /* 0x28 */ f32 mBodyLeftAngle;
158 /* 0x30 */ f32 mHeadUpAngle;
159 /* 0x34 */ f32 mHeadDownAngle;
160 /* 0x38 */ f32 mHeadLeftAngle;
162 /* 0x40 */ f32 mNeckAngleScl;
163 /* 0x44 */ f32 mMorfFrames;
164 /* 0x48 */ s16 mSpeakDistIdx;
165 /* 0x4A */ s16 mSpeakAngleIdx;
166 /* 0x4C */ s16 mTalkDistIdx;
167 /* 0x4E */ s16 mTalkAngleIdx;
168 /* 0x50 */ f32 mAttnFovY;
169 /* 0x54 */ f32 mAttnRadius;
170 /* 0x58 */ f32 mAttnUpperY;
171 /* 0x5C */ f32 mAttnLowerY;
172 /* 0x60 */ s16 field_0x60;
173 /* 0x62 */ s16 mDamageTimer;
175 /* 0x66 */ s16 mTestMotion;
176 /* 0x68 */ s16 mTestLookMode;
177 /* 0x6A */ bool mTest;
178 };
179
180 static param const m;
181};
182
183#endif /* D_A_NPC_ASH_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
cPhs__Step
Definition c_phase.h:8
Definition d_a_npc_ash.h:141
static param const m
Definition d_a_npc_ash.h:434
virtual ~daNpcAsh_Param_c()
Definition d_a_npc_ash.h:143
Ashei.
Definition d_a_npc_ash.h:14
s16 mLookMode
Definition d_a_npc_ash.h:85
bool(daNpcAsh_c::* ActionFn)(void *)
Definition d_a_npc_ash.h:16
static BOOL createHeapCallBack(fopAc_ac_c *)
Definition d_a_npc_ash.cpp:687
Expression
Definition d_a_npc_ash.h:45
@ EXPR_TALK_A
Definition d_a_npc_ash.h:46
@ EXPR_ASK
Definition d_a_npc_ash.h:50
@ EXPR_EXPLAIN_A
Definition d_a_npc_ash.h:51
@ EXPR_EXPLAIN_B
Definition d_a_npc_ash.h:52
@ EXPR_NONE
Definition d_a_npc_ash.h:53
@ EXPR_COOL
Definition d_a_npc_ash.h:49
@ EXPR_SILENT
Definition d_a_npc_ash.h:48
@ EXPR_TALK_B
Definition d_a_npc_ash.h:47
daNpcF_ActorMngr_c mActorMngr[6]
Definition d_a_npc_ash.h:75
daNpcF_MatAnm_c * mpMatAnm
Definition d_a_npc_ash.h:73
static EventFn mEvtSeqList[6]
Definition d_a_npc_ash.h:408
BOOL chkFindPlayer()
Definition d_a_npc_ash.cpp:275
bool setExpressionAnm(int, bool)
Definition d_a_npc_ash.cpp:706
Motion
Definition d_a_npc_ash.h:56
@ MOT_WAIT_C
Definition d_a_npc_ash.h:59
@ MOT_EXPLAIN_B
Definition d_a_npc_ash.h:63
@ MOT_BOWWAIT
Definition d_a_npc_ash.h:64
@ MOT_STEP
Definition d_a_npc_ash.h:66
@ MOT_WAIT_A
Definition d_a_npc_ash.h:57
@ MOT_EXPLAIN_A
Definition d_a_npc_ash.h:62
@ MOT_COOL
Definition d_a_npc_ash.h:60
@ MOT_ASK
Definition d_a_npc_ash.h:61
@ MOT_BOWRUN
Definition d_a_npc_ash.h:65
@ MOT_WAIT_B
Definition d_a_npc_ash.h:58
u32 field_0xcb4
Definition d_a_npc_ash.h:77
bool step(s16, bool)
Definition d_a_npc_ash.cpp:295
static BOOL ctrlJointCallBack(J3DJoint *, int)
Definition d_a_npc_ash.cpp:693
BOOL EvCut_WiretapSponsor(int i_staffID)
Definition d_a_npc_ash.cpp:1362
BOOL(daNpcAsh_c::* EventFn)(int)
Definition d_a_npc_ash.h:17
void lookat()
Definition d_a_npc_ash.cpp:1579
BOOL main()
Definition d_a_npc_ash.cpp:1496
bool isSneaking()
Definition d_a_npc_ash.cpp:878
~daNpcAsh_c()
Definition d_a_npc_ash.cpp:423
u32 field_0xf50
Definition d_a_npc_ash.h:82
ActionFn mpActionFn
Definition d_a_npc_ash.h:79
bool ctrlJoint(J3DJoint *, J3DModel *)
Definition d_a_npc_ash.cpp:644
bool setMotionAnm(int i_idx, f32 i_morf)
Definition d_a_npc_ash.cpp:789
u32 mItemPartnerId
Definition d_a_npc_ash.h:81
request_of_phase_process_class mPhase[2]
Definition d_a_npc_ash.h:80
void setParam()
Definition d_a_npc_ash.cpp:1472
bool leave(void *)
Definition d_a_npc_ash.cpp:1254
BOOL EvCut_Introduction(int i_staffID)
Definition d_a_npc_ash.cpp:1284
u16 mMode
Definition d_a_npc_ash.h:86
bool setExpressionBtp(int)
Definition d_a_npc_ash.cpp:770
bool talk(void *)
Definition d_a_npc_ash.cpp:1139
u8 mMapToolId
Definition d_a_npc_ash.h:87
int Execute()
Definition d_a_npc_ash.cpp:617
BOOL CreateHeap()
Definition d_a_npc_ash.cpp:553
cPhs__Step Create()
Definition d_a_npc_ash.cpp:470
bool wait_type1(void *)
Definition d_a_npc_ash.cpp:1099
Z2Creature mCreatureSound
Definition d_a_npc_ash.h:70
int Draw()
Definition d_a_npc_ash.cpp:623
BOOL EvCut_Meeting(int i_staffID)
Definition d_a_npc_ash.cpp:1306
BOOL drawDbgInfo()
Definition d_a_npc_ash.cpp:1631
s16 getMessageNo()
Definition d_a_npc_ash.h:127
u32 field_0xf54
Definition d_a_npc_ash.h:83
daNpcAsh_c()
Definition d_a_npc_ash.cpp:418
void reset()
Definition d_a_npc_ash.cpp:817
void playMotion()
Definition d_a_npc_ash.cpp:921
daNpcF_Lookat_c mLookat
Definition d_a_npc_ash.h:74
BOOL ctrlBtk()
Definition d_a_npc_ash.cpp:1511
BOOL EvCut_WiretapEntrant(int i_staffID)
Definition d_a_npc_ash.cpp:1411
Animation
Definition d_a_npc_ash.h:24
@ ANM_WAIT_B
Definition d_a_npc_ash.h:34
@ ANM_F_EXPLAIN_B
Definition d_a_npc_ash.h:32
@ ANM_F_SILENT
Definition d_a_npc_ash.h:28
@ ANM_F_EXPLAIN_A
Definition d_a_npc_ash.h:31
@ ANM_F_TALK_B
Definition d_a_npc_ash.h:27
@ ANM_WAIT_C
Definition d_a_npc_ash.h:35
@ ANM_NONE
Definition d_a_npc_ash.h:25
@ ANM_BOWWAIT
Definition d_a_npc_ash.h:41
@ ANM_WAIT_A
Definition d_a_npc_ash.h:33
@ ANM_F_ASK
Definition d_a_npc_ash.h:30
@ ANM_EXPLAIN_B
Definition d_a_npc_ash.h:40
@ ANM_BOWRUN
Definition d_a_npc_ash.h:42
@ ANM_EXPLAIN_A
Definition d_a_npc_ash.h:39
@ ANM_F_TALK_A
Definition d_a_npc_ash.h:26
@ ANM_COOL
Definition d_a_npc_ash.h:37
@ ANM_ASK
Definition d_a_npc_ash.h:38
@ ANM_STEP
Definition d_a_npc_ash.h:36
@ ANM_F_COOL
Definition d_a_npc_ash.h:29
void playExpression()
Definition d_a_npc_ash.cpp:888
u8 field_0xf5f
Definition d_a_npc_ash.h:88
s16 mFlowID
Definition d_a_npc_ash.h:84
bool setAction(ActionFn)
Definition d_a_npc_ash.cpp:864
bool demo(void *)
Definition d_a_npc_ash.cpp:1195
bool wait_type0(void *)
Definition d_a_npc_ash.cpp:974
void setLookMode(int i_lookMode, fopAc_ac_c *i_talkPartner)
Definition d_a_npc_ash.cpp:250
fopAc_ac_c * mTalkPartner
Definition d_a_npc_ash.h:76
void setAttnPos()
Definition d_a_npc_ash.cpp:1523
J3DModel * mModelQuiver
Definition d_a_npc_ash.h:72
void setMotion(int, f32, int)
Definition d_a_npc_ash.cpp:1076
void setExpressionTalkAfter()
Definition d_a_npc_ash.h:129
dCcD_Cyl mCcCyl[2]
Definition d_a_npc_ash.h:78
Type
Definition d_a_npc_ash.h:19
@ TYPE_CASTLE
Definition d_a_npc_ash.h:21
@ TYPE_BAR
Definition d_a_npc_ash.h:20
int Delete()
Definition d_a_npc_ash.cpp:611
bool isMap()
Definition d_a_npc_ash.h:128
void setExpression(int, f32)
Definition d_a_npc_ash.cpp:1089
J3DModel * mModelBow
Definition d_a_npc_ash.h:71
u8 mType
Definition d_a_npc_ash.h:89
void searchActors()
Definition d_a_npc_ash.cpp:257
Definition d_a_npc.h:756
Definition d_a_npc.h:1099
Definition d_a_npc.h:1017
Definition d_a_npc.h:772
BOOL daNpcF_chkEvtBit(u32 i_idx)
Definition d_a_npc.cpp:4896
STATIC_ASSERT(sizeof(daNpcAsh_c)==0xF64)
Definition d_a_hozelda.cpp:239
Definition d_a_ep.cpp:155
s16 x
Definition vec.h:19
Definition d_a_hozelda.cpp:163
Definition d_a_npc_fguard.cpp:86
Definition d_a_npc_ash.h:145
f32 mAttnRadius
Definition d_a_npc_ash.h:169
f32 mShadowDepth
Definition d_a_npc_ash.h:149
f32 mCylH
Definition d_a_npc_ash.h:151
s16 mSpeakDistIdx
Definition d_a_npc_ash.h:164
f32 mHeadDownAngle
Definition d_a_npc_ash.h:159
s16 mDamageTimer
Definition d_a_npc_ash.h:173
s16 mTestMotion
Definition d_a_npc_ash.h:175
f32 mBodyLeftAngle
Definition d_a_npc_ash.h:156
s16 mTestExpression
Definition d_a_npc_ash.h:174
f32 mAttnFovY
Definition d_a_npc_ash.h:168
f32 mScale
Definition d_a_npc_ash.h:148
s16 mTalkAngleIdx
Definition d_a_npc_ash.h:167
f32 mBodyUpAngle
Definition d_a_npc_ash.h:154
f32 mHeadRightAngle
Definition d_a_npc_ash.h:161
s16 mSpeakAngleIdx
Definition d_a_npc_ash.h:165
f32 mWallR
Definition d_a_npc_ash.h:153
f32 mBodyDownAngle
Definition d_a_npc_ash.h:155
f32 mMorfFrames
Definition d_a_npc_ash.h:163
f32 mAttnOffsetY
Definition d_a_npc_ash.h:146
f32 mHeadLeftAngle
Definition d_a_npc_ash.h:160
f32 mHeadUpAngle
Definition d_a_npc_ash.h:158
s16 mTalkDistIdx
Definition d_a_npc_ash.h:166
s16 field_0x60
Definition d_a_npc_ash.h:172
f32 mGravity
Definition d_a_npc_ash.h:147
f32 mBodyRightAngle
Definition d_a_npc_ash.h:157
f32 mWallH
Definition d_a_npc_ash.h:152
bool mTest
Definition d_a_npc_ash.h:177
f32 mAttnLowerY
Definition d_a_npc_ash.h:171
f32 mNeckAngleScl
Definition d_a_npc_ash.h:162
f32 mCcWeight
Definition d_a_npc_ash.h:150
s16 mTestLookMode
Definition d_a_npc_ash.h:176
f32 mAttnUpperY
Definition d_a_npc_ash.h:170
Definition d_a_ep.cpp:19
csXyz shape_angle
Definition f_op_actor.h:216
Definition d_a_hozelda.cpp: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
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8