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_npc4.h"
5
8};
9
11public:
12 virtual ~daNpcAsh_Param_c() {}
13
14 static const daNpcAsh_HIOParam m;
15};
16
17#if DEBUG
19public:
21
23
25};
26
27#define NPC_ASH_HIO_CLASS daNpcAsh_HIO_c
28#else
29#define NPC_ASH_HIO_CLASS daNpcAsh_Param_c
30#endif
31
40class daNpcAsh_c : public daNpcF_c {
41public:
42 typedef bool (daNpcAsh_c::*ActionFn)(void*);
43 typedef BOOL (daNpcAsh_c::*EventFn)(int);
44
45 enum Type {
46 /* 0 */ TYPE_BAR,
47 /* 1 */ TYPE_CASTLE,
48 };
49
50 enum Animation {
51 /* 0x00 */ ANM_NONE,
52 /* 0x01 */ ANM_F_TALK_A,
53 /* 0x02 */ ANM_F_TALK_B,
54 /* 0x03 */ ANM_F_SILENT,
55 /* 0x04 */ ANM_F_COOL,
56 /* 0x05 */ ANM_F_ASK,
57 /* 0x06 */ ANM_F_EXPLAIN_A,
58 /* 0x07 */ ANM_F_EXPLAIN_B,
59 /* 0x08 */ ANM_WAIT_A,
60 /* 0x09 */ ANM_WAIT_B,
61 /* 0x0A */ ANM_WAIT_C,
62 /* 0x0B */ ANM_STEP,
63 /* 0x0C */ ANM_COOL,
64 /* 0x0D */ ANM_ASK,
65 /* 0x0E */ ANM_EXPLAIN_A,
66 /* 0x0F */ ANM_EXPLAIN_B,
67 /* 0x10 */ ANM_BOWWAIT,
68 /* 0x11 */ ANM_BOWRUN,
69 };
70
72 /* 0x0 */ EXPR_TALK_A,
73 /* 0x1 */ EXPR_TALK_B,
74 /* 0x2 */ EXPR_SILENT,
75 /* 0x3 */ EXPR_COOL,
76 /* 0x4 */ EXPR_ASK,
77 /* 0x5 */ EXPR_EXPLAIN_A,
78 /* 0x6 */ EXPR_EXPLAIN_B,
79 /* 0x7 */ EXPR_NONE,
80 };
81
82 enum Motion {
83 /* 0x0 */ MOT_WAIT_A,
84 /* 0x1 */ MOT_WAIT_B,
85 /* 0x2 */ MOT_WAIT_C,
86 /* 0x3 */ MOT_COOL,
87 /* 0x4 */ MOT_ASK,
88 /* 0x5 */ MOT_EXPLAIN_A,
89 /* 0x6 */ MOT_EXPLAIN_B,
90 /* 0x7 */ MOT_BOWWAIT,
91 /* 0x8 */ MOT_BOWRUN,
92 /* 0x9 */ MOT_STEP,
93 };
94
95public:
96 daNpcAsh_c();
100 int Delete();
101 int Execute();
102 int Draw();
103 bool ctrlJoint(J3DJoint*, J3DModel*);
105 static BOOL ctrlJointCallBack(J3DJoint*, int);
106 bool setExpressionAnm(int, bool);
107 bool setExpressionBtp(int);
108 void setMotionAnm(int i_idx, f32 i_morf);
109 void reset();
110 inline bool setAction(ActionFn);
111 inline bool isSneaking();
112 bool wait_type0(void*);
113 void setMotion(int, f32, int);
114 void setExpression(int, f32);
115 bool wait_type1(void*);
116 bool talk(void*);
117 bool demo(void*);
118 bool leave(void*);
120 BOOL EvCut_Meeting(int);
123 inline void setParam();
124 inline BOOL main();
125 inline void playMotion();
126 inline BOOL ctrlBtk();
127 inline void setAttnPos();
128 inline void lookat();
129 inline BOOL drawDbgInfo();
130
132 /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */
133 bool isMap() {
134 return !(daNpcF_chkEvtBit(0x10c)
135 /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */
136 || !daNpcF_chkEvtBit(0x108));
137 }
138 inline void setExpressionTalkAfter() { setExpression(7, -1.0f); }
139 inline void setLookMode(int i_lookMode, fopAc_ac_c* i_talkPartner);
140 inline void searchActors();
141 inline BOOL chkFindPlayer();
142 inline bool step(s16, bool);
143 inline void playExpression();
144
145 static EventFn mEvtSeqList[6];
146
147private:
149 /* 0xBD8 */ J3DModel* mModelBow;
150 /* 0xBDC */ J3DModel* mModelQuiver;
155 /* 0xCB4 */ NPC_ASH_HIO_CLASS* mpHIO;
156 /* 0xCB8 */ dCcD_Cyl mCcCyl[2];
157 /* 0xF30 */ ActionFn mpActionFn;
159 /* 0xF4C */ u32 mItemPartnerId;
160 /* 0xF50 */ u32 field_0xf50; // unused
161 /* 0xF54 */ u32 field_0xf54;
162 /* 0xF58 */ s16 mFlowID;
163 /* 0xF5A */ s16 mLookMode;
164 /* 0xF5C */ u16 mMode;
165 /* 0xF5E */ u8 mMapToolId;
166 /* 0xF5F */ u8 field_0xf5f;
167 /* 0xF60 */ u8 mType;
168};
169
170STATIC_ASSERT(sizeof(daNpcAsh_c) == 0xF64);
171
172#endif /* D_A_NPC_ASH_H */
cPhs__Step
Definition c_phase.h:8
Definition J3DJoint.h:63
Definition J3DModel.h:43
Definition JORMContext.h:120
Definition Z2Creature.h:7
Definition d_cc_d.h:461
Definition d_a_npc_ash.h:18
daNpcAsh_HIO_c()
Definition d_a_npc_ash.cpp:51
void genMessage(JORMContext *)
Definition d_a_npc_ash.cpp:55
daNpcAsh_HIOParam m
Definition d_a_npc_ash.h:24
Definition d_a_npc_ash.h:10
static const daNpcAsh_HIOParam m
Definition d_a_npc_ash.h:14
virtual ~daNpcAsh_Param_c()
Definition d_a_npc_ash.h:12
Ashei.
Definition d_a_npc_ash.h:40
s16 mLookMode
Definition d_a_npc_ash.h:163
static BOOL createHeapCallBack(fopAc_ac_c *)
Definition d_a_npc_ash.cpp:436
Expression
Definition d_a_npc_ash.h:71
@ EXPR_TALK_A
Definition d_a_npc_ash.h:72
@ EXPR_ASK
Definition d_a_npc_ash.h:76
@ EXPR_EXPLAIN_A
Definition d_a_npc_ash.h:77
@ EXPR_EXPLAIN_B
Definition d_a_npc_ash.h:78
@ EXPR_NONE
Definition d_a_npc_ash.h:79
@ EXPR_COOL
Definition d_a_npc_ash.h:75
@ EXPR_SILENT
Definition d_a_npc_ash.h:74
@ EXPR_TALK_B
Definition d_a_npc_ash.h:73
daNpcF_ActorMngr_c mActorMngr[6]
Definition d_a_npc_ash.h:153
daNpcF_MatAnm_c * mpMatAnm
Definition d_a_npc_ash.h:151
static EventFn mEvtSeqList[6]
Definition d_a_npc_ash.h:200
BOOL chkFindPlayer()
Definition d_a_npc_ash.cpp:87
bool setExpressionAnm(int, bool)
Definition d_a_npc_ash.cpp:451
Motion
Definition d_a_npc_ash.h:82
@ MOT_WAIT_C
Definition d_a_npc_ash.h:85
@ MOT_EXPLAIN_B
Definition d_a_npc_ash.h:89
@ MOT_BOWWAIT
Definition d_a_npc_ash.h:90
@ MOT_STEP
Definition d_a_npc_ash.h:92
@ MOT_WAIT_A
Definition d_a_npc_ash.h:83
@ MOT_EXPLAIN_A
Definition d_a_npc_ash.h:88
@ MOT_COOL
Definition d_a_npc_ash.h:86
@ MOT_ASK
Definition d_a_npc_ash.h:87
@ MOT_BOWRUN
Definition d_a_npc_ash.h:91
@ MOT_WAIT_B
Definition d_a_npc_ash.h:84
BOOL EvCut_Introduction(int)
Definition d_a_npc_ash.cpp:1039
bool step(s16, bool)
Definition d_a_npc_ash.cpp:107
static BOOL ctrlJointCallBack(J3DJoint *, int)
Definition d_a_npc_ash.cpp:440
void lookat()
Definition d_a_npc_ash.cpp:685
BOOL main()
Definition d_a_npc_ash.cpp:1243
bool isSneaking()
Definition d_a_npc_ash.cpp:617
~daNpcAsh_c()
Definition d_a_npc_ash.cpp:211
u32 field_0xf50
Definition d_a_npc_ash.h:160
ActionFn mpActionFn
Definition d_a_npc_ash.h:157
bool ctrlJoint(J3DJoint *, J3DModel *)
Definition d_a_npc_ash.cpp:395
bool(daNpcAsh_c::*) ActionFn(void *)
Definition d_a_npc_ash.h:42
BOOL EvCut_WiretapSponsor(int)
Definition d_a_npc_ash.cpp:1115
u32 mItemPartnerId
Definition d_a_npc_ash.h:159
request_of_phase_process_class mPhase[2]
Definition d_a_npc_ash.h:158
void setParam()
Definition d_a_npc_ash.cpp:1218
bool leave(void *)
Definition d_a_npc_ash.cpp:1011
u16 mMode
Definition d_a_npc_ash.h:164
bool setExpressionBtp(int)
Definition d_a_npc_ash.cpp:514
bool talk(void *)
Definition d_a_npc_ash.cpp:898
u8 mMapToolId
Definition d_a_npc_ash.h:165
int Execute()
Definition d_a_npc_ash.cpp:371
BOOL CreateHeap()
Definition d_a_npc_ash.cpp:307
cPhs__Step Create()
Definition d_a_npc_ash.cpp:221
bool wait_type1(void *)
Definition d_a_npc_ash.cpp:859
Z2Creature mCreatureSound
Definition d_a_npc_ash.h:148
BOOL EvCut_WiretapEntrant(int)
Definition d_a_npc_ash.cpp:1163
int Draw()
Definition d_a_npc_ash.cpp:376
BOOL drawDbgInfo()
Definition d_a_npc_ash.cpp:1327
s16 getMessageNo()
Definition d_a_npc_ash.h:131
u32 field_0xf54
Definition d_a_npc_ash.h:161
daNpcAsh_c()
Definition d_a_npc_ash.cpp:209
void reset()
Definition d_a_npc_ash.cpp:559
void playMotion()
Definition d_a_npc_ash.cpp:652
daNpcF_Lookat_c mLookat
Definition d_a_npc_ash.h:152
BOOL ctrlBtk()
Definition d_a_npc_ash.cpp:1256
Animation
Definition d_a_npc_ash.h:50
@ ANM_WAIT_B
Definition d_a_npc_ash.h:60
@ ANM_F_EXPLAIN_B
Definition d_a_npc_ash.h:58
@ ANM_F_SILENT
Definition d_a_npc_ash.h:54
@ ANM_F_EXPLAIN_A
Definition d_a_npc_ash.h:57
@ ANM_F_TALK_B
Definition d_a_npc_ash.h:53
@ ANM_WAIT_C
Definition d_a_npc_ash.h:61
@ ANM_NONE
Definition d_a_npc_ash.h:51
@ ANM_BOWWAIT
Definition d_a_npc_ash.h:67
@ ANM_WAIT_A
Definition d_a_npc_ash.h:59
@ ANM_F_ASK
Definition d_a_npc_ash.h:56
@ ANM_EXPLAIN_B
Definition d_a_npc_ash.h:66
@ ANM_BOWRUN
Definition d_a_npc_ash.h:68
@ ANM_EXPLAIN_A
Definition d_a_npc_ash.h:65
@ ANM_F_TALK_A
Definition d_a_npc_ash.h:52
@ ANM_COOL
Definition d_a_npc_ash.h:63
@ ANM_ASK
Definition d_a_npc_ash.h:64
@ ANM_STEP
Definition d_a_npc_ash.h:62
@ ANM_F_COOL
Definition d_a_npc_ash.h:55
void playExpression()
Definition d_a_npc_ash.cpp:627
u8 field_0xf5f
Definition d_a_npc_ash.h:166
s16 mFlowID
Definition d_a_npc_ash.h:162
BOOL(daNpcAsh_c::*) EventFn(int)
Definition d_a_npc_ash.h:43
bool setAction(ActionFn)
Definition d_a_npc_ash.cpp:604
bool demo(void *)
Definition d_a_npc_ash.cpp:953
bool wait_type0(void *)
Definition d_a_npc_ash.cpp:737
BOOL EvCut_Meeting(int)
Definition d_a_npc_ash.cpp:1060
void setLookMode(int i_lookMode, fopAc_ac_c *i_talkPartner)
Definition d_a_npc_ash.cpp:62
fopAc_ac_c * mTalkPartner
Definition d_a_npc_ash.h:154
void setAttnPos()
Definition d_a_npc_ash.cpp:1266
J3DModel * mModelQuiver
Definition d_a_npc_ash.h:150
NPC_ASH_HIO_CLASS * mpHIO
Definition d_a_npc_ash.h:155
void setMotion(int, f32, int)
Definition d_a_npc_ash.cpp:838
void setExpressionTalkAfter()
Definition d_a_npc_ash.h:138
dCcD_Cyl mCcCyl[2]
Definition d_a_npc_ash.h:156
Type
Definition d_a_npc_ash.h:45
@ TYPE_CASTLE
Definition d_a_npc_ash.h:47
@ TYPE_BAR
Definition d_a_npc_ash.h:46
int Delete()
Definition d_a_npc_ash.cpp:366
bool isMap()
Definition d_a_npc_ash.h:133
void setExpression(int, f32)
Definition d_a_npc_ash.cpp:850
J3DModel * mModelBow
Definition d_a_npc_ash.h:149
void setMotionAnm(int i_idx, f32 i_morf)
Definition d_a_npc_ash.cpp:532
u8 mType
Definition d_a_npc_ash.h:167
void searchActors()
Definition d_a_npc_ash.cpp:69
Definition d_a_npc4.h:14
Definition d_a_npc4.h:379
Definition d_a_npc4.h:292
Definition d_a_npc4.h:54
Definition f_op_actor.h:230
csXyz shape_angle
Definition f_op_actor.h:252
Definition m_Do_hostIO.h:27
BOOL daNpcF_chkEvtBit(u32 i_no)
Definition d_a_npc4.cpp:1850
STATIC_ASSERT(sizeof(daNpcAsh_c)==0xF64)
int BOOL
Definition types.h:33
unsigned long u32
Definition types.h:12
signed short int s16
Definition types.h:9
float f32
Definition types.h:25
unsigned short int u16
Definition types.h:10
unsigned char u8
Definition types.h:8
s16 x
Definition c_sxyz.h:7
Definition d_a_npc_ash.h:6
daNpcF_HIOParam common
Definition d_a_npc_ash.h:7
Definition d_a_npc4.h:423
Definition c_phase.h:17