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

98 lines
2.9 KiB
C++

#pragma once
#include "Game/System/NerveExecutor.hpp"
#include "Game/Util/Array.hpp"
enum StarPointerModeEnum {
StarPointerMode_HomeButton = 0,
StarPointerMode_ErrorWindow = 1,
StarPointerMode_SaveLoad = 2,
StarPointerMode_Logo = 3,
StarPointerMode_Title = 4,
StarPointerMode_FileSelect = 5,
StarPointerMode_ScenarioSelectScene = 6,
StarPointerMode_PauseMenu = 7,
StarPointerMode_ChooseYesNo = 8,
StarPointerMode_PictureBook = 9,
StarPointerMode_DemoWithStarPointer = 10,
StarPointerMode_DemoWithHandPointerFinger = 11,
StarPointerMode_Demo = 12,
StarPointerMode_DemoMarioDeath = 13,
StarPointerMode_PowerStarGetDemo = 14,
StarPointerMode_1PInvalid2PValid = 15,
StarPointerMode_SphereSelectorOnReaction = 16,
StarPointerMode_SphereSelectorFinger = 17,
StarPointerMode_MarioLauncher = 18,
StarPointerMode_CommandStream = 19,
StarPointerMode_BlueStar = 20,
StarPointerMode_BlueStarReady = 21,
StarPointerMode_StarPieceTarget = 22,
StarPointerMode_BigBubble = 23,
StarPointerMode_Base = 24,
StarPointerMode_Game = 25,
StarPointerMode_Count,
};
class StarPointerOnOffController : public NerveExecutor {
public:
struct RequestInfo {
public:
/* 0x00 */ void* mRequester;
/* 0x04 */ s32 mMode;
};
/// @brief Creates a new `StarPointerOnOffController`.
StarPointerOnOffController();
void update();
void setStateToTitle(void*);
void setStateToFileSelect(void*);
void setStateToBase(void*);
void popState(void*);
void requestMode(void*, StarPointerModeEnum);
void setupHomeButton();
void setupErrorWindow();
void setupLogo();
void setupTitle();
void setupFileSelect();
void setupPictureBook();
void setupDemo();
void setupDemoWithStarPointer();
void setupDemoWithHandPointerFinger();
void setupDemoMarioDeath();
void setup1PInvalid2PValid();
void setupMarioLauncher();
void setupChooseYesNo();
void setupPauseMenu();
void setupScenarioSelectScene();
void setupBlueStar();
void setupBlueStarReady();
void setupPowerStarGetDemo();
void setupStarPieceTarget();
void setupSphereSelectorFinger();
void setupSphereSelectorOnReaction();
void setupBigBubble();
void setupCommandStream();
void setupGame();
void setupBase();
void updateMode();
void clearInfo();
void incModeCounter(void*, s32);
void decModeCounter(void*);
bool isMode(StarPointerModeEnum mode) NO_INLINE {
return mModeCounter[mode] != 0 || mRequested[mode];
}
bool compareMode(StarPointerModeEnum mode) const {
return mMode == mode;
}
/* 0x08 */ bool _8;
/* 0x0C */ MR::FixedArray< RequestInfo*, 16 > mRequests;
/* 0x4C */ s32 mModeCounter[StarPointerMode_Count];
/* 0xB4 */ bool mRequested[StarPointerMode_Count];
/* 0xD0 */ s32 mMode;
};