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

72 lines
1.7 KiB
C++

#pragma once
#include "Game/LiveActor/PartsModel.hpp"
#include "Game/NPC/NPCActor.hpp"
#include "Game/Util/EffectUtil.hpp"
#include "Game/Util/LiveActorUtil.hpp"
class JetTurtle;
class RemovableTurtle {
public:
RemovableTurtle(LiveActor*, bool);
bool isPullRange() const;
bool tryRemove();
bool tryAttach();
/* 0x00 */ PartsModel* mShellModel;
/* 0x04 */ JetTurtle* mJetTurtle;
};
class Penguin : public NPCActor {
public:
enum Behavior {
Behavior_Default = -1,
Behavior_Sit = 0,
Behavior_Swim = 1,
Behavior_SwimSurface = 2,
Behavior_Dive = 3,
Behavior_SwimTurtle = 4,
Behavior_Stand = 5,
Behavior_Dash = 6
};
Penguin(const char*);
virtual void init(const JMapInfoIter&);
virtual void initAfterPlacement();
virtual void attackSensor(HitSensor*, HitSensor*);
virtual bool receiveOtherMsg(u32, HitSensor*, HitSensor*);
void exeReaction();
void exeWait();
void exeDive();
void exeFlow();
bool tryReleaseTurtle();
/* 0x15C */ s32 mBehavior;
/* 0x160 */ s32 mStepToDive;
/* 0x164 */ RemovableTurtle* mTurtle;
};
class TurtlePartsModel : public PartsModel {
public:
TurtlePartsModel(LiveActor* pActor, const char* pName, const char* pModelName, MtxPtr mtx, int drawBufferType, bool a6)
: PartsModel(pActor, pName, pModelName, mtx, drawBufferType, a6) {
}
virtual void appear() {
LiveActor::appear();
MR::startBtk(this, "KouraShine");
MR::emitEffect(this, "HandyGlow");
}
virtual void init(const JMapInfoIter& rIter) {
initEffectKeeper(8, "koura", false);
initSound(8, false);
MR::invalidateClipping(this);
makeActorAppeared();
}
};