/// <summary> /// The get ifp. /// </summary> /// <param name="TagType">The tag type.</param> /// <param name="map">The map.</param> /// <returns></returns> /// <remarks></remarks> public static IFPIO GetIfp(string TagType, HaloVersionEnum HaloVersion) { IFPIO tempifp; if (HaloVersion == HaloVersionEnum.Halo2 || HaloVersion == HaloVersionEnum.Halo2Vista) { tempifp = (IFPIO)H2IFPHash[TagType]; if (tempifp == null) { tempifp = new IFPIO(); // string temps = Global.StartupPath + "\\plugins\\" + TagType.Trim() + ".ifp"; string temps = Prefs.pathPluginsFolder + "\\" + TagType.Trim() + ".ent"; temps = temps.Replace("<", "_"); temps = temps.Replace(">", "_"); try { tempifp.ReadIFP(temps); } catch (Exception e) { throw new Exception("Error Reading Ifp: " + TagType, e); } // IFPHashMap.H2IFPHash.Remove(TagType); H2IFPHash.Add(TagType, tempifp); } } else { // Halo 1 or Halo CE tempifp = (IFPIO)H1IFPHash[TagType]; if (tempifp == null) { tempifp = new IFPIO(); // string temps = Global.StartupPath + "\\plugins\\" + TagType.Trim() + ".ifp"; string temps = Global.StartupPath + "\\Plugins\\Halo 1\\ent\\" + TagType.Trim() + ".ent"; temps = temps.Replace("<", "_"); temps = temps.Replace(">", "_"); try { tempifp.ReadIFP(temps /* + "2"*/); } catch (Exception ex) { Global.ShowErrorMsg("Error Reading Ifp: " + TagType, ex); } H1IFPHash.Add(TagType, tempifp); } } return(tempifp); }
public void loadMeta(Meta meta, HaloVersionEnum HaloVersion, string FileName) { this.fileName = fileName; this.HaloVersion = HaloVersion; this.meta = meta; loadFile(); createTreeListing(); }
public void loadMeta(Meta meta, HaloVersionEnum HaloVersion, Stream stream) { this.fileName = string.Empty; this.HaloVersion = HaloVersion; this.meta = meta; loadStream(stream); createTreeListing(); }
/// <summary> /// The get ifp. /// </summary> /// <param name="TagType">The tag type.</param> /// <param name="map">The map.</param> /// <returns></returns> /// <remarks></remarks> public static IFPIO GetIfp(string TagType, HaloVersionEnum HaloVersion) { IFPIO tempifp; if (HaloVersion == HaloVersionEnum.Halo2 || HaloVersion == HaloVersionEnum.Halo2Vista) { tempifp = (IFPIO)H2IFPHash[TagType]; if (tempifp == null) { tempifp = new IFPIO(); // string temps = Global.StartupPath + "\\plugins\\" + TagType.Trim() + ".ifp"; string temps = Prefs.pathPluginsFolder + "\\" + TagType.Trim() + ".ent"; temps = temps.Replace("<", "_"); temps = temps.Replace(">", "_"); try { tempifp.ReadIFP(temps); } catch (Exception e) { throw new Exception("Error Reading Ent: " + TagType, e); } // IFPHashMap.H2IFPHash.Remove(TagType); H2IFPHash.Add(TagType, tempifp); } } else { // Halo 1 or Halo CE tempifp = (IFPIO)H1IFPHash[TagType]; if (tempifp == null) { tempifp = new IFPIO(); // string temps = Global.StartupPath + "\\plugins\\" + TagType.Trim() + ".ifp"; string temps = Global.StartupPath + "\\Plugins\\Halo 1\\ent\\" + TagType.Trim() + ".ent"; temps = temps.Replace("<", "_"); temps = temps.Replace(">", "_"); try { tempifp.ReadIFP(temps /* + "2"*/); } catch (Exception ex) { Global.ShowErrorMsg("Error Reading Ent: " + TagType, ex); } H1IFPHash.Add(TagType, tempifp); } } return tempifp; }
/// <summary> /// Initializes a new instance of the <see cref="MapHeaderInfo"/> class. /// </summary> /// <param name="BR">The BR.</param> /// <param name="haloversion">The haloversion.</param> /// <remarks></remarks> public MapHeaderInfo(ref BinaryReader BR, HaloVersionEnum haloversion) { switch (haloversion) { case HaloVersionEnum.Halo2: LoadHalo2MapHeaderInfo(ref BR); break; case HaloVersionEnum.Halo2Vista: LoadHaloCEMapHeaderInfo(ref BR); break; case HaloVersionEnum.HaloCE: case HaloVersionEnum.Halo1: LoadHalo2MapHeaderInfo(ref BR); break; } }