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

46 lines
1.2 KiB
C++

#pragma once
#include "Game/Util/Color.hpp"
#include <revolution/gx/GXEnum.h>
#include <JSystem/JGeometry.hpp>
#include <revolution.h>
class LiveActor;
struct PointLightInfo {
/* 0x00 */ Vec mPos;
/* 0x0C */ GXColor mColor;
/* 0x10 */ f32 mRefDistance;
/* 0x14 */ f32 mRefBrightness;
/* 0x18 */ GXDistAttnFn mDistAttnFn;
};
class LightPointCtrl {
public:
LightPointCtrl();
void loadPointLight();
void update();
void requestPointLight(const LiveActor* pActor, TVec3f pos, Color8 color, f32 intensity, s32 duration);
void clearPointLight(PointLightInfo* pInfo);
void blendPointLight(PointLightInfo* pDst, const PointLightInfo& rStart, const PointLightInfo& rEnd, f32 t);
bool tryBlendStart();
bool isUpdateCandidateActor(const LiveActor* pActor) const;
void updatePointLight();
s32 getStep() const {
return mStep;
}
/* 0x00 */ s32 mStep;
/* 0x04 */ s32 mBlendTime;
/* 0x08 */ const LiveActor* mCurrentActor;
/* 0x0C */ const LiveActor* mPreviousActor;
/* 0x10 */ const LiveActor* mCandidateActor;
/* 0x14 */ PointLightInfo* mCurrentInfo;
/* 0x18 */ PointLightInfo* mTargetInfo;
/* 0x1C */ PointLightInfo* mPreviousInfo;
};