SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
RailRider.hpp
1#pragma once
2
3#include "Game/Util.hpp"
4#include "Game/Map/BezierRail.hpp"
5
6class RailRider {
7public:
8 RailRider(const JMapInfoIter &);
9 RailRider(s32, s32);
10
11 void move();
12 void moveToNearestPos(const TVec3f &);
13 void moveToNearestPoint(const TVec3f &);
14 void moveToNextPoint();
15 void reverse();
16 void calcPosAtCoord(TVec3f *, f32) const;
17 void calcDirectionAtCoord(TVec3f *, f32) const;
18 f32 calcNearestPos(const TVec3f &) const;
19 f32 getTotalLength() const;
20 f32 getPartLength(int) const;
21 bool isLoop() const;
22 bool isReachedGoal() const;
23 bool isReachedEdge() const;
24 void setCoord(f32);
25 void setSpeed(f32);
26 bool getRailArgWithInit(const char *, s32 *) const;
27 bool getRailArgNoInit(const char *, s32 *) const;
28 f32 getNextPointCoord() const;
29 f32 getCurrentPointCoord() const;
30 s32 getPointNum() const;
31 void copyPointPos(TVec3f *, s32) const;
32 f32 getPointCoord(s32) const;
33 void initBezierRail(const JMapInfoIter &, const JMapInfo *);
34 bool getPointArgS32NoInit(const char *, s32 *, s32) const;
35 bool getPointArgS32WithInit(const char *, s32 *, s32) const;
36 bool getCurrentPointArgS32NoInit(const char *, s32 *) const;
37 bool getCurrentPointArgS32WithInit(const char *, s32 *) const;
38 bool getNextPointArgS32NoInit(const char *, s32 *) const;
39 bool getNextPointArgS32WithInit(const char *, s32 *) const;
40 s32 getNextPointNo() const;
41 void syncPosDir();
42
43 inline TVec3f getStartPos() {
44 return mStartPos;
45 }
46
47 inline TVec3f getEndPos() {
48 return mEndPos;
49 }
50
51 BezierRail* mBezierRail; // _0
52 f32 mCoord; // _4
53 f32 mSpeed; // _8
54 bool mIsNotReverse;
55 u8 _D;
56 u8 _E;
57 u8 _F;
58 TVec3f mCurPos; // _10
59 TVec3f mCurDirection; // _1C
60 TVec3f mStartPos; // _28
61 TVec3f mEndPos; // _34
62 s32 mCurPoint; // _40
63};