mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-19 06:02:24 +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>
96 lines
3.1 KiB
C++
96 lines
3.1 KiB
C++
#pragma once
|
|
|
|
#include "Game/LiveActor/LiveActor.hpp"
|
|
|
|
class JUTTexture;
|
|
class SpiderThreadHangInfo;
|
|
class SpiderThreadMainPoint;
|
|
class SpiderThreadPart;
|
|
class SpiderThreadPoint;
|
|
class SpiderThreadRadialLine;
|
|
class SpiderThreadWindCtrl;
|
|
|
|
struct CutPointEntry {
|
|
s32 mRadialIdx;
|
|
s32 mPointIdx;
|
|
};
|
|
|
|
class SpiderThread : public LiveActor {
|
|
public:
|
|
SpiderThread(const char*);
|
|
|
|
virtual void init(const JMapInfoIter& rIter);
|
|
virtual void movement();
|
|
virtual void draw() const;
|
|
virtual bool receiveOtherMsg(u32 msg, HitSensor* pSender, HitSensor* pReceiver);
|
|
|
|
void initThread(const TVec3f&);
|
|
void startActorBind(LiveActor*, const TVec3f**, const TVec3f**, const TVec3f**, const TVec3f&, const TVec3f&, s32);
|
|
bool touchActor(const TVec3f&, const TVec3f&);
|
|
void tryPush(const TVec3f&, f32);
|
|
void stopAllPartsPoint();
|
|
void cutSpiderThread();
|
|
void initMainThreads();
|
|
void connectMainPoint(SpiderThreadPoint*, SpiderThreadPoint*, bool);
|
|
void updatePointerInfo();
|
|
void updateHangedPoint();
|
|
void tryTouchPoint(s32);
|
|
void findNearestPointPos(const TVec3f**, const TVec3f**, s32*, s32*, const TVec3f&) const;
|
|
SpiderThreadHangInfo* findHangInfo(LiveActor*) const;
|
|
void initDraw() const;
|
|
|
|
SpiderThreadRadialLine* getMainRadialLine(int idx) const {
|
|
return mRadialLines[idx];
|
|
}
|
|
|
|
SpiderThreadPart* getRadialPart(int idx) const {
|
|
return mRadialParts[idx];
|
|
}
|
|
|
|
SpiderThreadPart* getCirclePart(int idx) const {
|
|
return mCircleParts[idx];
|
|
}
|
|
|
|
SpiderThreadHangInfo* getActorHangInfo(int idx) const {
|
|
return mHangInfos[idx];
|
|
}
|
|
|
|
/* 0x8C */ SpiderThreadMainPoint* mMainPoint;
|
|
/* 0x90 */ SpiderThreadHangInfo** mHangInfos;
|
|
/* 0x94 */ s32 mNumHangInfos;
|
|
/* 0x98 */ SpiderThreadHangInfo* mShootHangInfo;
|
|
/* 0x9C */ s32 mNumRadialLines;
|
|
/* 0xA0 */ SpiderThreadRadialLine** mRadialLines;
|
|
/* 0xA4 */ SpiderThreadMainPoint** mAnchorPoints;
|
|
/* 0xA8 */ s32 mRadialPartsBufferSize;
|
|
/* 0xAC */ s32 mNumRadialParts;
|
|
/* 0xB0 */ SpiderThreadPart** mRadialParts;
|
|
/* 0xB4 */ s32 mCirclePartsBufferSize;
|
|
/* 0xB8 */ s32 mNumCircleParts;
|
|
/* 0xBC */ SpiderThreadPart** mCircleParts;
|
|
/* 0xC0 */ s32 mCutPointsBufferSize;
|
|
/* 0xC4 */ s32 mNumCutPoints;
|
|
/* 0xC8 */ SpiderThreadMainPoint** mCutPoints;
|
|
/* 0xCC */ TVec3f mFront;
|
|
/* 0xD8 */ SpiderThreadWindCtrl* mWindCtrl;
|
|
/* 0xDC */ bool mIsBloomOn;
|
|
/* 0xE0 */ JUTTexture* mThreadTexture;
|
|
/* 0xE4 */ JUTTexture* mIndirectTexture;
|
|
};
|
|
|
|
namespace MR {
|
|
void initSpiderThread(const TVec3f&);
|
|
void appearSpiderThread();
|
|
void startSpiderThreadBattle();
|
|
void startSpiderThreadChance();
|
|
void startSpiderThreadBattleEnd();
|
|
void pauseOffSpiderThread();
|
|
f32 getSpiderThreadPosZ();
|
|
void startActorBindToSpiderThread(LiveActor*, const TVec3f**, const TVec3f**, const TVec3f**, const TVec3f&, const TVec3f&);
|
|
bool sendMsgToSpiderThread(u32, HitSensor*);
|
|
bool touchActorToSpiderThread(const TVec3f&, const TVec3f&);
|
|
void tryPushSpiderThread(const TVec3f&, f32);
|
|
void onSpiderThreadBloom();
|
|
void drawSpiderThreadBloom();
|
|
}; // namespace MR
|