private static void DmCmnBackupSave(bool is_first, bool is_new, bool is_del) { AppMain.GSS_MAIN_SYS_INFO mainSysInfo = AppMain.GsGetMainSysInfo(); var save = SSave.CreateInstance().GetSave(); if (save == null) { SSave.CreateInstance().SetSave((save = new gs.Sonic4Save())); } if (is_first) { XmlStorage.Save(save, true, false); //mainSysInfo.cmp_backup.setData(mainSysInfo.backup.getData()); } else if (is_new) { XmlStorage.Save(save, false, true); //mainSysInfo.cmp_backup.setData(mainSysInfo.backup.getData()); } else { if (mainSysInfo.is_save_run == 0U || !AppMain.dmCmnBackupIsCmpSaveData()) { return; } XmlStorage.Save(save, false, false); // mainSysInfo.cmp_backup.setData(mainSysInfo.backup.getData()); } }
private static void DmCmnBackupLoad() { var instance = SSave.CreateInstance(); var save = XmlStorage.Load(); if (save != null) { instance.SetSave(save); } }
private static bool dmCmnBackupMathCompare() { return(!SSave.CreateInstance().GetDirty()); }