mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-23 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>
93 lines
3.0 KiB
C++
93 lines
3.0 KiB
C++
#pragma once
|
|
|
|
#include "Game/LiveActor/LiveActor.hpp"
|
|
#include "Game/LiveActor/Nerve.hpp"
|
|
#include <JSystem/JGeometry/TMatrix.hpp>
|
|
|
|
class ActorCameraInfo;
|
|
class JUTTexture;
|
|
class PartsModel;
|
|
class SwingRopePoint;
|
|
|
|
class Trapeze : public LiveActor {
|
|
public:
|
|
Trapeze(const char*);
|
|
|
|
virtual void init(const JMapInfoIter& rIter);
|
|
virtual void draw() const;
|
|
virtual void updateHitSensor(HitSensor* pSensor);
|
|
virtual void attackSensor(HitSensor* pSender, HitSensor* pReceiver);
|
|
virtual bool receiveOtherMsg(u32 msg, HitSensor* pSender, HitSensor* pReceiver);
|
|
|
|
void exeStop();
|
|
virtual void exeFree();
|
|
void exeFreeInvalid();
|
|
void exeSwingWait();
|
|
void exeSwingSlideDownStart();
|
|
void exeSwingSlideDown();
|
|
void exeSwingFrontStart();
|
|
void exeSwingFrontEnd();
|
|
void exeSwingBackStart();
|
|
void exeSwingBackEnd();
|
|
|
|
bool tryJump();
|
|
|
|
void updateStick(const TVec3f&, f32);
|
|
void updateStickMtx();
|
|
void updateHangPoint();
|
|
bool updateBind();
|
|
bool updateSwing();
|
|
bool updateSlideDown();
|
|
|
|
bool isStartSwingFront() const;
|
|
bool isStartSwingBack() const;
|
|
|
|
void drawRope(const TVec3f&, const TVec3f&, const TVec3f&, const TVec3f&, f32, f32) const;
|
|
|
|
/* 0x8C */ TVec3f mSide;
|
|
/* 0x98 */ TVec3f mUp;
|
|
/* 0xA4 */ TVec3f mFront;
|
|
/* 0xB0 */ f32 mRopeLength;
|
|
/* 0xB4 */ SwingRopePoint* mStickPoint;
|
|
/* 0xB8 */ PartsModel* mTrapezeModel;
|
|
/* 0xBC */ TPos3f mPosMtx;
|
|
/* 0xEC */ LiveActor* mRider;
|
|
/* 0xF0 */ SwingRopePoint* mHangPoint;
|
|
/* 0xF4 */ f32 mGrabCoord;
|
|
/* 0xF8 */ f32 mSwingVel;
|
|
/* 0xFC */ bool mSwingReverse;
|
|
/* 0xFD */ bool mIsSwingFront;
|
|
/* 0xFE */ bool mIsSwingBack;
|
|
/* 0xFF */ bool mWasSwingFront;
|
|
/* 0x100 */ bool mWasSwingBack;
|
|
/* 0x104 */ ActorCameraInfo* mCameraInfo;
|
|
/* 0x108 */ s32 mPrevSoundLvl;
|
|
};
|
|
|
|
class TrapezeRopeDrawInit : public NameObj {
|
|
public:
|
|
TrapezeRopeDrawInit(const char*);
|
|
|
|
virtual void initDraw() const;
|
|
|
|
/* 0x0C */ JUTTexture* mTexture;
|
|
};
|
|
|
|
// these have to be header bodies because for some reason they are actually linked in NameObjFactory
|
|
namespace NrvTrapeze {
|
|
NEW_NERVE(TrapezeNrvStop, Trapeze, Stop);
|
|
NEW_NERVE(TrapezeNrvFree, Trapeze, Free);
|
|
NEW_NERVE(TrapezeNrvFreeInvalid, Trapeze, FreeInvalid);
|
|
NEW_NERVE(TrapezeNrvSwingWait, Trapeze, SwingWait);
|
|
NEW_NERVE(TrapezeNrvSwingSlideDownStart, Trapeze, SwingSlideDownStart);
|
|
NEW_NERVE(TrapezeNrvSwingSlideDown, Trapeze, SwingSlideDown);
|
|
NEW_NERVE(TrapezeNrvSwingFrontStart, Trapeze, SwingFrontStart);
|
|
NEW_NERVE(TrapezeNrvSwingFrontEnd, Trapeze, SwingFrontEnd);
|
|
NEW_NERVE(TrapezeNrvSwingBackStart, Trapeze, SwingBackStart);
|
|
NEW_NERVE(TrapezeNrvSwingBackEnd, Trapeze, SwingBackEnd);
|
|
NEW_NERVE(TrapezeNrvSlowSwingFrontStart, Trapeze, SwingFrontStart);
|
|
NEW_NERVE(TrapezeNrvSlowSwingFrontEnd, Trapeze, SwingFrontEnd);
|
|
NEW_NERVE(TrapezeNrvSlowSwingBackStart, Trapeze, SwingBackStart);
|
|
NEW_NERVE(TrapezeNrvSlowSwingBackEnd, Trapeze, SwingBackEnd);
|
|
}; // namespace NrvTrapeze
|