SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
NPCActor.hpp
1#pragma once
2
3#include "Game/LiveActor/LiveActor.hpp"
4#include "Game/NameObj/NameObjArchiveListCollector.hpp"
5#include "Game/Enemy/AnimScaleController.hpp"
6#include "Game/Util/JointController.hpp"
7
8namespace NrvNPCActor {
9 NERVE(NPCActorNrvWait);
10 NERVE(NPCActorNrvTalk);
11 NERVE(NPCActorNrvReaction);
12};
13
15public:
16 NPCActorCaps(const char *);
17
18 void setDefault();
19 void setIndirect();
20
21 const char* _0;
22 bool mInitModel; // _4
23 const char* mObjectName; // _8
24 u8 _C;
25 u8 _D;
26 u8 _E;
27 u8 _F;
28 const char* _10;
29 TVec3f mMessageOffset; // _14
30 MtxPtr mTalkMtx; // _20
31 const char* mTalkJointName; // _24
32 u8 _28;
33 bool mConnectsToScene; // _29
34 bool mUseLightCtrl; // _2A
35 bool mUseEffect; // _2B
36 bool mUseSounds; // _2C
37 u8 _2D;
38 u8 _2E;
39 u8 _2F;
40 u32 _30;
41 bool mCanBeHitByShell; // _34
42 u8 _35;
43 u8 _36;
44 bool mUsesNerves; // _37
45 u8 _38;
46 u8 _39;
47 u8 _3A;
48 u8 _3B;
49 f32 _3C;
50 bool mUseHitSensors; // _40
51 u8 _41;
52 u8 _42;
53 u8 _43;
54 u32 _44;
55 f32 mSensorSize; // _48
56 TVec3f mSensorOffset; // _4C
57 u32 _58;
58 u8 _5C;
59 bool mUseShadow; // _5D
60 u8 _5E;
61 u8 _5F;
62 f32 _60;
63 bool mUseRail; // _64
64 u8 _65;
65 u8 _66;
66 u8 _67;
67 bool mUseStarPointer; // _68
68 u32 _6C;
69 u32 _70;
70 TVec3f mStarPointerOffs; // _74
71 f32 _80;
72 u32 mSceneConnectionType; // _84
73 NrvNPCActor::NPCActorNrvWait* mWaitNerve; // _88
74 NrvNPCActor::NPCActorNrvTalk* mTalkNerve; // _8C
75 NrvNPCActor::NPCActorNrvReaction* mReactionNerve; // _90
76};
77
78class NPCActor : public LiveActor {
79public:
80 NPCActor(const char *);
81
82 virtual ~NPCActor() {
83
84 }
85
86 virtual void init(const JMapInfoIter &);
87 virtual void initAfterPlacement();
88 virtual void makeActorAppeared();
89 virtual void kill();
90 virtual void makeActorDead();
91 virtual void control();
92 virtual void calcAndSetBaseMtx();
93 virtual void attackSensor(HitSensor *, HitSensor *);
94 virtual bool receiveMsgPlayerAttack(u32, HitSensor *, HitSensor *);
95
96 static void makeArchiveList(NameObjArchiveListCollector *, const JMapInfoIter &);
97 static void addArchive(NameObjArchiveListCollector *, const NPCActorItem &);
98 static void makeArchiveListDefault(NameObjArchiveListCollector *, const JMapInfoIter &);
99
100 bool initTalkCtrl(const JMapInfoIter &, const char *, const TVec3f &, MtxPtr);
101 bool initTalkCtrlDirect(const JMapInfoIter &, const char *, const TVec3f &, MtxPtr);
102 bool calcJointScale(TPos3f *, const JointControllerInfo &);
103 void turnToPlayer();
104 void turnToPlayer(f32);
105 void turnToPlayer(f32, f32, f32);
106 void turnToDefault(f32);
107 void setToDefault();
108 void pushNerve(const Nerve *);
109 Nerve* popAndPushNerve(const Nerve *);
110 Nerve* popNerve();
111 bool tryPulNullNerve();
112 bool isEmptyNerve() const;
113 bool isScaleAnim() const;
114 bool isPointingSe() const;
115 void updateReaction();
116 void updateScaleCtrl();
117
118 void exeWait();
119 void exeTalk();
120
121 void setInitPose();
122
123 LodCtrl* mLodCtrl; // _8C
124 TalkMessageCtrl* mMsgCtrl; // _90
125 PartsModel* _94;
126 PartsModel* _98;
127 u32 _9C;
128 TVec4f _A0;
129 TVec4f _B0;
130 TVec3f _C0;
131 TVec3f _CC;
132 u8 _D8;
133 u8 _D9;
134 u8 _DA;
135 u8 _DB;
136 u8 _DC;
137 u8 _DD;
138 u8 _DE;
139 u8 _DF;
140 u8 _E0;
141 u8 _E1;
142 u8 _E2;
143 u8 _E3;
144 u8 _E4;
145 u8 _E5;
146 u8 _E6;
147 u8 _E7;
148 u8 _E8;
149 u8 _E9;
150 f32 _EC;
151 f32 _F0;
152 f32 _F4;
153 f32 _F8;
154 const char* _FC;
155 u32 _100;
156 u32 _104;
157 u32 _108;
158 u32 _10C;
159 u32 _110;
160 u32 _114;
161 u32 _118;
162 u32 _11C;
163 u32 _120;
164 u8 _124;
165 u8 _125;
166 u8 _126;
167 u8 _127;
168 u8 _128;
169 f32 _12C;
170 const char* _130;
171 const char* _134;
172 const char* _138;
173 const char* _13C;
174 AnimScaleController* mScaleController; // _140
175 u32 _144;
176 Nerve* mCurNerve; // _148
177 NrvNPCActor::NPCActorNrvWait* mWaitNerve; // _14C
178 NrvNPCActor::NPCActorNrvTalk* mTalkNerve; // _150
179 NrvNPCActor::NPCActorNrvReaction* mReactionNerve; // _154
180 u32 _158;
181};
182
184public:
185 NPCActorItem(const char *pName);
186
187 const char* mName; // _0
188 u32* _4;
189 u32* _8;
190 const char* _C;
191 u32* _10;
192};
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
Definition NPCActor.cpp:184
virtual void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.
Stores archive names of NameObjs.
Used for executing states of a LiveActor.
Definition Nerve.hpp:6