Files
bigmak94andClaude Opus 5.5 4b395efe5c Add the Petari decompilation (SMGCommunity/Petari@0a5c660)
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>
2026-10-01 01:59:38 +02:00

56 lines
1.6 KiB
C++

#pragma once
#include <JSystem/JGeometry/TVec.hpp>
class LayoutActor;
class StarPointerTarget {
public:
StarPointerTarget(f32, const TVec3f*, MtxPtr, TVec3f);
bool calcScreenPosition(TVec2f*) const;
bool isPointing(const TVec2f&, f32, f32) const;
void calcPosition(TVec3f*) const;
f32 calcRadius2d(f32, f32, f32) const;
bool calcScreenPositionFromView(TVec2f*, const TVec3f&) const;
/* 0x00 */ f32 mRadius3d;
/* 0x04 */ TVec3f mOffset;
/* 0x10 */ s32 mLastPointedChannel;
/* 0x14 */ const TVec3f* mPosition;
/* 0x18 */ MtxPtr mMtx;
};
class StarPointerLayoutTarget {
public:
enum TargetType { TargetType_Circle = 0, TargetType_Rectangle = 1 };
StarPointerLayoutTarget(LayoutActor*, const char*, const char*);
bool isPointing(const TVec2f&) const;
bool isPointingCircle(const TVec2f&) const;
bool isPointingRectangle(const TVec2f&) const;
void calcBasePos(TVec2f*) const;
/* 0x00 */ LayoutActor* mLayout;
/* 0x04 */ const char* mLayoutName;
/* 0x08 */ const char* mPaneName;
/* 0x0C */ s32 mType;
/* 0x10 */ TVec2f mPosition;
/* 0x18 */ f32 mRadius;
/* 0x1C */ f32 mWidth;
/* 0x20 */ f32 mHeight;
};
class StarPointerLayoutTargetKeeper {
public:
StarPointerLayoutTargetKeeper(int);
void addTargetCircle(LayoutActor*, const char*, f32, const TVec2f&, const char*);
StarPointerLayoutTarget* getTarget(const char*) const;
void registerTarget(StarPointerLayoutTarget*);
/* 0x00 */ s32 mNumTargets;
/* 0x04 */ s32 mMaxNumTargets;
/* 0x08 */ StarPointerLayoutTarget** mTargets;
};