Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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_npc.h"
5
14class daNpcShoe_c : public daNpcF_c {
15public:
16 typedef bool (daNpcShoe_c::*actionFunc)(void*);
17 typedef BOOL (daNpcShoe_c::*EventFn)(int);
18
19 enum Animation {
20 /* 0x01 */ ANM_M_SITWAIT_A,
21 /* 0x02 */ ANM_M_SITTALK_A,
23 /* 0x04 */ ANM_SHOE_TALK_A,
24 /* 0x05 */ ANM_M_SIT_TO_WOLF_A
25 };
26
27 enum Motion {
28 /* 0x01 */ MOT_SITWAIT_A,
29 /* 0x02 */ MOT_SITTALK_A,
30 /* 0x03 */ MOT_SITTALK_A_B,
31 /* 0x04 */ MOT_SHOE_TALK_A,
33 };
34
35 /* 80AE794C */ daNpcShoe_c();
36 /* 80AE7B60 */ ~daNpcShoe_c();
37 /* 80AE7D48 */ cPhs__Step Create();
38 /* 80AE7FD8 */ BOOL CreateHeap();
39 /* 80AE81E8 */ int Delete();
40 /* 80AE821C */ int Execute();
41 /* 80AE8308 */ int Draw();
42 /* 80AE840C */ bool ctrlJoint(J3DJoint*, J3DModel*);
43 /* 80AE8598 */ static int createHeapCallBack(fopAc_ac_c*);
44 /* 80AE85B8 */ static BOOL ctrlJointCallBack(J3DJoint*, int);
45 /* 80AE8604 */ void setMotion(int, f32, BOOL);
46 /* 80AE864C */ void reset();
47 /* 80AE895C */ inline int setAction(actionFunc);
48 /* 80AE8A04 */ bool wait(void*);
49 /* 80AE8E24 */ bool fear(void*);
50 /* 80AE8ED4 */ bool talk(void*);
51 /* 80AE9094 */ bool demo(void*);
52 /* 80AE92E8 */ void setParam();
53 /* 80AE93A0 */ BOOL main();
54 /* 80AE9624 */ void setAttnPos();
55 /* 80AE9820 */ void lookat();
56 /* 80AE9A00 */ bool setMotionAnm(int, f32);
57 /* 80AE9AD0 */ BOOL drawDbgInfo();
58 /* 80AEA340 */ void adjustShapeAngle();
59
60 s16 getMessageNo() { return fopAcM_GetParam(this) >> 0x10; }
61
62 int getTime() { return getTimeMinute() + getTimeHour() * 60; }
64 if (dKy_darkworld_check() != 0) {
65 return dKy_getDarktime_hour();
66 } else {
67 return dKy_getdaytime_hour();
68 }
69 }
71 if (dKy_darkworld_check() != 0) {
73 } else {
74 return dKy_getdaytime_minute();
75 }
76 }
77
78 int getStartTime() { return fopAcM_GetParam(this) & 0xff; }
79 int getEndTime() { return (fopAcM_GetParam(this) >> 8) & 0xff; }
80
81 inline void setLookMode(int i_lookMode);
82 inline bool chkFindPlayer();
83 inline void playMotion();
84
85 static EventFn mEvtSeqList[1];
87private:
88 /* 0xB48 */ J3DModel* mpModel1;
89 /* 0xB4C */ J3DModel* mpModel2;
91 /* 0xBF4 */ u8 field_0xbf4[0xbf8 - 0xbf4];
94 /* 0xC9C */ u8 field_0xc9c[0xca0 - 0xc9c];
95 /* 0xCA0 */ dCcD_Cyl mCcCyl;
98 /* 0xE00 */ u32 field_0xe00;
99 /* 0xE04 */ u32 field_0xe04;
100 /* 0xE08 */ u32 field_0xe08;
101 /* 0xE0C */ u32 field_0xe0c;
102 /* 0xE10 */ s16 mLookMode;
103 /* 0xE12 */ u16 mStartTime;
104 /* 0xE14 */ u16 mEndTime;
105 /* 0xE16 */ u16 field_0xe16;
106 /* 0xE18 */ u16 mMode;
107 /* 0xE1A */ u8 field_0xe1a;
108 /* 0xE1B */ u8 field_0xe1b; // Probably isDaytime or isNighttime
109};
110
111STATIC_ASSERT(sizeof(daNpcShoe_c) == 0xe1c);
112
114public:
115 /* 8095D5D4 */ virtual ~daNpcShoe_Param_c() {}
116
117 struct param {
118 /* 0x00 */ f32 mAttnOffsetY;
119 /* 0x04 */ f32 mGravity;
120 /* 0x08 */ f32 mScale;
121 /* 0x0C */ f32 mShadowDepth;
122 /* 0x10 */ f32 mCcWeight;
123 /* 0x14 */ f32 mCylH;
124 /* 0x18 */ f32 mWallH;
125 /* 0x1C */ f32 mWallR;
126 /* 0x20 */ f32 mBodyUpAngle;
127 /* 0x24 */ f32 mBodyDownAngle;
128 /* 0x28 */ f32 mBodyLeftAngle;
130 /* 0x30 */ f32 mHeadUpAngle;
131 /* 0x34 */ f32 mHeadDownAngle;
132 /* 0x38 */ f32 mHeadLeftAngle;
134 /* 0x40 */ f32 mNeckAngleScl;
135 /* 0x44 */ f32 mMorfFrames;
136 /* 0x48 */ s16 mSpeakDistIdx;
137 /* 0x4A */ s16 mSpeakAngleIdx;
138 /* 0x4C */ s16 mTalkDistIdx;
139 /* 0x4E */ s16 mTalkAngleIdx;
140 /* 0x50 */ f32 mAttnFovY;
141 /* 0x54 */ f32 mAttnRadius;
142 /* 0x58 */ f32 mAttnUpperY;
143 /* 0x5C */ f32 mAttnLowerY;
144 /* 0x60 */ s16 field_0x60;
145 /* 0x62 */ s16 mDamageTimer;
147 /* 0x66 */ s16 mTestMotion;
148 /* 0x68 */ s16 mTestLookMode;
149 /* 0x6A */ bool mTest;
150 };
151
152 static param const m;
153};
154
156
157#endif /* D_A_NPC_SHOE_H */
cPhs__Step
Definition c_phase.h:8
Definition d_a_npc.h:887
Definition d_a_npc.h:1231
Definition d_a_npc.h:903
Definition d_a_npc_shoe.h:113
virtual ~daNpcShoe_Param_c()
Definition d_a_npc_shoe.h:115
static param const m
Definition d_a_npc_shoe.h:107
Soal.
Definition d_a_npc_shoe.h:14
u8 field_0xe1a
Definition d_a_npc_shoe.h:107
Animation
Definition d_a_npc_shoe.h:19
@ ANM_SHOE_TALK_A
Definition d_a_npc_shoe.h:23
@ ANM_M_SIT_TO_WOLF_A
Definition d_a_npc_shoe.h:24
@ ANM_M_SITTALK_A
Definition d_a_npc_shoe.h:21
@ ANM_M_SITWAIT_A
Definition d_a_npc_shoe.h:20
@ ANM_M_SITTALK_A_B
Definition d_a_npc_shoe.h:22
daNpcF_ActorMngr_c mActorMngr[1]
Definition d_a_npc_shoe.h:93
u8 field_0xe1b
Definition d_a_npc_shoe.h:108
Motion
Definition d_a_npc_shoe.h:27
@ MOT_SIT_TO_WOLF_A
Definition d_a_npc_shoe.h:32
@ MOT_SITWAIT_A
Definition d_a_npc_shoe.h:28
@ MOT_SITTALK_A_B
Definition d_a_npc_shoe.h:30
@ MOT_SITTALK_A
Definition d_a_npc_shoe.h:29
@ MOT_SHOE_TALK_A
Definition d_a_npc_shoe.h:31
s16 mLookMode
Definition d_a_npc_shoe.h:102
void reset()
Definition d_a_npc_shoe.cpp:360
int Delete()
Definition d_a_npc_shoe.cpp:248
u32 field_0xe08
Definition d_a_npc_shoe.h:100
int setAction(actionFunc)
Definition d_a_npc_shoe.cpp:458
daNpcShoe_c()
Definition d_a_npc_shoe.cpp:91
request_of_phase_process_class mPhases[3]
Definition d_a_npc_shoe.h:97
u16 field_0xe16
Definition d_a_npc_shoe.h:105
int getTimeMinute()
Definition d_a_npc_shoe.h:70
int Draw()
Definition d_a_npc_shoe.cpp:278
static int createHeapCallBack(fopAc_ac_c *)
Definition d_a_npc_shoe.cpp:327
daNpcF_Lookat_c mLookat
Definition d_a_npc_shoe.h:92
bool(daNpcShoe_c::*) actionFunc(void *)
Definition d_a_npc_shoe.h:16
u32 field_0xe00
Definition d_a_npc_shoe.h:98
bool setMotionAnm(int, f32)
Definition d_a_npc_shoe.cpp:774
static EventFn mEvtSeqList[1]
Definition d_a_npc_shoe.h:86
actionFunc mpActionFn
Definition d_a_npc_shoe.h:96
cPhs__Step Create()
Definition d_a_npc_shoe.cpp:143
int getEndTime()
Definition d_a_npc_shoe.h:79
u16 mEndTime
Definition d_a_npc_shoe.h:104
bool chkFindPlayer()
Definition d_a_npc_shoe.cpp:21
~daNpcShoe_c()
Definition d_a_npc_shoe.cpp:96
void setParam()
Definition d_a_npc_shoe.cpp:659
J3DModel * mpModel2
Definition d_a_npc_shoe.h:89
int Execute()
Definition d_a_npc_shoe.cpp:254
s16 getMessageNo()
Definition d_a_npc_shoe.h:60
void lookat()
Definition d_a_npc_shoe.cpp:722
u8 field_0xbf4[0xbf8 - 0xbf4]
Definition d_a_npc_shoe.h:91
static BOOL ctrlJointCallBack(J3DJoint *, int)
Definition d_a_npc_shoe.cpp:333
J3DModel * mpModel1
Definition d_a_npc_shoe.h:88
void setMotion(int, f32, BOOL)
Definition d_a_npc_shoe.cpp:345
BOOL drawDbgInfo()
Definition d_a_npc_shoe.cpp:791
bool wait(void *)
Definition d_a_npc_shoe.cpp:473
BOOL(daNpcShoe_c::*) EventFn(int)
Definition d_a_npc_shoe.h:17
u16 mMode
Definition d_a_npc_shoe.h:106
bool fear(void *)
Definition d_a_npc_shoe.cpp:531
BOOL main()
Definition d_a_npc_shoe.cpp:673
u8 field_0xc9c[0xca0 - 0xc9c]
Definition d_a_npc_shoe.h:94
void adjustShapeAngle()
Definition d_a_npc_shoe.cpp:797
void playMotion()
Definition d_a_npc_shoe.cpp:427
u16 mStartTime
Definition d_a_npc_shoe.h:103
u32 field_0xe0c
Definition d_a_npc_shoe.h:101
void setLookMode(int i_lookMode)
Definition d_a_npc_shoe.cpp:15
BOOL CreateHeap()
Definition d_a_npc_shoe.cpp:197
int getTimeHour()
Definition d_a_npc_shoe.h:63
Z2CreatureCitizen mCreature
Definition d_a_npc_shoe.h:90
bool ctrlJoint(J3DJoint *, J3DModel *)
Definition d_a_npc_shoe.cpp:297
dCcD_Cyl mCcCyl
Definition d_a_npc_shoe.h:95
int getStartTime()
Definition d_a_npc_shoe.h:78
bool demo(void *)
Definition d_a_npc_shoe.cpp:594
void setAttnPos()
Definition d_a_npc_shoe.cpp:686
bool talk(void *)
Definition d_a_npc_shoe.cpp:555
u32 field_0xe04
Definition d_a_npc_shoe.h:99
int getTime()
Definition d_a_npc_shoe.h:62
STATIC_ASSERT(sizeof(daNpcShoe_c)==0xe1c)
int dKy_getdaytime_hour()
Definition d_kankyo.cpp:1499
int dKy_getDarktime_hour()
Definition d_kankyo.cpp:1520
int dKy_getdaytime_minute()
Definition d_kankyo.cpp:1504
int dKy_getDarktime_minute()
Definition d_kankyo.cpp:1525
bool dKy_darkworld_check()
Definition d_kankyo.cpp:6570
u32 fopAcM_GetParam(const void *i_actor)
Definition f_op_actor_mng.h:182
Definition d_a_hozelda.cpp:239
Definition d_a_hozelda.cpp:146
Definition d_a_npc_fguard.cpp:159
Definition d_a_npc_fguard.cpp:86
Definition d_a_npc_shoe.h:117
s16 mSpeakAngleIdx
Definition d_a_npc_shoe.h:137
s16 mTalkDistIdx
Definition d_a_npc_shoe.h:138
s16 mTestMotion
Definition d_a_npc_shoe.h:147
f32 mShadowDepth
Definition d_a_npc_shoe.h:121
f32 mAttnLowerY
Definition d_a_npc_shoe.h:143
f32 mAttnOffsetY
Definition d_a_npc_shoe.h:118
f32 mWallH
Definition d_a_npc_shoe.h:124
s16 field_0x60
Definition d_a_npc_shoe.h:144
f32 mAttnUpperY
Definition d_a_npc_shoe.h:142
f32 mAttnRadius
Definition d_a_npc_shoe.h:141
f32 mNeckAngleScl
Definition d_a_npc_shoe.h:134
f32 mHeadLeftAngle
Definition d_a_npc_shoe.h:132
s16 mTalkAngleIdx
Definition d_a_npc_shoe.h:139
f32 mHeadUpAngle
Definition d_a_npc_shoe.h:130
f32 mHeadDownAngle
Definition d_a_npc_shoe.h:131
f32 mBodyUpAngle
Definition d_a_npc_shoe.h:126
f32 mBodyDownAngle
Definition d_a_npc_shoe.h:127
s16 mTestLookMode
Definition d_a_npc_shoe.h:148
f32 mMorfFrames
Definition d_a_npc_shoe.h:135
f32 mAttnFovY
Definition d_a_npc_shoe.h:140
s16 mTestExpression
Definition d_a_npc_shoe.h:146
bool mTest
Definition d_a_npc_shoe.h:149
f32 mScale
Definition d_a_npc_shoe.h:120
f32 mHeadRightAngle
Definition d_a_npc_shoe.h:133
f32 mBodyRightAngle
Definition d_a_npc_shoe.h:129
s16 mSpeakDistIdx
Definition d_a_npc_shoe.h:136
f32 mCylH
Definition d_a_npc_shoe.h:123
f32 mCcWeight
Definition d_a_npc_shoe.h:122
f32 mGravity
Definition d_a_npc_shoe.h:119
f32 mBodyLeftAngle
Definition d_a_npc_shoe.h:128
s16 mDamageTimer
Definition d_a_npc_shoe.h:145
f32 mWallR
Definition d_a_npc_shoe.h:125
Definition d_a_hozelda.cpp:74
Definition d_a_hozelda.cpp:14
int BOOL
Definition types.h:30
unsigned long u32
Definition types.h:9
signed short int s16
Definition types.h:6
float f32
Definition types.h:22
unsigned short int u16
Definition types.h:7
unsigned char u8
Definition types.h:5