mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-20 02:01:47 +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>
67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "Game/Map/PlanetMap.hpp"
|
|
|
|
class NameObjArchiveListCollector;
|
|
|
|
struct PlanetMapData {
|
|
inline const char* getData(s32 index) const {
|
|
return mData[index];
|
|
}
|
|
|
|
void setData(s32 index, const char* pValue) {
|
|
mData[index] = pValue;
|
|
}
|
|
|
|
/* 0x00 */ const char* mPlanetName;
|
|
/* 0x04 */ const char* mData[5];
|
|
/* 0x18 */ const char* mForceScenarioData[8];
|
|
};
|
|
|
|
struct UniqueEntry {
|
|
/* 0x00 */ const char* _0;
|
|
/* 0x04 */ const char* _4;
|
|
};
|
|
|
|
typedef NameObj* (*CreatorFuncPtr)(const char*);
|
|
|
|
struct PlanetEntry {
|
|
/* 0x0 */ const char* mName;
|
|
/* 0x4 */ CreatorFuncPtr mCreateFunc;
|
|
};
|
|
|
|
class PlanetMapCreator : public NameObj {
|
|
public:
|
|
PlanetMapCreator(const char*);
|
|
|
|
CreatorFuncPtr getCreateFunc(const char*);
|
|
void makeArchiveListPlanet(NameObjArchiveListCollector*, const JMapInfoIter&, const char*);
|
|
void createPlanetMapDataTable(JMapInfo*);
|
|
void addTableData(const JMapInfo*, s32);
|
|
PlanetMapData* getTableData(const char*) const;
|
|
bool isScenarioForceLow(const PlanetMapData*) const;
|
|
|
|
/* 0x0C */ PlanetMapData** mPlanetMapData;
|
|
/* 0x10 */ s32 mTableCount;
|
|
};
|
|
|
|
class PlanetMapFarClippable : public PlanetMap {
|
|
public:
|
|
PlanetMapFarClippable(const char* pName) : PlanetMap(pName) {
|
|
}
|
|
|
|
f32 getFarClipDistance() const {
|
|
return 50.0f;
|
|
}
|
|
};
|
|
|
|
class PlanetMapCreatorFunction {
|
|
public:
|
|
static void makeArchiveList(NameObjArchiveListCollector*, const JMapInfoIter&, const char*);
|
|
|
|
static bool isLoadArchiveAfterScenarioSelected(const char*);
|
|
static bool isRegisteredObj(const char*);
|
|
|
|
static CreatorFuncPtr getPlanetMapCreator(const char*);
|
|
};
|