Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_a_npc_shoe.h
Go to the documentation of this file.
1#ifndef D_A_NPC_SHOE_H
2#define D_A_NPC_SHOE_H
3
4#include "d/actor/d_a_npc4.h"
5
9
11public:
12 virtual ~daNpcShoe_Param_c() {}
13
14 static const daNpcShoe_HIOParam m;
15};
16
18
19#if DEBUG
21public:
23
25
27};
28
29#define NPC_SHOE_HIO_CLASS daNpcShoe_HIO_c
30#else
31#define NPC_SHOE_HIO_CLASS daNpcShoe_Param_c
32#endif
33
42class daNpcShoe_c : public daNpcF_c {
43public:
44 typedef bool (daNpcShoe_c::*actionFunc)(void*);
45 typedef BOOL (daNpcShoe_c::*EventFn)(int);
46
47 enum Animation {
48 /* 0x01 */ ANM_M_SITWAIT_A,
49 /* 0x02 */ ANM_M_SITTALK_A,
51 /* 0x04 */ ANM_SHOE_TALK_A,
52 /* 0x05 */ ANM_M_SIT_TO_WOLF_A
53 };
54
55 enum Motion {
56 /* 0x01 */ MOT_SITWAIT_A,
57 /* 0x02 */ MOT_SITTALK_A,
58 /* 0x03 */ MOT_SITTALK_A_B,
59 /* 0x04 */ MOT_SHOE_TALK_A,
61 };
62
67 int Delete();
68 int Execute();
69 int Draw();
71 static int createHeapCallBack(fopAc_ac_c*);
72 static BOOL ctrlJointCallBack(J3DJoint*, int);
73 void setMotion(int, f32, BOOL);
74 void reset();
75 inline int setAction(actionFunc);
76 bool wait(void*);
77 bool fear(void*);
78 bool talk(void*);
79 bool demo(void*);
80 void setParam();
81 BOOL main();
82 void setAttnPos();
83 inline void lookat();
84 void setMotionAnm(int, f32);
85 inline BOOL drawDbgInfo();
86 inline void adjustShapeAngle() {}
87
88 s16 getMessageNo() { return fopAcM_GetParam(this) >> 0x10; }
89
90 int getTime() { return getTimeMinute() + getTimeHour() * 60; }
92 if (dKy_darkworld_check() != 0) {
93 return dKy_getDarktime_hour();
94 } else {
95 return dKy_getdaytime_hour();
96 }
97 }
99 if (dKy_darkworld_check() != 0) {
100 return dKy_getDarktime_minute();
101 } else {
102 return dKy_getdaytime_minute();
103 }
104 }
105
106 int getStartTime() { return fopAcM_GetParam(this) & 0xff; }
107 int getEndTime() { return (fopAcM_GetParam(this) >> 8) & 0xff; }
108
109 inline void setLookMode(int i_lookMode);
110 inline bool chkFindPlayer();
111 inline void playMotion();
112
113 static EventFn mEvtSeqList[1];
114
115private:
116 /* 0xB48 */ J3DModel* mpModel1;
117 /* 0xB4C */ J3DModel* mpModel2;
119 /* 0xBF4 */ u8 field_0xbf4[0xbf8 - 0xbf4];
122 /* 0xC9C */ NPC_SHOE_HIO_CLASS* mpHIO;
123 /* 0xCA0 */ dCcD_Cyl mCcCyl;
126 /* 0xE00 */ u32 field_0xe00;
127 /* 0xE04 */ u32 field_0xe04;
128 /* 0xE08 */ u32 field_0xe08;
129 /* 0xE0C */ u32 field_0xe0c;
130 /* 0xE10 */ s16 mLookMode;
131 /* 0xE12 */ u16 mStartTime;
132 /* 0xE14 */ u16 mEndTime;
133 /* 0xE16 */ u16 field_0xe16;
134 /* 0xE18 */ u16 mMode;
135 /* 0xE1A */ u8 field_0xe1a;
136 /* 0xE1B */ u8 field_0xe1b; // Probably isDaytime or isNighttime
137};
138
139STATIC_ASSERT(sizeof(daNpcShoe_c) == 0xe1c);
140
141#endif /* D_A_NPC_SHOE_H */
cPhs__Step
Definition c_phase.h:8
Definition J3DJoint.h:63
Definition J3DModel.h:43
Definition JORMContext.h:120
Definition Z2Creature.h:60
Definition d_cc_d.h:461
Definition d_a_npc4.h:14
Definition d_a_npc4.h:379
Definition d_a_npc4.h:54
Definition d_a_npc_shoe.h:20
daNpcShoe_HIOParam m
Definition d_a_npc_shoe.h:26
void genMessage(JORMContext *)
Definition d_a_npc_shoe.cpp:52
daNpcShoe_HIO_c()
Definition d_a_npc_shoe.cpp:48
Definition d_a_npc_shoe.h:10
static const daNpcShoe_HIOParam m
Definition d_a_npc_shoe.h:11
virtual ~daNpcShoe_Param_c()
Definition d_a_npc_shoe.h:12
Soal.
Definition d_a_npc_shoe.h:42
u8 field_0xe1a
Definition d_a_npc_shoe.h:135
Animation
Definition d_a_npc_shoe.h:47
@ ANM_SHOE_TALK_A
Definition d_a_npc_shoe.h:51
@ ANM_M_SIT_TO_WOLF_A
Definition d_a_npc_shoe.h:52
@ ANM_M_SITTALK_A
Definition d_a_npc_shoe.h:49
@ ANM_M_SITWAIT_A
Definition d_a_npc_shoe.h:48
@ ANM_M_SITTALK_A_B
Definition d_a_npc_shoe.h:50
daNpcF_ActorMngr_c mActorMngr[1]
Definition d_a_npc_shoe.h:121
u8 field_0xe1b
Definition d_a_npc_shoe.h:136
Motion
Definition d_a_npc_shoe.h:55
@ MOT_SIT_TO_WOLF_A
Definition d_a_npc_shoe.h:60
@ MOT_SITWAIT_A
Definition d_a_npc_shoe.h:56
@ MOT_SITTALK_A_B
Definition d_a_npc_shoe.h:58
@ MOT_SITTALK_A
Definition d_a_npc_shoe.h:57
@ MOT_SHOE_TALK_A
Definition d_a_npc_shoe.h:59
s16 mLookMode
Definition d_a_npc_shoe.h:130
void reset()
Definition d_a_npc_shoe.cpp:325
int Delete()
Definition d_a_npc_shoe.cpp:223
u32 field_0xe08
Definition d_a_npc_shoe.h:128
int setAction(actionFunc)
Definition d_a_npc_shoe.cpp:466
daNpcShoe_c()
Definition d_a_npc_shoe.cpp:109
request_of_phase_process_class mPhases[3]
Definition d_a_npc_shoe.h:125
u16 field_0xe16
Definition d_a_npc_shoe.h:133
int getTimeMinute()
Definition d_a_npc_shoe.h:98
int Draw()
Definition d_a_npc_shoe.cpp:251
static int createHeapCallBack(fopAc_ac_c *)
Definition d_a_npc_shoe.cpp:297
daNpcF_Lookat_c mLookat
Definition d_a_npc_shoe.h:120
bool(daNpcShoe_c::*) actionFunc(void *)
Definition d_a_npc_shoe.h:44
u32 field_0xe00
Definition d_a_npc_shoe.h:126
static EventFn mEvtSeqList[1]
Definition d_a_npc_shoe.h:107
actionFunc mpActionFn
Definition d_a_npc_shoe.h:124
cPhs__Step Create()
Definition d_a_npc_shoe.cpp:120
int getEndTime()
Definition d_a_npc_shoe.h:107
u16 mEndTime
Definition d_a_npc_shoe.h:132
bool chkFindPlayer()
Definition d_a_npc_shoe.cpp:65
~daNpcShoe_c()
Definition d_a_npc_shoe.cpp:111
void setParam()
Definition d_a_npc_shoe.cpp:657
J3DModel * mpModel2
Definition d_a_npc_shoe.h:117
int Execute()
Definition d_a_npc_shoe.cpp:228
s16 getMessageNo()
Definition d_a_npc_shoe.h:88
void lookat()
Definition d_a_npc_shoe.cpp:415
u8 field_0xbf4[0xbf8 - 0xbf4]
Definition d_a_npc_shoe.h:119
static BOOL ctrlJointCallBack(J3DJoint *, int)
Definition d_a_npc_shoe.cpp:301
J3DModel * mpModel1
Definition d_a_npc_shoe.h:116
void setMotion(int, f32, BOOL)
Definition d_a_npc_shoe.cpp:312
BOOL drawDbgInfo()
Definition d_a_npc_shoe.cpp:735
void setMotionAnm(int, f32)
Definition d_a_npc_shoe.cpp:719
NPC_SHOE_HIO_CLASS * mpHIO
Definition d_a_npc_shoe.h:122
bool wait(void *)
Definition d_a_npc_shoe.cpp:480
BOOL(daNpcShoe_c::*) EventFn(int)
Definition d_a_npc_shoe.h:45
u16 mMode
Definition d_a_npc_shoe.h:134
bool fear(void *)
Definition d_a_npc_shoe.cpp:535
BOOL main()
Definition d_a_npc_shoe.cpp:673
void adjustShapeAngle()
Definition d_a_npc_shoe.h:86
void playMotion()
Definition d_a_npc_shoe.cpp:391
u16 mStartTime
Definition d_a_npc_shoe.h:131
u32 field_0xe0c
Definition d_a_npc_shoe.h:129
void setLookMode(int i_lookMode)
Definition d_a_npc_shoe.cpp:59
BOOL CreateHeap()
Definition d_a_npc_shoe.cpp:173
int getTimeHour()
Definition d_a_npc_shoe.h:91
Z2CreatureCitizen mCreature
Definition d_a_npc_shoe.h:118
bool ctrlJoint(J3DJoint *, J3DModel *)
Definition d_a_npc_shoe.cpp:269
dCcD_Cyl mCcCyl
Definition d_a_npc_shoe.h:123
int getStartTime()
Definition d_a_npc_shoe.h:106
bool demo(void *)
Definition d_a_npc_shoe.cpp:596
void setAttnPos()
Definition d_a_npc_shoe.cpp:685
bool talk(void *)
Definition d_a_npc_shoe.cpp:558
u32 field_0xe04
Definition d_a_npc_shoe.h:127
int getTime()
Definition d_a_npc_shoe.h:90
Definition f_op_actor.h:230
Definition m_Do_hostIO.h:27
STATIC_ASSERT(sizeof(daNpcShoe_Param_c::m)==0x6C)
int dKy_getdaytime_hour()
Definition d_kankyo.cpp:1711
int dKy_getDarktime_hour()
Definition d_kankyo.cpp:1731
u8 dKy_darkworld_check()
Definition d_kankyo.cpp:11379
int dKy_getdaytime_minute()
Definition d_kankyo.cpp:1716
int dKy_getDarktime_minute()
Definition d_kankyo.cpp:1736
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
u32 fopAcM_GetParam(const void *i_actor)
Definition f_op_actor_mng.h:192
Definition d_a_npc4.h:423
Definition d_a_npc_shoe.h:6
daNpcF_HIOParam common
Definition d_a_npc_shoe.h:7
Definition c_phase.h:17