SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
CutBushModelObj.cpp
1#include "Game/MapObj/CutBushModelObj.hpp"
2#include "Game/Util.hpp"
3
4CutBushModelObj::CutBushModelObj(const char *pName, const char *pObjName, bool useLight, MtxPtr mtx) : LiveActor(pName) {
5 mMtx = mtx;
6 initModelManagerWithAnm(pObjName, nullptr, false);
7 MR::connectToSceneNoSilhouettedMapObjWeakLightNoMovement(this);
8
9 if (useLight) {
10 MR::initLightCtrl(this);
11 }
12
13 initSound(8, false);
14
15 if (mMtx) {
16 mPosition.set(mMtx[0][3], mMtx[1][3], mMtx[2][3]);
17 }
18}
19
21 makeActorAppeared();
22}
23
24void CutBushModelObj::initAfterPlacement() {
25 if (MR::getLightCtrl(this)) {
26 MR::updateLightCtrlDirect(this);
27 }
28}
29
31 if (mMtx) {
32 mPosition.set(mMtx[0][3], mMtx[1][3], mMtx[2][3]);
33 MR::setBaseTRMtx(this, mMtx);
34 }
35 else {
37 }
38}
39
40CutBushModelObj::~CutBushModelObj() {
41
42}
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
virtual void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
TVec3f mPosition
3D vector of the actor's position.
Definition LiveActor.hpp:95
virtual void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.