mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 00:27:42 +00:00
Work on CMemoryCardDriver
This commit is contained in:
@@ -183,7 +183,7 @@ CGameState::CGameState(CBitStreamReader& stream)
|
||||
}
|
||||
}
|
||||
|
||||
void CGameState::MergePersistentOptions(const CPersistentOptions& opts)
|
||||
void CGameState::ImportPersistentOptions(const CPersistentOptions& opts)
|
||||
{
|
||||
if (opts.xd0_24_)
|
||||
xa8_systemOptions.xd0_24_ = true;
|
||||
@@ -197,6 +197,24 @@ void CGameState::MergePersistentOptions(const CPersistentOptions& opts)
|
||||
xa8_systemOptions.SetPlayerBeatHardMode(opts.GetPlayerBeatHardMode());
|
||||
}
|
||||
|
||||
void CGameState::ExportPersistentOptions(CPersistentOptions& opts) const
|
||||
{
|
||||
if (xa8_systemOptions.xd0_24_)
|
||||
opts.xd0_24_ = true;
|
||||
if (xa8_systemOptions.xd0_27_)
|
||||
opts.xd0_27_ = true;
|
||||
if (&opts != &xa8_systemOptions)
|
||||
memcpy(opts.x0_, xa8_systemOptions.x0_, 98);
|
||||
opts.SetPlayerHasFusion(xa8_systemOptions.GetPlayerHasFusion());
|
||||
}
|
||||
|
||||
void CGameState::WriteBackupBuf()
|
||||
{
|
||||
x218_backupBuf.resize(940);
|
||||
CBitStreamWriter w(x218_backupBuf.data(), 940);
|
||||
PutTo(w);
|
||||
}
|
||||
|
||||
void CGameState::PutTo(CBitStreamWriter& writer) const
|
||||
{
|
||||
for (u32 i = 0; i < 128; i++)
|
||||
|
||||
Reference in New Issue
Block a user