mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-19 03:01:21 +02:00
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>
42 lines
1.6 KiB
C++
42 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "Game/Gravity/PlanetGravity.hpp"
|
|
|
|
class ParallelGravity : public PlanetGravity {
|
|
public:
|
|
enum RANGE_TYPE { RangeType_Sphere = 0, RangeType_Box = 1, RangeType_Cylinder = 2 };
|
|
|
|
enum DISTANCE_CALC_TYPE { DistanceCalcType_Default = -1, DistanceCalcType_X = 0, DistanceCalcType_Y = 1, DistanceCalcType_Z = 2 };
|
|
|
|
ParallelGravity();
|
|
|
|
virtual void updateMtx(const TPos3f& rMtx);
|
|
virtual bool calcOwnGravityVector(TVec3f* pDest, f32* pScalar, const TVec3f& rPosition) const;
|
|
|
|
void setPlane(const TVec3f& rPlaneUp, const TVec3f& rPlanePos);
|
|
void setRangeBox(const TPos3f& rMtx);
|
|
void setRangeCylinder(f32 radius, f32 height);
|
|
void setRangeType(RANGE_TYPE rangeType);
|
|
void setBaseDistance(f32 val);
|
|
void setDistanceCalcType(DISTANCE_CALC_TYPE distanceCalcType);
|
|
bool isInSphereRange(const TVec3f& rPosition, f32* pScalar) const;
|
|
bool isInBoxRange(const TVec3f& rPosition, f32* pScalar) const;
|
|
bool isInCylinderRange(const TVec3f& rPosition, f32* pScalar) const;
|
|
bool isInRange(const TVec3f& rPosition, f32* pScalar) const;
|
|
|
|
/* 0x28 */ TPos3f mLocalMtx;
|
|
/* 0x58 */ TPos3f mWorldMtx;
|
|
/* 0x88 */ f32 mExtentX;
|
|
/* 0x8C */ f32 mExtentY;
|
|
/* 0x90 */ f32 mExtentZ;
|
|
/* 0x94 */ TVec3f mPlanePosition;
|
|
/* 0xA0 */ TVec3f mPlaneUpVec;
|
|
/* 0xAC */ TVec3f mWorldPlanePosition;
|
|
/* 0xB8 */ TVec3f mWorldPlaneUpVec;
|
|
/* 0xC4 */ f32 mCylinderHeight;
|
|
/* 0xC8 */ f32 mCylinderRadius;
|
|
/* 0xCC */ f32 mBaseDistance;
|
|
/* 0xD0 */ RANGE_TYPE mRangeType;
|
|
/* 0xD4 */ DISTANCE_CALC_TYPE mDistanceCalcType;
|
|
};
|