public static HipSection[] GetNewArchive(out bool OK, out Platform platform, out Game game) { NewArchive newArchive = new NewArchive(); newArchive.ShowDialog(); platform = newArchive.platform; game = newArchive.game; OK = newArchive.OK; return(newArchive.result); }
public static HipFile GetNewArchive(out bool OK, out bool addDefaultAssets) { NewArchive newArchive = new NewArchive(); newArchive.ShowDialog(); OK = newArchive.OK; addDefaultAssets = newArchive.checkBoxDefaultAssets.Checked; return(newArchive.result); }
public static void GetExistingArchive(Platform previousPlatform, Game previousGame, int previousDate, string previousDateString, out bool OK, out Section_PACK PACK, out Platform newPlatform, out Game newGame) { NewArchive newArchive = new NewArchive(previousPlatform, previousGame, previousDate, previousDateString); newArchive.ShowDialog(); OK = newArchive.OK; PACK = OK ? newArchive.result.PACK : null; newPlatform = newArchive.platform; newGame = newArchive.game; }
public static (HipFile hipFile, Platform platform, Game game, bool addDefaultAssets) GetNewArchive() { NewArchive newArchive = new NewArchive(); newArchive.ShowDialog(); if (newArchive.result != null) { return(newArchive.result, newArchive.platform, newArchive.game, newArchive.checkBoxDefaultAssets.Checked); } return(null, Platform.Unknown, Game.Unknown, false); }
public static (Section_PACK PACK, Platform newPlatform, Game newGame) GetExistingArchive(Platform previousPlatform, Game previousGame, int previousDate, string previousDateString) { NewArchive newArchive = new NewArchive(previousPlatform, previousGame, previousDate, previousDateString); newArchive.ShowDialog(); if (newArchive.OK) { return(newArchive.result.PACK, newArchive.platform, newArchive.game); } return(null, 0, 0); }
public static (HipFile hipFile, bool addDefaultAssets) GetNewArchive() { NewArchive newArchive = new NewArchive(); newArchive.ShowDialog(); if (newArchive.result != null) { return(newArchive.result, newArchive.checkBoxDefaultAssets.Checked); } return(null, false); }
public bool EditPack(out List <uint> unsupported) { Platform previousPlatform = platform; Game previousGame = game; var(PACK, newPlatform, newGame) = NewArchive.GetExistingArchive(platform, game, hipFile.PACK.PCRT.fileDate, hipFile.PACK.PCRT.dateString); unsupported = new List <uint>(); if (PACK != null) { hipFile.PACK = PACK; hipFile.platform = newPlatform; hipFile.game = newGame; if (platform == Platform.Unknown) { new ChoosePlatformDialog().ShowDialog(); } for (int i = 0; i < internalEditors.Count; i++) { internalEditors[i].Close(); i--; } if (previousPlatform != platform || previousGame != game) { ConvertAllAssetTypes(previousPlatform, previousGame, out unsupported); } UnsavedChanges = true; return(true); } return(false); }
public bool New() { var(hipFile, addDefaultAssets) = NewArchive.GetNewArchive(); if (hipFile != null) { Dispose(); currentlySelectedAssets = new List <Asset>(); currentlyOpenFilePath = null; assetDictionary.Clear(); this.hipFile = hipFile; if (platform == Platform.Unknown) { new ChoosePlatformDialog().ShowDialog(); } foreach (Section_AHDR AHDR in DICT.ATOC.AHDRList) { AddAssetToDictionary(AHDR, true); } if (addDefaultAssets) { PlaceDefaultAssets(); } UnsavedChanges = true; RecalculateAllMatrices(); return(true); } return(false); }