SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
LiveActor.hpp
1#pragma once
2
3#include "Game/NameObj/NameObj.hpp"
4#include "Game/LiveActor/LiveActorFlag.hpp"
5#include "Game/LiveActor/ActorAnimKeeper.hpp"
6#include "Game/LiveActor/ActorLightCtrl.hpp"
7#include "Game/LiveActor/EffectKeeper.hpp"
8#include "Game/LiveActor/HitSensorKeeper.hpp"
9#include "Game/LiveActor/ModelManager.hpp"
10#include "Game/LiveActor/ShadowController.hpp"
11#include "Game/LiveActor/Spine.hpp"
12#include "Game/LiveActor/RailRider.hpp"
13#include "Game/Map/StageSwitch.hpp"
14#include "JSystem/JGeometry/TVec.hpp"
15
18class Binder;
19class CollisionParts;
21class StarPointerTarget;
22
24class LiveActor : public NameObj {
25public:
28 LiveActor(const char *pName);
29
30 virtual inline ~LiveActor() {}
31
32 virtual void init(JMapInfoIter const &);
33 virtual void movement();
34 virtual void calcAnim();
35 virtual void calcViewAndEntry();
36 virtual void appear();
37 virtual void makeActorAppeared();
38 virtual void kill();
39 virtual void makeActorDead();
40 virtual bool receiveMessage(u32, HitSensor *, HitSensor *);
41
44 virtual MtxPtr getBaseMtx() const;
45 virtual MtxPtr getTakingMtx() const;
46 virtual void startClipped();
47 virtual void endClipped();
48 virtual void control();
49
51 virtual void calcAndSetBaseMtx();
52 virtual void updateHitSensor(HitSensor *);
53 virtual void attackSensor(HitSensor *, HitSensor *);
54 virtual bool receiveMsgPush(HitSensor *, HitSensor *);
55 virtual bool receiveMsgPlayerAttack(u32, HitSensor *, HitSensor *);
56 virtual bool receiveMsgEnemyAttack(u32, HitSensor *, HitSensor *);
57 virtual u32 receiveMsgTake(HitSensor *, HitSensor *);
58 virtual u32 receiveMsgTaken(HitSensor *, HitSensor *);
59 virtual u32 receiveMsgThrow(HitSensor *, HitSensor *);
60 virtual u32 receiveMsgApart(HitSensor *, HitSensor *);
61 virtual bool receiveOtherMsg(u32, HitSensor *, HitSensor *);
62
63 void calcAnmMtx();
64 void setNerve(const Nerve *);
65 bool isNerve(const Nerve *) const;
66 s32 getNerveStep() const;
67
71 HitSensor* getSensor(const char *pSensorName) const;
72 void initModelManagerWithAnm(const char *, const char *, bool);
73 void initNerve(const Nerve *);
74 void initHitSensor(int);
75 void initBinder(f32, f32, u32);
76 void initRailRider(const JMapInfoIter &);
77 void initEffectKeeper(int, const char *, bool);
78 void initSound(int, bool);
79 void initShadowControllerList(u32);
80 void initActorCollisionParts(const char *, HitSensor *, ResourceHolder *, MtxPtr, bool, bool);
81 void initStageSwitch(const JMapInfoIter &);
82 void initActorStarPointerTarget(f32, const TVec3f *, MtxPtr, TVec3f);
83 void initActorLightCtrl();
84 void addToSoundObjHolder();
85 void updateBinder();
86
87 inline bool isBinderValid(Binder *pBinder) {
88 return pBinder;
89 }
90
91 inline TVec3f* getPosPtr() {
92 return &mPosition;
93 }
94
95 /* 0xC */ TVec3f mPosition;
96 /* 0x18 */ TVec3f mRotation;
97 /* 0x24 */ TVec3f mScale;
98 /* 0x30 */ TVec3f mVelocity;
99 /* 0x3C */ TVec3f mGravity;
102 Spine* mSpine; // _50
104 Binder* mBinder; // _58
105 /* 0x5C */ RailRider* mRailRider;
106 EffectKeeper* mEffectKeeper; // _60
107 AudAnmSoundObject* mSoundObject; // _64
109 ShadowControllerList* mShadowList; // _74
110 CollisionParts* mCollisionParts; // _78
112 StarPointerTarget* mStarPointerTarget; // _80
113 ActorLightCtrl* mActorLightCtrl; // _84
114 ActorPadAndCameraCtrl* mCameraCtrl; // _88
115};
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
TVec3f mRotation
3D vector of the actor's rotation.
Definition LiveActor.hpp:96
RailRider * mRailRider
A pointer to a RailRider instance, used for allowing the actor to ride on paths.
HitSensorKeeper * mSensorKeeper
A pointer to a HitSensorKeeper instance, used for storing HitSensor instances.
TVec3f mPosition
3D vector of the actor's position.
Definition LiveActor.hpp:95
LiveActor(const char *pName)
Constructs a new LiveActor instance.
Definition LiveActor.cpp:9
TVec3f mScale
3D vector of the actor's scale.
Definition LiveActor.hpp:97
TVec3f mVelocity
3D vector of the actor's velocity.
Definition LiveActor.hpp:98
StageSwitchCtrl * mStageSwitchCtrl
A pointer to a StageSwitchCtrl instance, used for activating and deactivating switches.
LiveActorFlag mFlags
Flags relating to drawing, animation calculation, etc.
virtual void init(JMapInfoIter const &)
Intializes the NameObj and can set various settings and construct necessary classes.
Definition LiveActor.cpp:26
virtual void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.
ModelManager * mModelManager
A pointer to a ModelManager instance, used for drawing a 3D model.
ActorAnimKeeper * mAnimationKeeper
A pointer to a ActorAnimKeeper instance, used for storing and playing model animations.
TVec3f mGravity
3D vector of the actor's gravity.
Definition LiveActor.hpp:99
virtual MtxPtr getBaseMtx() const
Gets the base matrix of the model used for the actor.
HitSensor * getSensor(const char *pSensorName) const
Gets a sensor.
The most basic form of an object.
Definition NameObj.hpp:11
Used for executing states of a LiveActor.
Definition Nerve.hpp:6
Definition Spine.hpp:9