예제 #1
0
            /// <summary>Loads the Halo2_Xbox 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.OpenCacheFile(BlamVersion.Halo2_Xbox, XboxMainmenuPath = paths[0]);
                    XboxMainmenu = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
                    XboxMainmenu.Read();
                }

                if (paths.Length >= 2 && System.IO.File.Exists(paths[1]))
                {
                    di         = manager.OpenCacheFile(BlamVersion.Halo2_Xbox, XboxSharedPath = paths[1]);
                    XboxShared = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
                    XboxShared.Read();
                }

                if (paths.Length >= 3 && System.IO.File.Exists(paths[2]))
                {
                    di           = manager.OpenCacheFile(BlamVersion.Halo2_Xbox, XboxCampaignPath = paths[2]);
                    XboxCampaign = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
                    XboxCampaign.Read();
                }
            }
예제 #2
0
			/// <summary>Loads the Halo2_Xbox 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.OpenCacheFile(BlamVersion.Halo2_Xbox, XboxMainmenuPath = paths[0]);
					XboxMainmenu = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
					XboxMainmenu.Read();
				}

				if (paths.Length >= 2 && System.IO.File.Exists(paths[1]))
				{
					di = manager.OpenCacheFile(BlamVersion.Halo2_Xbox, XboxSharedPath = paths[1]);
					XboxShared = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
					XboxShared.Read();
				}

				if (paths.Length >= 3 && System.IO.File.Exists(paths[2]))
				{
					di = manager.OpenCacheFile(BlamVersion.Halo2_Xbox, XboxCampaignPath = paths[2]);
					XboxCampaign = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
					XboxCampaign.Read();
				}
			}
예제 #3
0
            /// <summary>Loads the Halo2_Alpha files needed to fully run this library</summary>
            /// <remarks>
            /// Path[0] = Mainmenu
            /// Path[1] = Shared
            /// </remarks>
            /// <param name="paths"></param>
            public static void LoadAlpha(params string[] paths)
            {
                Blam.DatumIndex di;

                if (paths.Length >= 1 && System.IO.File.Exists(paths[0]))
                {
                    di            = manager.OpenCacheFile(BlamVersion.Halo2_Alpha, AlphaMainmenuPath = paths[0]);
                    AlphaMainmenu = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
                    AlphaMainmenu.Read();
                }

                if (paths.Length >= 2 && System.IO.File.Exists(paths[1]))
                {
                    di          = manager.OpenCacheFile(BlamVersion.Halo2_Alpha, AlphaSharedPath = paths[1]);
                    AlphaShared = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
                    AlphaShared.Read();
                }
            }
예제 #4
0
			/// <summary>Loads the Halo2_Alpha files needed to fully run this library</summary>
			/// <remarks>
			/// Path[0] = Mainmenu
			/// Path[1] = Shared
			/// </remarks>
			/// <param name="paths"></param>
			public static void LoadAlpha(params string[] paths)
			{
				Blam.DatumIndex di;

				if (paths.Length >= 1 && System.IO.File.Exists(paths[0]))
				{
					di = manager.OpenCacheFile(BlamVersion.Halo2_Alpha, AlphaMainmenuPath = paths[0]);
					AlphaMainmenu = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
					AlphaMainmenu.Read();
				}

				if (paths.Length >= 2 && System.IO.File.Exists(paths[1]))
				{
					di = manager.OpenCacheFile(BlamVersion.Halo2_Alpha, AlphaSharedPath = paths[1]);
					AlphaShared = manager.GetCacheFile(di) as BlamLib.Blam.Halo2.CacheFile;
					AlphaShared.Read();
				}
			}