Add CMemoryCardDriver::ExportPersistentOptions

Former-commit-id: 93ef9574e1
This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-11 19:56:45 +03:00
parent 280928fc65
commit 155de1457f
2 changed files with 10 additions and 1 deletions

View File

@ -14,6 +14,7 @@ public:
CSystemOptions(); CSystemOptions();
explicit CSystemOptions(CInputStream&); explicit CSystemOptions(CInputStream&);
~CSystemOptions(); ~CSystemOptions();
void PutTo(COutputStream&);
void SetHasFusion(bool v); void SetHasFusion(bool v);
bool GetHasFusion() const { return xd0_28_fusionSuitActive; } bool GetHasFusion() const { return xd0_28_fusionSuitActive; }

View File

@ -747,7 +747,15 @@ void CMemoryCardDriver::ImportPersistentOptions() {
gpGameState->ImportPersistentOptions(opts); gpGameState->ImportPersistentOptions(opts);
} }
void CMemoryCardDriver::ExportPersistentOptions() {} void CMemoryCardDriver::ExportPersistentOptions() {
u8* data = x30_systemData.data();
CMemoryInStream r(data, x30_systemData.capacity());
CSystemOptions opts(r);
gpGameState->ExportPersistentOptions(opts);
CMemoryStreamOut w(data, x30_systemData.capacity());
opts.PutTo(w);
}
// SSaveHeader::SSaveHeader(int) // SSaveHeader::SSaveHeader(int)