mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-19 12:01:22 +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>
95 lines
2.4 KiB
C++
95 lines
2.4 KiB
C++
#pragma once
|
|
|
|
#include "Game/Screen/StarPointerGuidance.hpp"
|
|
#include "Game/System/DrawSyncManager.hpp"
|
|
#include <JSystem/JGeometry/TMatrix.hpp>
|
|
|
|
class StarPointerController;
|
|
class StarPointerLayout;
|
|
class DpdInfo;
|
|
|
|
class StarPointerPeekZ : public DrawSyncCallback {
|
|
public:
|
|
StarPointerPeekZ();
|
|
|
|
virtual void drawSyncCallback(u16);
|
|
|
|
void setDrawSyncToken();
|
|
|
|
/* 0x04 */ u16 mToken;
|
|
/* 0x08 */ DpdInfo** mInfos;
|
|
/* 0x0C */ f32 mProjectionParameters[7];
|
|
/* 0x28 */ f32 mViewportParameters[6];
|
|
};
|
|
|
|
class StarPointerTransformHolder {
|
|
public:
|
|
StarPointerTransformHolder() NO_INLINE;
|
|
|
|
void movement();
|
|
|
|
inline f32 getFovy() const {
|
|
return mFovy;
|
|
}
|
|
|
|
/* 0x00 */ TPos3f mViewMtx;
|
|
/* 0x30 */ TProj3f mProjMtx;
|
|
/* 0x70 */ f32 mFovy;
|
|
/* 0x74 */ f32 mFocalLength;
|
|
};
|
|
|
|
class StarPointerDirector {
|
|
public:
|
|
StarPointerDirector();
|
|
|
|
void update();
|
|
void draw();
|
|
|
|
void startHandPointer();
|
|
void startHandPointerReactionWithCrossCursor();
|
|
void startFingerPointer();
|
|
void startStarPointer();
|
|
void startStarPointerNozzle();
|
|
void setGameSceneCameraMtx();
|
|
StarPointerController* getStarPointerController(s32 channel) const;
|
|
StarPointerLayout* getStarPointerLayout(s32 channel) const;
|
|
|
|
void createLayout();
|
|
|
|
void init() {
|
|
mIsUpdateTransHolder = true;
|
|
}
|
|
|
|
void invalidate() {
|
|
mIsUpdateTransHolder = false;
|
|
}
|
|
|
|
bool isEnableStarPointerShootStarPiece() const {
|
|
return mIsAllowP1StarPieceShot || mIsAllowP2StarPieceShot;
|
|
}
|
|
|
|
/* 0x00 */ bool mIsUpdateTransHolder;
|
|
/* 0x01 */ bool mIsAllowP1StarPieceShot;
|
|
/* 0x02 */ bool mIsAllowP2StarPieceShot;
|
|
/* 0x03 */ bool mIsOSPointerMode;
|
|
/* 0x04 */ StarPointerController* mControllers;
|
|
/* 0x08 */ StarPointerLayout* mStarPointerLayouts;
|
|
/* 0x0C */ StarPointerTransformHolder* mTransHolder;
|
|
/* 0x10 */ StarPointerPeekZ* mPeekZ;
|
|
/* 0x14 */ StarPointerGuidance* mGuidance;
|
|
/* 0x18 */ s32 _18;
|
|
/* 0x1C */ TVec3f mNozzleAimPos;
|
|
};
|
|
|
|
namespace StarPointerFunction {
|
|
bool isOnScreenEdge(const TVec2f&, f32, f32);
|
|
bool isOnScreenEdge(s32);
|
|
bool forceInsideScreenEdge(TVec2f*);
|
|
StarPointerDirector* getStarPointerDirector() NO_INLINE;
|
|
s32 getNumStarPointer();
|
|
s32 getPastPointNum(s32);
|
|
const TVec2f& getPastPosition(s32, s32);
|
|
s32 getNextPastPointNum(s32);
|
|
bool canShoot(s32);
|
|
}; // namespace StarPointerFunction
|