mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-19 05:01:15 +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>
69 lines
2.0 KiB
C++
69 lines
2.0 KiB
C++
#pragma once
|
|
|
|
#include <JSystem/JGeometry/TBox.hpp>
|
|
#include <JSystem/JGeometry/TVec.hpp>
|
|
|
|
class SpiderThreadMainPoint;
|
|
class SpiderThreadPoint;
|
|
|
|
class SpiderThreadPart {
|
|
public:
|
|
SpiderThreadPart(SpiderThreadMainPoint*, SpiderThreadMainPoint*, f32);
|
|
|
|
void cut(SpiderThreadMainPoint*, SpiderThreadMainPoint*);
|
|
void updatePointerPos();
|
|
void update();
|
|
void draw() const;
|
|
void startHang(s32);
|
|
void updateHang(const TVec3f&, s32);
|
|
void endHang(s32);
|
|
void stopAllPoints();
|
|
f32 calcNearestPointInfo(const TVec3f**, const TVec3f**, s32*, const TVec3f&);
|
|
void updatePointPosToLine();
|
|
void updatePointPosAndBasePosToLine();
|
|
bool touchActor(s32, const TVec3f&);
|
|
void tryTouch(f32, const TVec3f&, s32);
|
|
s32 findTouchPoint(f32, const TVec3f&, s32);
|
|
f32 findNearestPointNo(s32*, const TVec3f&) const;
|
|
void updatePointPosHanging(s32);
|
|
void updatePointVelocityTouch(s32, const TVec3f&);
|
|
void updateBasePos();
|
|
void updateForceAttach();
|
|
void updateCutPoints();
|
|
void updateDrawVec();
|
|
|
|
void drawLine() const;
|
|
void drawPoints() const;
|
|
|
|
inline void padBox(f32 padAmount) {
|
|
TVec3f padding(padAmount);
|
|
mBoundBox.i.sub(padding);
|
|
mBoundBox.f.add(padding);
|
|
}
|
|
|
|
SpiderThreadPoint* getPoint(int idx) const {
|
|
return mPoints[idx];
|
|
}
|
|
|
|
/* 0x00 */ bool mIsStill;
|
|
/* 0x01 */ bool mIsCut;
|
|
/* 0x02 */ bool mIsFree;
|
|
/* 0x04 */ s16 _4;
|
|
/* 0x08 */ s32 mNumHangingPoints;
|
|
/* 0x0C */ s32 mStopTime;
|
|
/* 0x10 */ s32 mTouchTimeout;
|
|
/* 0x14 */ TVec3f mPointerPosPad0;
|
|
/* 0x20 */ TVec3f mPointerPosPad1;
|
|
/* 0x2C */ SpiderThreadMainPoint* mPointA;
|
|
/* 0x30 */ SpiderThreadMainPoint* mPointB;
|
|
/* 0x34 */ s32 mNumPoints;
|
|
/* 0x38 */ SpiderThreadPoint** mPoints;
|
|
/* 0x3C */ TBox3f mBoundBox;
|
|
/* 0x54 */ TVec3f mSide;
|
|
/* 0x60 */ TVec3f mUp;
|
|
/* 0x6C */ TVec3f mFront;
|
|
/* 0x78 */ f32 mDistBetweenMainPoints;
|
|
/* 0x7C */ f32 mDistBetweenPoints;
|
|
/* 0x80 */ f32 mTextureOffset;
|
|
};
|