mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-18 19:01:14 +02:00
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>
91 lines
2.4 KiB
C++
91 lines
2.4 KiB
C++
#pragma once
|
|
|
|
#include "Game/System/NerveExecutor.hpp"
|
|
#include "Game/System/StationedArchiveLoader.hpp"
|
|
#include "Game/System/StationedFileInfo.hpp"
|
|
|
|
class JKRExpHeap;
|
|
class JKRHeap;
|
|
class PlayerHeapHolder;
|
|
|
|
namespace MR {
|
|
class FunctorBase;
|
|
}; // namespace MR
|
|
|
|
class GameSystemStationedArchiveLoader : public NerveExecutor {
|
|
public:
|
|
GameSystemStationedArchiveLoader();
|
|
|
|
void update();
|
|
bool isDone() const;
|
|
bool isPreparedReset() const;
|
|
void prepareReset();
|
|
void requestChangeArchivePlayer(bool);
|
|
void exeLoadAudio1stWaveData();
|
|
void exeLoadStationedArchivePlayer();
|
|
void exeLoadStationedArchiveOthers();
|
|
void exeInitializeGameData();
|
|
void exeEnd();
|
|
void exeSuspended();
|
|
void exeChangeArchivePlayer();
|
|
bool trySuspend();
|
|
bool tryAsyncExecuteIfNotSuspend(const MR::FunctorBase&, const char*);
|
|
void startToLoadStationedArchivePlayer(bool);
|
|
void startToLoadStationedArchiveOthers();
|
|
void createAndAddPlayerArchives(bool);
|
|
void createAndAddOtherArchives();
|
|
|
|
/* 0x8 */ PlayerHeapHolder* mHeapHolder;
|
|
/* 0xc */ bool _C;
|
|
};
|
|
|
|
class ConditionIsEqualType : public StationedArchiveLoader::Condition {
|
|
public:
|
|
ConditionIsEqualType(bool isDataMario) {
|
|
MR::StationedFileInfo::LoadType var = MR::StationedFileInfo::LOAD_TYPE_MOUNT_RESOURCE_LUIGI;
|
|
|
|
if (isDataMario) {
|
|
var = MR::StationedFileInfo::LOAD_TYPE_MOUNT_RESOURCE_MARIO;
|
|
}
|
|
|
|
mLoadType = var;
|
|
}
|
|
|
|
virtual bool isExecute(const MR::StationedFileInfo*) const;
|
|
|
|
/* 0x4 */ MR::StationedFileInfo::LoadType mLoadType;
|
|
};
|
|
|
|
class ConditionIfIsNotPlayer : public StationedArchiveLoader::Condition {
|
|
public:
|
|
virtual bool isExecute(const MR::StationedFileInfo*) const;
|
|
};
|
|
|
|
class ConditionUsePlayerHeap : public StationedArchiveLoader::Condition {
|
|
public:
|
|
ConditionUsePlayerHeap();
|
|
|
|
virtual bool isExecute(const MR::StationedFileInfo*) const;
|
|
virtual JKRHeap* getProperHeap(const MR::StationedFileInfo*) const;
|
|
|
|
/* 0x4 */ JKRExpHeap* mNapaHeap;
|
|
/* 0x8 */ JKRExpHeap* mGDDRHeap;
|
|
/* 0xC */ bool mIsDataMario;
|
|
};
|
|
|
|
class PlayerHeapHolder {
|
|
public:
|
|
PlayerHeapHolder();
|
|
|
|
void adjust();
|
|
void dispose();
|
|
void setIsDataMario(bool isDataMario) NO_INLINE;
|
|
|
|
static JKRExpHeap* createHeap(u32, JKRHeap*);
|
|
|
|
/* 0x0 */ ConditionUsePlayerHeap* mCondition;
|
|
/* 0x4 */ JKRExpHeap* mNapaHeap;
|
|
/* 0x8 */ JKRExpHeap* mGDDRHeap;
|
|
/* 0xC */ bool mIsDataMario;
|
|
};
|