2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

PART MBSP property yaml fix

This commit is contained in:
Jack Andersen
2018-04-04 20:58:11 -10:00
parent d5e471bac3
commit 898114d803
9 changed files with 20 additions and 18 deletions

View File

@@ -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;