forked from zeldaret/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd_a_npc_bouS.h
More file actions
157 lines (137 loc) · 4.31 KB
/
d_a_npc_bouS.h
File metadata and controls
157 lines (137 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#ifndef D_A_NPC_BOUS_H
#define D_A_NPC_BOUS_H
#include "d/actor/d_a_npc4.h"
/**
* @ingroup actors-npcs
* @class daNpcBouS_c
* @brief Mayor Bo (inside house)
*
* @details
*
*/
struct daNpcBouS_HIOParam {
/* 0x00 */ daNpcF_HIOParam common;
/* 0x6C */ f32 excitement_level;
/* 0x70 */ f32 talk_dist;
/* 0x74 */ f32 gaze_x;
/* 0x78 */ f32 gaze_y;
/* 0x7C */ f32 gaze_z;
/* 0x80 */ f32 eye_dist;
/* 0x84 */ s16 eye_angle_x;
/* 0x86 */ s16 eye_angle_y;
/* 0x88 */ s16 field_0x88;
};
class daNpcBouS_Param_c {
public:
virtual ~daNpcBouS_Param_c() {}
static daNpcBouS_HIOParam const m;
};
#if DEBUG
class daNpcBouS_HIO_c : public mDoHIO_entry_c {
public:
daNpcBouS_HIO_c();
void listenPropertyEvent(const JORPropertyEvent*);
void genMessage(JORMContext*);
/* 0x8 */ daNpcBouS_HIOParam m;
};
#define NPC_BOUS_HIO_CLASS daNpcBouS_HIO_c
#else
#define NPC_BOUS_HIO_CLASS daNpcBouS_Param_c
#endif
class daNpcBouS_c : public daNpcF_c {
public:
typedef bool (daNpcBouS_c::*actionFunc)(void*);
typedef int (daNpcBouS_c::*eventFunc)(int);
daNpcBouS_c();
~daNpcBouS_c();
cPhs_Step Create();
int CreateHeap();
int Delete();
int Execute();
int Draw();
int ctrlJoint(J3DJoint*, J3DModel*);
static int createHeapCallBack(fopAc_ac_c*);
static int ctrlJointCallBack(J3DJoint*, int);
bool setExpressionAnm(int, bool);
bool setExpressionBtp(int);
void setMotionAnm(int, f32);
void reset();
inline BOOL setAction(actionFunc);
bool checkInstructionTag(fopAc_ac_c*);
bool wait(void*);
void setMotion(int, f32, int);
void setExpression(int, f32);
bool talk(void*);
bool demo(void*);
inline fopAc_ac_c* searchInstructionTag();
bool instruction(void*);
bool checkIntroDemoStart();
int EvCut_BousIntroSumo1(int);
int EvCut_BousIntroSumo2(int);
int EvCut_BousIntroSumo3(int);
inline void setParam();
inline BOOL main();
inline void playExpression();
inline void playMotion();
inline BOOL ctrlBtk();
inline void setAttnPos();
inline void lookat();
inline BOOL step(s16, int);
inline int drawDbgInfo();
inline void drawOtherMdls();
void adjustShapeAngle() {}
s16 getMessageNo() { return (fopAcM_GetParam(this) >> 8) & 0xFFFF; }
s8 getArenaNo() { return fopAcM_GetParam(this) & 0xFF; }
inline BOOL chkFindPlayer();
void setLookMode(int i_lookMode) { if (i_lookMode >= 0 && i_lookMode < 4 && i_lookMode != mLookMode) mLookMode = i_lookMode; }
inline void setExpressionTalkAfter();
s8 getType() { return argument & 0x7F; }
void setInstructionPos() {
fopAc_ac_c* actor = searchInstructionTag();
if (actor != NULL) {
current.pos = fopAcM_GetPosition(actor);
old.pos = current.pos;
setAngle(fopAcM_GetShapeAngle_p(actor)->y);
cXyz pos(0.0f, 0.0f, 220.0f);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::YrotM(shape_angle.y);
mDoMtx_stack_c::multVec(&pos, &pos);
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&pos, (s16)(shape_angle.y + 0x8000), 0);
}
}
void setHome() {
old.pos = current.pos = home.pos;
shape_angle.y = home.angle.y;
}
void offDispFlag() { mDispFlag = 0; }
void onDispFlag() { mDispFlag = 1; }
void setMessageNo(s16 i_msgNo) {
mMsgNo = i_msgNo;
}
void setForcibleTalk() {
mForcibleTalk = 1;
}
static eventFunc mEvtSeqList[4];
private:
/* 0xB48 */ Z2Creature mSound;
/* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm;
/* 0xBDC */ daNpcF_Lookat_c mLookat;
/* 0xC78 */ daNpcF_ActorMngr_c mActorMngrs[1];
/* 0xC80 */ NPC_BOUS_HIO_CLASS* mHIO;
/* 0xC84 */ dCcD_Cyl mCyl;
/* 0xDC0 */ actionFunc mAction;
/* 0xDCC */ u8 field_0xdcc[0xdd4 - 0xdcc];
/* 0xDD4 */ request_of_phase_process_class mPhases[2];
/* 0xDE4 */ fpc_ProcID mItemPartnerId;
/* 0xDE8 */ int mTimer;
/* 0xDEC */ int mInstructionMode;
/* 0xDF0 */ int mMsgNo;
/* 0xDF4 */ u8 field_0xdf4[0xdf8 - 0xdf4];
/* 0xDF8 */ s16 mLookMode;
/* 0xDFA */ s16 mMotionPhaseCopy;
/* 0xDFC */ u16 mMode;
/* 0xDFE */ u8 mForcibleTalk;
/* 0xDFF */ u8 mDispFlag;
};
STATIC_ASSERT(sizeof(daNpcBouS_c) == 0xe00);
#endif /* D_A_NPC_BOUS_H */