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

84 lines
3.3 KiB
C++

#pragma once
#include "Game/System/NerveExecutor.hpp"
#include "Game/Util/Array.hpp"
class GalaxyMoveArgument;
class NameObj;
class DemoFortressDiscoverCheckList {
public:
/* 0x00 */ const char* mStageName;
/* 0x04 */ const char* mStoryEventName;
/* 0x08 */ bool _8;
};
class StorySequenceExecutorType {
public:
class DemoSequenceInfo {
public:
/* 0x00 */ u16 _0;
/* 0x02 */ u16 _2;
/* 0x04 */ const char* _4;
};
};
class StorySequenceExecutor : public NerveExecutor {
public:
/// @brief Creates a new `StorySequenceExecutor`.
StorySequenceExecutor();
void update();
bool isNeedMoviePlayerExecutingEventEnum() const;
bool hasNextDemo() const;
s32 getExecutingEventEnum() const;
bool isEqualStageScenarioBefore(const char*, int) const;
void moveGalaxy(GalaxyMoveArgument*, bool);
void setNerveSceneStart();
void forceStop();
void exeIdle();
void exeWaitToSceneStart();
void exePlayDemoSequence();
void exeWaitTimeKeepDemoEnd();
void exeWaitSaveEnd();
void exeStartSaveAfterSequence();
void exeWaitSaveEndAfterSequence();
void exeFadeinAfterSequence();
void exeStaffRollSequence();
void decideNextEventForClearGalaxy(GalaxyMoveArgument*);
void decideNextEventForMoveGalaxy(GalaxyMoveArgument*);
void decideNextEventForAfterLoading(GalaxyMoveArgument*) NO_INLINE;
void decideNextStageForGalaxyOut(GalaxyMoveArgument*);
void overwriteGalaxyNameAfterLoading(GalaxyMoveArgument*);
void setNextStageToAstroGalaxyOrDome(GalaxyMoveArgument*);
void setNextStageToAstroGalaxy(GalaxyMoveArgument*);
void setNextStageToAstroDome(GalaxyMoveArgument*);
const StorySequenceExecutorType::DemoSequenceInfo* isExecuteDemoLuigiMissing(const GalaxyMoveArgument*) const;
void getOptionalDemoForClearGalaxy(MR::Vector< MR::FixedArray< const StorySequenceExecutorType::DemoSequenceInfo*, 8 > >*,
const GalaxyMoveArgument*) const;
static bool isEqualStageStopCometScheduler(const char*);
void prepareDemoSequence(const StorySequenceExecutorType::DemoSequenceInfo*) NO_INLINE;
void prepareDemoSequence(const MR::Vector< MR::FixedArray< const StorySequenceExecutorType::DemoSequenceInfo*, 8 > >&);
void prepareDemoSequenceButlerFortressDiscover(const GalaxyMoveArgument*, const DemoFortressDiscoverCheckList&);
bool tryStartDemo(const char*) NO_INLINE;
bool tryStartSave();
bool tryWaitSaveEnd();
bool tryStartFadein();
bool tryStartMovieAndWaitEnd(u32);
const StorySequenceExecutorType::DemoSequenceInfo* getCurrentDemoInfo() const;
bool tryNextDemoInfo();
const StorySequenceExecutorType::DemoSequenceInfo* addDynamicDemoSequenceInfo(u16, u16, const char*);
void setBeforeStageScenario(const GalaxyMoveArgument&, bool);
s32 calcAproposScenarioNoOnAstroGalaxy() const;
s32 calcAproposScenarioNoOnAstroDome() const;
/* 0x08 */ const Nerve* mNextNerve;
/* 0x0C */ NameObj* mDemoObj;
/* 0x10 */ NameObj* mSaveObj;
/* 0x14 */ char mStageName[48];
/* 0x44 */ s32 mScenarioNo;
/* 0x48 */ MR::Vector< MR::FixedArray< const StorySequenceExecutorType::DemoSequenceInfo*, 8 > > _48;
/* 0x6C */ MR::Vector< MR::FixedArray< StorySequenceExecutorType::DemoSequenceInfo, 8 > > _6C;
/* 0xB0 */ bool _B0;
};