mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-24 19:01:38 +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>
99 lines
2.3 KiB
C++
99 lines
2.3 KiB
C++
#pragma once
|
|
|
|
#include "Game/LiveActor/LiveActor.hpp"
|
|
#include <JSystem/JGeometry/TMatrix.hpp>
|
|
|
|
class ActorCameraInfo;
|
|
class JUTTexture;
|
|
class PartsModel;
|
|
|
|
class CreeperPoint {
|
|
public:
|
|
CreeperPoint(const TVec3f&, const TVec3f&, const CreeperPoint*);
|
|
|
|
void updateFree();
|
|
void updateBend(bool, const TVec3f&, f32, f32);
|
|
void updateLocalAxis();
|
|
|
|
const TVec3f& getPosition() const {
|
|
return mPosition;
|
|
}
|
|
|
|
const TVec3f& getSide() const {
|
|
return mSide;
|
|
}
|
|
|
|
const TVec3f& getUp() const {
|
|
return mUp;
|
|
}
|
|
|
|
const TVec3f& getFront() const {
|
|
return mFront;
|
|
}
|
|
|
|
/* 0x00 */ TVec3f mPosition;
|
|
/* 0x0C */ TVec3f mNeutralPos;
|
|
/* 0x18 */ TVec3f mVelocity;
|
|
/* 0x24 */ TVec3f mSide;
|
|
/* 0x30 */ TVec3f mUp;
|
|
/* 0x3C */ TVec3f mFront;
|
|
/* 0x48 */ TVec3f mProjection;
|
|
/* 0x54 */ const CreeperPoint* mPrevPoint;
|
|
};
|
|
|
|
class Creeper : public LiveActor {
|
|
public:
|
|
Creeper(const char*);
|
|
|
|
virtual ~Creeper();
|
|
|
|
virtual void init(const JMapInfoIter&);
|
|
virtual void control();
|
|
virtual void draw() const;
|
|
virtual bool receiveOtherMsg(u32 msg, HitSensor* pSender, HitSensor* pReceiver);
|
|
|
|
void exeFree();
|
|
void exeFreeInvalid();
|
|
void exeHangStart();
|
|
void exeHangUp();
|
|
void exeHangDown();
|
|
|
|
void initPoints();
|
|
void updatePoints();
|
|
void bendPoints();
|
|
|
|
bool tryHangUp();
|
|
bool tryJump();
|
|
bool updateHangUp(f32);
|
|
|
|
void calcAndGetCurrentInfo(TVec3f*, TVec3f*) const;
|
|
|
|
void loadMaterial() const;
|
|
const CreeperPoint* getHeadPoint() const {
|
|
return getPoint(mNumPoints - 1);
|
|
}
|
|
|
|
inline const CreeperPoint* getPoint(s32 idx) const {
|
|
return mPoints[idx];
|
|
}
|
|
|
|
/* 0x8C */ s32 mNumPoints;
|
|
/* 0x90 */ CreeperPoint** mPoints;
|
|
/* 0x94 */ LiveActor* mRider;
|
|
/* 0x98 */ TVec3f mFront;
|
|
/* 0xA4 */ TVec3f mUp;
|
|
/* 0xB0 */ f32 mHangSpeed;
|
|
/* 0xB4 */ f32 mCoord;
|
|
/* 0xB8 */ f32 mBendRate;
|
|
/* 0xBC */ f32 mBendRateBee;
|
|
/* 0xC0 */ TVec3f mBendDirection;
|
|
/* 0xCC */ f32 mJumpSpeedFront;
|
|
/* 0xD0 */ f32 mJumpSpeedUp;
|
|
/* 0xD4 */ ActorCameraInfo* mCameraInfo;
|
|
/* 0xD8 */ TVec3f mClippingCenter;
|
|
/* 0xE4 */ JUTTexture* mTexture;
|
|
/* 0xE8 */ PartsModel* mFlowerModel;
|
|
/* 0xEC */ PartsModel* mLeafModel;
|
|
/* 0xF0 */ TPos3f mTopMtx;
|
|
};
|