SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
MapPartsRotator.hpp
1#pragma once
2
3#include "Game/MapObj/MapPartsFunction.hpp"
4#include "Game/LiveActor/Nerve.hpp"
5#include <JSystem/JGeometry/TMatrix.hpp>
6
8public:
9 virtual ~MapPartsRotatorBase();
10
11 virtual bool isMoving() const {
12 return false;
13 }
14
15 virtual bool isOnReverse() const {
16 return false;
17 }
18
19 virtual f32 getRotateSpeed() const {
20 return 1.0f;
21 }
22};
23
25public:
27
28 enum AxisType {
29
30 };
31
32 virtual ~MapPartsRotator();
33 virtual void init(const JMapInfoIter &);
34 virtual bool isWorking() const;
35 virtual void start();
36 virtual void end();
37 virtual TMtx34f& getRotateMtx() const;
38 virtual bool isMoving() const;
39 virtual bool isOnReverse() const;
40 virtual f32 getRotateSpeed() const;
41
42 void startWithSignalMotion();
43 void cancelSignalMotion();
44 void updateBaseHostMtx();
45 void updateVelocity();
46 void updateAngle();
47 void updateTargetAngle();
48 void restartAtEnd();
49 void initRotateSpeed(const JMapInfoIter &);
50 bool isReachedTargetAngle() const;
51 void updateRotateMtx(AxisType, f32);
52 void calcRotateAxisDir(AxisType, TVec3f *) const;
53
54 void exeRotate();
55 void exeRotateStart();
56
57 f32 _18;
58 f32 mRotateAngle; // _1C
59 s32 mRotateStopTime; // _20
60 f32 mTargetAngle; // _24
61 f32 mRotateSpeed; // _28
62 f32 mAngle; // _2C
63 s32 mRotateAxis; // _30
64 s32 mRotateAccelType; // _34
65 s32 mRotateType; // _38
66 s32 mSignMotionType; // _3C
67 TMtx34f _40;
68 TMtx34f _70;
69 f32 _A0;
70 bool mIsOnReverse; // _A4
71};
72
73namespace NrvMapPartsRotator {
74 NERVE(HostTypeNeverMove);
75 NERVE(HostTypeWait);
76 NERVE(HostTypeRotateStart);
77 NERVE(HostTypeRotate);
78 NERVE(HostTypeStopAtEnd);
79};
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.