SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
LiveActorUtil.hpp
1#pragma once
2
3#include "JSystem/JGeometry/TVec.hpp"
4#include "Game/Animation/AnmPlayer.hpp"
5#include "Game/Util/JMapInfo.hpp"
6#include <revolution.h>
7
10class Nerve;
11class ResourceHolder;
12class ActorLightCtrl;
14class ModelObj;
15class BrkCtrl;
16class PartsModel;
17class LodCtrl;
18class CollisionParts;
19class HitSensor;
20class BtkCtrl;
21class MsgSharedGroup;
22class ResTIMG;
23class LiveActor;
24
25namespace MR {
26 enum CollisionScaleType {
27 UNKNOWN_0 = 0,
28 UNKNOWN_1 = 1,
29 UNKNOWN_2 = 2,
30 UNKNOWN_3 = 3
31 };
32
33 bool isExistIndirectTexture(const LiveActor *);
34
35 bool isAnyAnimStopped(const LiveActor *, const char *);
36
37 void validateClipping(LiveActor *);
38 void invalidateClipping(LiveActor *);
39 void setClippingTypeSphere(LiveActor *, f32);
40 void setClippingTypeSphere(LiveActor *, f32, const TVec3f *);
41 void setClippingFarMax(LiveActor *);
42 void setClippingFar50m(LiveActor *);
43 void setClippingFar200m(LiveActor *);
44 void startBtk(const LiveActor *, const char *);
45
46 void setBaseScale(LiveActor *, const TVec3f &);
47
48 MsgSharedGroup* joinToGroupArray(LiveActor *, const JMapInfoIter &, const char *, s32);
49 LiveActorGroup* getGroupFromArray(const LiveActor *);
50
51 void copyTransRotateScale(const LiveActor *, LiveActor *);
52 bool isDead(const LiveActor *);
53
54 void initDefaultPos(LiveActor *, const JMapInfoIter &);
55 void initDefaultPosNoRepeat(LiveActor *, const JMapInfoIter &);
56 bool isValidMovement(const LiveActor *);
57 bool isValidCalcAnim(const LiveActor *);
58 bool isValidCalcViewAndEntry(const LiveActor *);
59 bool isValidDraw(const LiveActor *);
60
61 void invalidateClipping(LiveActor *);
62
63 bool isClipped(const LiveActor *);
64 bool isInvalidClipping(const LiveActor *);
65
66 bool isHiddenModel(const LiveActor *);
67
68 void onBind(LiveActor *);
69 void offBind(LiveActor *);
70
71
72 bool isCalcGravity(const LiveActor *);
73
74 void showModel(LiveActor *);
75 void hideModel(LiveActor *);
76 void showModelIfHidden(LiveActor *);
77 void hideModelIfHidden(LiveActor *);
78
79 void hideModelAndOnCalcAnim(LiveActor *);
80 void stopAnimFrame(LiveActor *);
81
82 ResourceHolder* getResourceHolder(const LiveActor *);
83 ResourceHolder* getModelResourceHolder(const LiveActor *);
84
85 bool isNoEntryDrawBuffer(const LiveActor *);
86
87 void onCalcAnim(LiveActor *);
88 void offCalcAnim(LiveActor *);
89
90 void onEntryDrawBuffer(LiveActor *);
91 void offEntryDrawBuffer(LiveActor *);
92
93 const char* getModelResName(const LiveActor *);
94
95 void onCalcGravity(LiveActor *);
96 void offCalcGravity(LiveActor *);
97
98 void calcGravityOrZero(LiveActor *);
99
100 void calcAnimDirect(LiveActor *);
101
102 void calcGravity(LiveActor *);
103 void calcGravity(LiveActor *, const TVec3f &);
104
105 void offCalcShadow(LiveActor *, const char *);
106
107 void zeroVelocity(LiveActor *);
108
109 bool isNoBind(const LiveActor *);
110
111 void initLightCtrl(LiveActor *);
112 void initLightCtrlForPlayer(LiveActor *);
113 void initLightCtrlNoDrawEnemy(LiveActor *);
114 void initLightCtrlNoDrawMapObj(LiveActor *);
115 void updateLightCtrl(LiveActor *);
116 void updateLightCtrlDirect(LiveActor *);
117 void loadActorLight(const LiveActor *);
118 void calcLightPos0(TVec3f *, const LiveActor *);
119 void calcLightPos1(TVec3f *, const LiveActor *);
120 const GXColor* getLightAmbientColor(const LiveActor *);
121 ActorLightCtrl* getLightCtrl(const LiveActor *);
122 bool isStep(const LiveActor *, s32);
123 bool isFirstStep(const LiveActor *);
124 bool isLessStep(const LiveActor *, s32);
125 bool isLessEqualStep(const LiveActor *, s32);
126 bool isGreaterStep(const LiveActor *, s32);
127 bool isGreaterEqualStep(const LiveActor *, s32);
128 bool isIntervalStep(const LiveActor *, s32);
129 bool isNewNerve(const LiveActor *);
130 f32 calcNerveRate(const LiveActor *, s32);
131 f32 calcNerveRate(const LiveActor *, s32, s32);
132 f32 calcNerveEaseInRate(const LiveActor *, s32);
133 f32 calcNerveEaseOutRate(const LiveActor *, s32);
134 f32 calcNerveEaseOutRate(const LiveActor *, s32, s32);
135 f32 calcNerveEaseInOutRate(const LiveActor *, s32);
136 f32 calcNerveEaseInOutRate(const LiveActor *, s32, s32);
137 f32 calcNerveValue(const LiveActor *, s32, f32, f32);
138 f32 calcNerveValue(const LiveActor *, s32, s32, f32, f32);
139 f32 calcNerveEaseInValue(const LiveActor *, s32, f32, f32);
140 f32 calcNerveEaseInValue(const LiveActor *, s32, s32, f32, f32);
141 f32 calcNerveEaseOutValue(const LiveActor *, s32, f32, f32);
142 f32 calcNerveEaseInOutValue(const LiveActor *, s32, f32, f32);
143 f32 calcNerveEaseInOutValue(const LiveActor *, s32, s32, f32, f32);
144 void setNerveAtStep(LiveActor *, const Nerve *, s32);
145 void setNerveAtBckStopped(LiveActor *, const Nerve *);
146 bool trySetNerve(LiveActor *, const Nerve *);
147
148 bool isNoCalcAnim(const LiveActor *);
149
150 void initCollisionParts(LiveActor *, const char *, HitSensor *, MtxPtr);
151
152 void initCollisionPartsAutoEqualScale(LiveActor *, const char *, HitSensor *, MtxPtr);
153
154 void setBaseTRMtx(LiveActor *, MtxPtr);
155 void setBaseTRMtx(LiveActor *, const TPos3f &);
156
157 void setClippingFar(LiveActor *, f32);
158 void setClippingFar100m(LiveActor *);
159
160 void setClippingTypeSphereContainsModelBoundingBox(LiveActor *, f32);
161
162 void validateCollisionParts(LiveActor *);
163 void validateCollisionParts(CollisionParts *);
164
165 void invalidateCollisionParts(LiveActor *);
166 void invalidateCollisionParts(CollisionParts *);
167
168 void offUpdateCollisionParts(LiveActor *);
169
170 void onUpdateCollisionPartsOnetimeImmediately(LiveActor *);
171
172 bool isExistCollisionParts(const LiveActor *);
173
174 void resetAllCollisionMtx(LiveActor *);
175
176 void startAllAnim(const LiveActor *, const char *);
177 bool tryStartAllAnim(const LiveActor *, const char *);
178
179 bool isAnyAnimOneTimeAndStopped(const LiveActor *, const char *);
180
181 bool isBrkOneTimeAndStopped(const LiveActor *);
182
183 void setAllAnimFrame(const LiveActor *, const char *, f32);
184 void setAllAnimFrameAtEnd(const LiveActor *, const char *);
185
186 void startBck(const LiveActor *, const char *, const char *);
187 void startBckNoInterpole(const LiveActor *, const char *);
188 void startBckWithInterpole(const LiveActor *, const char *, s32);
189 void startBrk(const LiveActor *, const char *);
190 void startBva(const LiveActor *, const char *);
191 void setBvaFrameAndStop(const LiveActor *, f32);
192
193 J3DFrameCtrl* getBrkCtrl(const LiveActor *);
194 J3DFrameCtrl* getBtkCtrl(const LiveActor *);
195 J3DFrameCtrl* getBpkCtrl(const LiveActor *);
196 J3DFrameCtrl* getBtpCtrl(const LiveActor *);
197
198 void startBrkAndSetFrameAndStop(const LiveActor *, const char *, f32);
199 bool tryStartBck(const LiveActor *, const char *, const char *);
200 void setBckRate(const LiveActor *, f32);
201
202 void setBrkRate(const LiveActor *, f32);
203
204 f32 getBckFrameMax(const LiveActor *);
205 f32 getBrkFrameMax(const LiveActor *);
206 f32 getBtkFrameMax(const LiveActor *);
207 void setBckFrameAndStop(const LiveActor *, f32);
208
209 s16 getBrkFrameMax(const LiveActor *, const char *);
210
211 void setBtkFrame(LiveActor *, f32);
212 void setBtkFrameAndStop(const LiveActor *, f32);
213
214 bool isExistBck(const LiveActor *, const char *);
215 bool isExistBva(const LiveActor *, const char *);
216 bool isExistBtk(const LiveActor *, const char *);
217 bool isExistBpk(const LiveActor *, const char *);
218 bool isExistBtp(const LiveActor *, const char *);
219 bool isExistBrk(const LiveActor *, const char *);
220
221 bool isBckPlaying(const LiveActor *, const char *);
222
223 bool isBckStopped(const LiveActor *);
224 bool isBrkStopped(const LiveActor *);
225 bool isBtkStopped(const LiveActor *);
226 bool isBtpStopped(const LiveActor *);
227 bool isBpkStopped(const LiveActor *);
228
229 bool isBckOneTimeAndStopped(const LiveActor *);
230
231
232 void setBrkFrame(const LiveActor *, f32);
233 void setBrkFrameAndStop(const LiveActor *, f32);
234 void setBrkFrameEndAndStop(const LiveActor *);
235
236 void setBckFrameAtRandom(const LiveActor *);
237
238 void setBaseTRMtx(LiveActor *, const TPos3f &);
239
240 void setBpkFrame(const LiveActor *, f32);
241 void stopBck(const LiveActor *);
242
243 void startBtp(const LiveActor *, const char *);
244 void setBtpFrame(const LiveActor *, f32);
245 void setBtpFrameAndStop(const LiveActor *, f32);
246
247 void startBpk(const LiveActor *, const char *);
248
249 ProjmapEffectMtxSetter* initDLMakerProjmapEffectMtxSetter(LiveActor *);
250
251 void newDifferedDLBuffer(LiveActor *);
252
253 ModelObj* createModelObjMapObj(const char *, const char *, MtxPtr);
254 ModelObj* createModelObjMapObjStrongLight(const char *, const char *, MtxPtr);
255 ModelObj* createModelObjIndirectMapObj(const char *, const char *, MtxPtr);
256 ModelObj* createModelObjNoSilhouettedMapObj(const char *, const char *, MtxPtr);
257 ModelObj* createModelObjNpc(const char *, const char *, MtxPtr);
258
259 void sendMsgToGroupMember(u32, LiveActor *, HitSensor *, const char *);
260
261 void callAppearAllGroupMember(const LiveActor *);
262 void callMakeActorDeadAllGroupMember(const LiveActor *);
263 void callRequestMovementOnAllGroupMember(const LiveActor *);
264
265 void setGroupClipping(LiveActor *, const JMapInfoIter &, int);
266
267 PartsModel* createPartsModelNoSilhouettedMapObj(LiveActor *, const char *, const char *, MtxPtr);
268
269 void startAction(const LiveActor *, const char *);
270
271 LodCtrl* createLodCtrlPlanet(LiveActor *, const JMapInfoIter &, f32, s32);
272 LodCtrl* createLodCtrlNPC(LiveActor *, const JMapInfoIter &);
273
274 bool changeShowModelFlagSyncNearClipping(LiveActor *, f32);
275
276 void hideModelAndOnCalcAnimIfShown(LiveActor *);
277
278 bool tryCreateMirrorActor(LiveActor *, const char *);
279
280 CollisionParts* createCollisionPartsFromLiveActor(LiveActor *, const char *, HitSensor *, CollisionScaleType);
281
282 bool isBinded(const LiveActor *);
283
284 bool isBindedGround(const LiveActor *);
285 bool isBindedWall(const LiveActor *);
286
287 bool isBindedGroundIce(const LiveActor *);
288 bool isBindedGroundWater(const LiveActor *);
289
290 bool isActionEnd(const LiveActor *);
291
292 void setMirrorReflectionInfoFromModel(LiveActor *);
293
294 bool isBindedRoof(const LiveActor *);
295 bool isOnGround(const LiveActor *);
296
297 bool isPressedRoofAndGround(const LiveActor *);
298
299 TVec3f* getRoofNormal(const LiveActor *);
300 TVec3f* getWallNormal(const LiveActor *);
301 TVec3f* getGroundNormal(const LiveActor *);
302
303 void setBinderExceptSensorType(LiveActor *, const TVec3f *, f32);
304
305 void setBinderOffsetVec(LiveActor *, const TVec3f *, bool);
306
307 void setBinderExceptActor(LiveActor *, const LiveActor *);
308
309 bool tryCreateCollisionAllOtherCategory(LiveActor *, MtxPtr, HitSensor *, CollisionParts **, CollisionParts **, CollisionParts **);
310 bool tryCreateCollisionAllOtherCategory(LiveActor *, HitSensor *, CollisionParts **, CollisionParts **, CollisionParts **);
311
312 f32 getCollisionBoundingSphereRange(const LiveActor *);
313
314 bool isExistAnim(const LiveActor *, const char *);
315
316 void setMirrorReflectionInfoFromMtxYUp(const TPos3f &);
317
318 const char* createLowModelObjName(const LiveActor *);
319 const char* createMiddleModelObjName(const LiveActor *);
320
321 void addToAttributeGroupSearchTurtle(const LiveActor *);
322
323 void stopSceneAtStep(const LiveActor *, s32, s32);
324
325 void initJointTransform(const LiveActor *);
326
327 void initCollisionPartsAutoEqualScaleOne(LiveActor *, const char *, HitSensor *, MtxPtr);
328
329 ResTIMG* getTexFromArc(const char *, const LiveActor *);
330 PartsModel* createBloomModel(LiveActor *, MtxPtr);
331
332 CollisionParts* getCollisionParts(const LiveActor *);
333};
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
Used for executing states of a LiveActor.
Definition Nerve.hpp:6