/// <summary>Load the HaloCE files we need to fully run this library</summary>
            /// <remarks>
            /// Paths[0] = Bitmaps
            /// Paths[1] = Sounds
            /// Paths[2] = Loc
            /// </remarks>
            /// <param name="paths"></param>
            public static void LoadCe(params string[] paths)
            {
                Blam.DatumIndex di;

                if (paths.Length >= 1 && System.IO.File.Exists(paths[0]))
                {
                    di        = manager.OpenResourceCacheFile(BlamVersion.Halo1_CE, CeBitmapsPath = paths[0]);
                    CeBitmaps = manager.GetCacheFile(di) as BlamLib.Blam.Halo1.BitmapCacheFile;
                    CeBitmaps.ReadResourceCache();
                }

                if (paths.Length >= 2 && System.IO.File.Exists(paths[1]))
                {
                    di       = manager.OpenResourceCacheFile(BlamVersion.Halo1_CE, CeSoundsPath = paths[1]);
                    CeSounds = manager.GetCacheFile(di) as BlamLib.Blam.Halo1.SoundCacheFile;
                    CeSounds.ReadResourceCache();
                }

                if (paths.Length >= 3 && System.IO.File.Exists(paths[2]))
                {
                    di    = manager.OpenResourceCacheFile(BlamVersion.Halo1_CE, CeLocPath = paths[2]);
                    CeLoc = manager.GetCacheFile(di) as BlamLib.Blam.Halo1.LocCacheFile;
                    CeLoc.ReadResourceCache();
                }
            }
Esempio n. 2
0
			/// <summary>Load the HaloPC files we need to fully run this library</summary>
			/// <remarks>
			/// Paths[0] = Bitmaps
			/// Paths[1] = Sounds
			/// </remarks>
			/// <param name="paths"></param>
			public static void LoadPc(params string[] paths)
			{
				Blam.DatumIndex di;

				if (paths.Length >= 1 && System.IO.File.Exists(paths[0]))
				{
					di = manager.OpenResourceCacheFile(BlamVersion.Halo1_PC, PcBitmapsPath = paths[0]);
					PcBitmaps = manager.GetCacheFile(di) as BlamLib.Blam.Halo1.BitmapCacheFile;
					PcBitmaps.ReadResourceCache();
				}

				if (paths.Length >= 2 && System.IO.File.Exists(paths[1]))
				{
					di = manager.OpenResourceCacheFile(BlamVersion.Halo1_PC, PcSoundsPath = paths[1]);
					PcSounds = manager.GetCacheFile(di) as BlamLib.Blam.Halo1.SoundCacheFile;
					PcSounds.ReadResourceCache();
				}
			}