/// <summary> /// Loads the Halo Reach files needed to fully run this library /// </summary> /// <remarks> /// Path[0] = Mainmenu /// Path[1] = Shared /// Path[2] = Single Player Shared /// </remarks> /// <param name="paths"></param> public static void LoadXbox(params string[] paths) { Blam.DatumIndex di; if (paths.Length >= 1 && System.IO.File.Exists(paths[0])) { di = manager.OpenResourceCacheFile(BlamVersion.HaloReach_Xbox, XboxMainmenuPath = paths[0]); XboxMainmenu = manager.GetCacheFile(di) as BlamLib.Blam.HaloReach.CacheFile; XboxMainmenu.ReadResourceCache(); } if (paths.Length >= 2 && System.IO.File.Exists(paths[1])) { di = manager.OpenResourceCacheFile(BlamVersion.HaloReach_Xbox, XboxSharedPath = paths[1]); XboxShared = manager.GetCacheFile(di) as BlamLib.Blam.HaloReach.CacheFile; XboxShared.ReadResourceCache(); } if (paths.Length >= 3 && System.IO.File.Exists(paths[2])) { di = manager.OpenResourceCacheFile(BlamVersion.HaloReach_Xbox, XboxCampaignPath = paths[2]); XboxCampaign = manager.GetCacheFile(di) as BlamLib.Blam.HaloReach.CacheFile; XboxCampaign.ReadResourceCache(); } }
/// <summary> /// Loads the Halo Reach files needed to fully run this library /// </summary> /// <remarks> /// Path[0] = Mainmenu /// Path[1] = Shared /// </remarks> /// <param name="paths"></param> public static void LoadBeta(params string[] paths) { Blam.DatumIndex di; if (paths.Length >= 1 && System.IO.File.Exists(paths[0])) { di = manager.OpenResourceCacheFile(BlamVersion.HaloReach_Beta, BetaMainmenuPath = paths[0]); BetaMainmenu = manager.GetCacheFile(di) as BlamLib.Blam.HaloReach.CacheFile; BetaMainmenu.EngineVersion = BlamVersion.HaloReach_Beta; BetaMainmenu.ReadResourceCache(); } if (paths.Length >= 2 && System.IO.File.Exists(paths[1])) { di = manager.OpenResourceCacheFile(BlamVersion.HaloReach_Beta, BetaSharedPath = paths[1]); BetaShared = manager.GetCacheFile(di) as BlamLib.Blam.HaloReach.CacheFile; BetaShared.EngineVersion = BlamVersion.HaloReach_Beta; BetaShared.ReadResourceCache(); } }