mirror of https://github.com/AxioDL/metaforce.git
PART MBSP property yaml fix
This commit is contained in:
parent
d5e471bac3
commit
898114d803
|
@ -362,7 +362,7 @@ void GPSM<IDType>::_write(typename WriteYaml::StreamT& w) const
|
|||
if (x30_31_RSOP)
|
||||
w.writeBool("RSOP", true);
|
||||
if (x48_MBSP)
|
||||
if (auto rec = w.enterSubRecord("MPSB"))
|
||||
if (auto rec = w.enterSubRecord("MBSP"))
|
||||
x48_MBSP.write(w);
|
||||
if (x4c_SIZE)
|
||||
if (auto rec = w.enterSubRecord("SIZE"))
|
||||
|
|
|
@ -62,7 +62,7 @@ const std::pair<int, const SGameOption*> GameOptionsRegistry[] =
|
|||
CPersistentOptions::CPersistentOptions(CBitStreamReader& stream)
|
||||
{
|
||||
for (int b=0 ; b<98 ; ++b)
|
||||
x0_[b] = stream.ReadEncoded(8);
|
||||
x0_nesState[b] = stream.ReadEncoded(8);
|
||||
|
||||
for (int b=0 ; b<64 ; ++b)
|
||||
x68_[b] = stream.ReadEncoded(8);
|
||||
|
@ -108,7 +108,7 @@ CPersistentOptions::CPersistentOptions(CBitStreamReader& stream)
|
|||
void CPersistentOptions::PutTo(CBitStreamWriter& w) const
|
||||
{
|
||||
for (int b=0 ; b<98 ; ++b)
|
||||
w.WriteEncoded(x0_[b], 8);
|
||||
w.WriteEncoded(x0_nesState[b], 8);
|
||||
|
||||
for (int b=0 ; b<64 ; ++b)
|
||||
w.WriteEncoded(x68_[b], 8);
|
||||
|
|
|
@ -55,7 +55,7 @@ extern const std::pair<int, const SGameOption*> GameOptionsRegistry[];
|
|||
class CPersistentOptions
|
||||
{
|
||||
friend class CGameState;
|
||||
u8 x0_[98] = {};
|
||||
u8 x0_nesState[98] = {};
|
||||
bool x68_[64] = {};
|
||||
std::vector<std::pair<CAssetId, TEditorId>> xac_cinematicStates; /* (MLVL, Cinematic) */
|
||||
u32 xbc_autoMapperKeyState = 0;
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
|
||||
void PutTo(CBitStreamWriter& w) const;
|
||||
|
||||
u8* GetNESState() { return x0_; }
|
||||
u8* GetNESState() { return x0_nesState; }
|
||||
};
|
||||
|
||||
/** Options tracked per game session */
|
||||
|
|
|
@ -147,7 +147,7 @@ CGameState::CGameState()
|
|||
{
|
||||
x98_playerState = std::make_shared<CPlayerState>();
|
||||
x9c_transManager = std::make_shared<CWorldTransManager>();
|
||||
x228_25_deferPowerupInit = true;
|
||||
x228_25_initPowerupsAtFirstSpawn = true;
|
||||
if (g_MemoryCardSys)
|
||||
InitializeMemoryStates();
|
||||
}
|
||||
|
@ -156,14 +156,14 @@ CGameState::CGameState(CBitStreamReader& stream, u32 saveIdx)
|
|||
: x20c_saveFileIdx(saveIdx)
|
||||
{
|
||||
x9c_transManager = std::make_shared<CWorldTransManager>();
|
||||
x228_25_deferPowerupInit = true;
|
||||
x228_25_initPowerupsAtFirstSpawn = true;
|
||||
|
||||
for (u32 i = 0; i < 128; i++)
|
||||
x0_[i] = stream.ReadEncoded(8);
|
||||
u32 tsSeconds = stream.ReadEncoded(32);
|
||||
|
||||
x228_24_hardMode = stream.ReadEncoded(1);
|
||||
x228_25_deferPowerupInit = stream.ReadEncoded(1);
|
||||
x228_25_initPowerupsAtFirstSpawn = stream.ReadEncoded(1);
|
||||
x84_mlvlId = g_ResFactory->TranslateOriginalToNew(stream.ReadEncoded(32));
|
||||
MP1::CMain::EnsureWorldPakReady(x84_mlvlId);
|
||||
|
||||
|
@ -203,7 +203,7 @@ void CGameState::ImportPersistentOptions(const CPersistentOptions& opts)
|
|||
if (opts.xd0_27_fusionBeat)
|
||||
xa8_systemOptions.xd0_27_fusionBeat = true;
|
||||
if (&opts != &xa8_systemOptions)
|
||||
memcpy(xa8_systemOptions.x0_, opts.x0_, 98);
|
||||
memcpy(xa8_systemOptions.x0_nesState, opts.x0_nesState, 98);
|
||||
xa8_systemOptions.SetLogScanPercent(opts.GetLogScanPercent());
|
||||
xa8_systemOptions.SetAllItemsCollected(opts.GetAllItemsCollected());
|
||||
xa8_systemOptions.SetPlayerBeatNormalMode(opts.GetPlayerBeatNormalMode());
|
||||
|
@ -217,7 +217,7 @@ void CGameState::ExportPersistentOptions(CPersistentOptions& opts) const
|
|||
if (xa8_systemOptions.xd0_27_fusionBeat)
|
||||
opts.xd0_27_fusionBeat = true;
|
||||
if (&opts != &xa8_systemOptions)
|
||||
memcpy(opts.x0_, xa8_systemOptions.x0_, 98);
|
||||
memcpy(opts.x0_nesState, xa8_systemOptions.x0_nesState, 98);
|
||||
opts.SetPlayerFusionSuitActive(xa8_systemOptions.GetPlayerFusionSuitActive());
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ void CGameState::PutTo(CBitStreamWriter& writer) const
|
|||
|
||||
writer.WriteEncoded(CBasics::ToWiiTime(std::chrono::system_clock::now()) / CBasics::TICKS_PER_SECOND, 32);
|
||||
writer.WriteEncoded(x228_24_hardMode, 1);
|
||||
writer.WriteEncoded(x228_25_deferPowerupInit, 1);
|
||||
writer.WriteEncoded(x228_25_initPowerupsAtFirstSpawn, 1);
|
||||
writer.WriteEncoded(g_ResFactory->TranslateNewToOriginal(x84_mlvlId).Value(), 32);
|
||||
|
||||
BitsToDouble conv;
|
||||
|
|
|
@ -88,7 +88,7 @@ class CGameState
|
|||
struct
|
||||
{
|
||||
bool x228_24_hardMode : 1;
|
||||
bool x228_25_deferPowerupInit : 1;
|
||||
bool x228_25_initPowerupsAtFirstSpawn : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
|
|
|
@ -86,6 +86,7 @@ CPlayerState::CPlayerState(CBitStreamReader& stream)
|
|||
}
|
||||
|
||||
const auto& scanStates = g_MemoryCardSys->GetScanStates();
|
||||
x170_scanTimes.reserve(scanStates.size());
|
||||
for (const auto& state : scanStates)
|
||||
{
|
||||
float time = stream.ReadEncoded(1) ? 1.f : 0.f;
|
||||
|
@ -435,6 +436,7 @@ void CPlayerState::InitializeScanTimes()
|
|||
return;
|
||||
|
||||
const auto& scanStates = g_MemoryCardSys->GetScanStates();
|
||||
x170_scanTimes.reserve(scanStates.size());
|
||||
for (const auto& state : scanStates)
|
||||
x170_scanTimes.emplace_back(state.first, 0.f);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ private:
|
|||
float x1c_visorTransitionFactor = 0.2f;
|
||||
EPlayerSuit x20_currentSuit = EPlayerSuit::Power;
|
||||
rstl::reserved_vector<CPowerUp, 41> x24_powerups;
|
||||
rstl::reserved_vector<std::pair<CAssetId, float>, 846> x170_scanTimes;
|
||||
std::vector<std::pair<CAssetId, float>> x170_scanTimes;
|
||||
std::pair<u32, u32> x180_scanCompletionRate = {};
|
||||
CStaticInterference x188_staticIntf;
|
||||
public:
|
||||
|
@ -178,7 +178,7 @@ public:
|
|||
void SetFiringComboBeam(bool f) { x0_25_firingComboBeam = f; }
|
||||
void InitializeScanTimes();
|
||||
CStaticInterference& GetStaticInterference() { return x188_staticIntf; }
|
||||
const rstl::reserved_vector<std::pair<CAssetId, float>, 846>& GetScanTimes() const { return x170_scanTimes; }
|
||||
const std::vector<std::pair<CAssetId, float>>& GetScanTimes() const { return x170_scanTimes; }
|
||||
CPlayerState();
|
||||
CPlayerState(CBitStreamReader& stream);
|
||||
void PutTo(CBitStreamWriter& stream);
|
||||
|
|
|
@ -2254,10 +2254,10 @@ void CStateManager::InitializeState(CAssetId mlvlId, TAreaId aid, CAssetId mreaI
|
|||
x84c_player->Teleport(lookXf, *this, true);
|
||||
}
|
||||
|
||||
if (!g_GameState->x228_25_deferPowerupInit)
|
||||
if (!g_GameState->x228_25_initPowerupsAtFirstSpawn)
|
||||
break;
|
||||
|
||||
g_GameState->x228_25_deferPowerupInit = false;
|
||||
g_GameState->x228_25_initPowerupsAtFirstSpawn = false;
|
||||
for (int i = 0; i < int(CPlayerState::EItemType::Max); ++i)
|
||||
{
|
||||
CPlayerState::EItemType iType = CPlayerState::EItemType(i);
|
||||
|
|
|
@ -316,7 +316,7 @@ std::vector<uint8_t> VISIBuilder::build(const zeus::CAABox& fullAabb,
|
|||
FPercent updatePercent,
|
||||
ProcessType parentPid)
|
||||
{
|
||||
Log.report(logvisor::Info, "Started!");
|
||||
//Log.report(logvisor::Info, "Started!");
|
||||
|
||||
size_t featureCount = modelCount + entities.size();
|
||||
renderCache.m_lightMetaBit = featureCount;
|
||||
|
@ -385,6 +385,6 @@ std::vector<uint8_t> VISIBuilder::build(const zeus::CAABox& fullAabb,
|
|||
|
||||
w.seekAlign32();
|
||||
|
||||
Log.report(logvisor::Info, "Finished!");
|
||||
//Log.report(logvisor::Info, "Finished!");
|
||||
return dataOut;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue