SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
FloaterFloatingForce.cpp
1#include "Game/MapObj/FloaterFloatingForce.hpp"
2#include "Game/LiveActor/LiveActor.hpp"
3
4FloaterFloatingForce::~FloaterFloatingForce() {
5
6}
7
8FloaterFloatingForce::FloaterFloatingForce(LiveActor *pActor, const char *pName) : MapPartsFunction(pActor, "浮力"), _18(pName), _1C(gZeroVec) {
9 _28.setInlinePS(TVec3f(0.0f, 1.0f, 0.0f));
10 mMoveCondition = 0.0f;
11}
12
14 s32 moveType = 0;
15 MR::getMapPartsArgMoveConditionType(&moveType, rIter);
16 mMoveCondition = moveType;
17}
18
19void FloaterFloatingForce::start() {
20 _1C.x = mHost->mPosition.x;
21 _1C.y = mHost->mPosition.y;
22 _1C.z = mHost->mPosition.z;
23 TSMtxf matrix;
24 f32 x, y, z;
25 matrix.setInline_2(mHost->getBaseMtx());
26 x = matrix.mMtx[0][1];
27 y = matrix.mMtx[1][1];
28 z = matrix.mMtx[2][1];
29 _28.set<f32>(x, y, z);
30 MR::normalize(&_28);
31}
32
33const TVec3f& FloaterFloatingForce::getCurrentVelocity() const {
34 return TVec3f(0.0f, 0.0f, 0.0f);
35}
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
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 MtxPtr getBaseMtx() const
Gets the base matrix of the model used for the actor.