Files
bigmak94andClaude Opus 5.5 4b395efe5c Add the Petari decompilation (SMGCommunity/Petari@0a5c660)
The sources of Petari (https://github.com/SMGCommunity/Petari), the
Super Mario Galaxy decompilation by the SMGCommunity, at commit
0a5c6608dc3b4c44a9aa68c2535d1793dc565f02, unchanged but for LF line
endings: LICENSE (as LICENSE-Petari.txt; CC0 1.0), include/, libs/ and
src/.  Left out: the game data Petari keeps from the original
executable, the error message archive (include/Game/System/
ErrorArchive.hpp) and two tables (src/Game/System/GalaxyID.bcsv and
StoryEvent.bcsv); GalaxyQuest's converter takes them from the player's
own disc.  The port's changes follow in the next commit, so
`git diff petari-base -- decomp` shows them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 01:59:38 +02:00

63 lines
1.9 KiB
C++

#pragma once
#include "Game/Map/BezierRail.hpp"
class RailRider {
public:
RailRider(const JMapInfoIter&);
RailRider(s32, s32);
void move();
void moveToNearestPos(const TVec3f&);
void moveToNearestPoint(const TVec3f&);
void moveToNextPoint();
void reverse();
void calcPosAtCoord(TVec3f*, f32) const;
void calcDirectionAtCoord(TVec3f*, f32) const;
f32 calcNearestPos(const TVec3f&) const;
f32 getTotalLength() const;
f32 getPartLength(int) const;
bool isLoop() const;
bool isReachedGoal() const;
bool isReachedEdge() const;
void setCoord(f32);
void setSpeed(f32);
bool getRailArgWithInit(const char*, s32*) const;
bool getRailArgNoInit(const char*, s32*) const;
f32 getNextPointCoord() const;
f32 getCurrentPointCoord() const;
s32 getPointNum() const;
void copyPointPos(TVec3f*, s32) const;
f32 getPointCoord(s32) const;
void initBezierRail(const JMapInfoIter&, const JMapInfo*);
bool getPointArgS32NoInit(const char*, s32*, s32) const;
bool getPointArgS32WithInit(const char*, s32*, s32) const;
bool getCurrentPointArgS32NoInit(const char*, s32*) const;
bool getCurrentPointArgS32WithInit(const char*, s32*) const;
bool getNextPointArgS32NoInit(const char*, s32*) const;
bool getNextPointArgS32WithInit(const char*, s32*) const;
s32 getNextPointNo() const;
void syncPosDir();
inline TVec3f getStartPos() {
return mStartPos;
}
inline TVec3f getEndPos() {
return mEndPos;
}
/* 0x00 */ BezierRail* mBezierRail;
/* 0x04 */ f32 mCoord;
/* 0x08 */ f32 mSpeed;
/* 0x0C */ bool mIsNotReverse;
/* 0x0D */ u8 _D;
/* 0x0E */ u8 _E;
/* 0x0F */ u8 _F;
/* 0x10 */ TVec3f mCurPos;
/* 0x1C */ TVec3f mCurDirection;
/* 0x28 */ TVec3f mStartPos;
/* 0x34 */ TVec3f mEndPos;
/* 0x40 */ s32 mCurPoint;
};