public void Save() { if (_campaignSave != null && _mmiofPath != null) { // Save Campaign Save _campaignSave.Update(_mmiofPath); // Update STFS Package X360.STFS.STFSPackage package = new X360.STFS.STFSPackage(_saveStorage.SaveLocalPath, null); package.GetFile("mmiof.bmf").Replace(_mmiofPath); // Rehash/Resign Package // Do we need to do any FATX stuff? if (_saveStorage.IsSaveFromFATX) { // Yes :( _saveStorage.FATXDrive.Open(); CLKsFATXLib.File saveFile = _saveStorage.FATXDrive.FileFromPath(_saveStorage.FATXPath); CLKsFATXLib.Folder saveFolder = saveFile.Parent; string fileName = saveFile.Name; // TODO: This } } }
public void Load() { // Extract the mmiof.bmf _mmiofPath = VariousFunctions.CreateTemporaryFile(VariousFunctions.GetTemporaryExtractionLocation()); X360.STFS.STFSPackage package = new X360.STFS.STFSPackage(_saveStorage.SaveLocalPath, null); package.GetFile("mmiof.bmf").Extract(_mmiofPath); // Open the mmiof.bmf _campaignSave = new CampaignSave(_mmiofPath); // Update User Interface // Add Save to OpenSaves list Settings.OpenedSaves.Add(_saveStorage.USID); // Reload FATX Devices Settings.StartPage.LoadSavesFromDevices(); }
/// <summary> /// Identifies the game which owns a package. /// </summary> /// <param name="package">The STFSPackage to examine</param> /// <returns>The game that the save belongs to</returns> public static SaveType IdentifyGame(X360.STFS.STFSPackage package) { switch (package.Header.TitleID) { case ReachTitleID: if (package.GetFile("mmiof.bmf") != null) { return(SaveType.Reach); } break; case AnniversaryID: if (package.GetFile("saves.cfg") != null) { return(SaveType.Anniversary); } break; case Halo3TitleID: if (package.GetFile("mmiof.bmf") != null) { return(SaveType.Halo3); } break; case Halo3ODSTTitleID: if (package.GetFile("mmiof.bmf") != null) { return(SaveType.Halo3ODST); } break; case Halo4TitleID: if (package.GetFile("mmiof.bmf") != null) { return(SaveType.Halo4); } break; } return(SaveType.Unknown); }