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

46 lines
1.2 KiB
C++

#pragma once
#include "Game/Gravity/PlanetGravity.hpp"
class DiskGravity : public PlanetGravity {
public:
DiskGravity();
virtual void updateMtx(const TPos3f& rMtx);
virtual bool calcOwnGravityVector(TVec3f* pDest, f32* pScalar, const TVec3f& rPosition) const;
void updateLocalParam();
void setLocalPosition(const TVec3f& rLocalPos);
void setLocalDirection(const TVec3f& rLocalDir);
void setSideDirection(const TVec3f& rSideDir);
void setRadius(f32 val);
void setValidDegee(f32 val);
void setBothSide(bool val);
void setEnableEdgeGravity(bool val);
// Position
TVec3f mLocalPosition; // 0x28
TVec3f mWorldPosition; // 0x34
// Unit normal vector to the circular surface of the disk
TVec3f mLocalNormal; // 0x40
TVec3f mWorldNormal; // 0x4C
TVec3f mSideDirection; // 0x58
TVec3f mOppositeSideVecOrtho; // 0x64
TVec3f mWorldOppositeSideVecOrtho; // 0x70
// Radius of the circular face of the disk
f32 mLocalRadius; // 0x7C
f32 mWorldRadius; // 0x80
// Number of degrees of the circle gravity applies to
f32 mValidDegree; // 0x84
f32 mValidCos; // 0x88
bool mEnableBothSide; // 0x8C
bool mEnableEdgeGravity; // 0x8D
};