public Tree() { EditorID = new SimpleSubrecord<String>("EDID"); ObjectBounds = new ObjectBounds("OBND"); Model = new Model(); SpeedtreeSeeds = new SpeedtreeSeeds("SNAM"); Data = new TreeData("CNAM"); BillboardDimensions = new BillboardDimensions("BNAM"); }
public override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (EditorID != null) { ele.TryPathTo("EditorID", true, out subEle); EditorID.WriteXML(subEle, master); } if (ObjectBounds != null) { ele.TryPathTo("ObjectBounds", true, out subEle); ObjectBounds.WriteXML(subEle, master); } if (Model != null) { ele.TryPathTo("Model", true, out subEle); Model.WriteXML(subEle, master); } if (LargeIcon != null) { ele.TryPathTo("Icon/Large", true, out subEle); LargeIcon.WriteXML(subEle, master); } if (SmallIcon != null) { ele.TryPathTo("Icon/Small", true, out subEle); SmallIcon.WriteXML(subEle, master); } if (SpeedtreeSeeds != null) { ele.TryPathTo("SpeedtreeSeeds", true, out subEle); SpeedtreeSeeds.WriteXML(subEle, master); } if (Data != null) { ele.TryPathTo("Data", true, out subEle); Data.WriteXML(subEle, master); } if (BillboardDimensions != null) { ele.TryPathTo("BillboardDimensions", true, out subEle); BillboardDimensions.WriteXML(subEle, master); } }
public override void WriteData(ESPWriter writer) { if (EditorID != null) EditorID.WriteBinary(writer); if (ObjectBounds != null) ObjectBounds.WriteBinary(writer); if (Model != null) Model.WriteBinary(writer); if (LargeIcon != null) LargeIcon.WriteBinary(writer); if (SmallIcon != null) SmallIcon.WriteBinary(writer); if (SpeedtreeSeeds != null) SpeedtreeSeeds.WriteBinary(writer); if (Data != null) Data.WriteBinary(writer); if (BillboardDimensions != null) BillboardDimensions.WriteBinary(writer); }
public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) EditorID = new SimpleSubrecord<String>(); EditorID.ReadBinary(reader); break; case "OBND": if (ObjectBounds == null) ObjectBounds = new ObjectBounds(); ObjectBounds.ReadBinary(reader); break; case "MODL": if (Model == null) Model = new Model(); Model.ReadBinary(reader); break; case "ICON": if (LargeIcon == null) LargeIcon = new SimpleSubrecord<String>(); LargeIcon.ReadBinary(reader); break; case "MICO": if (SmallIcon == null) SmallIcon = new SimpleSubrecord<String>(); SmallIcon.ReadBinary(reader); break; case "SNAM": if (SpeedtreeSeeds == null) SpeedtreeSeeds = new SpeedtreeSeeds(); SpeedtreeSeeds.ReadBinary(reader); break; case "CNAM": if (Data == null) Data = new TreeData(); Data.ReadBinary(reader); break; case "BNAM": if (BillboardDimensions == null) BillboardDimensions = new BillboardDimensions(); BillboardDimensions.ReadBinary(reader); break; default: throw new Exception(); } } }
public Tree(SimpleSubrecord<String> EditorID, ObjectBounds ObjectBounds, Model Model, SimpleSubrecord<String> LargeIcon, SimpleSubrecord<String> SmallIcon, SpeedtreeSeeds SpeedtreeSeeds, TreeData Data, BillboardDimensions BillboardDimensions) { this.EditorID = EditorID; this.ObjectBounds = ObjectBounds; this.Model = Model; this.SpeedtreeSeeds = SpeedtreeSeeds; this.Data = Data; this.BillboardDimensions = BillboardDimensions; }
public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) EditorID = new SimpleSubrecord<String>(); EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectBounds", false, out subEle)) { if (ObjectBounds == null) ObjectBounds = new ObjectBounds(); ObjectBounds.ReadXML(subEle, master); } if (ele.TryPathTo("Model", false, out subEle)) { if (Model == null) Model = new Model(); Model.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Large", false, out subEle)) { if (LargeIcon == null) LargeIcon = new SimpleSubrecord<String>(); LargeIcon.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Small", false, out subEle)) { if (SmallIcon == null) SmallIcon = new SimpleSubrecord<String>(); SmallIcon.ReadXML(subEle, master); } if (ele.TryPathTo("SpeedtreeSeeds", false, out subEle)) { if (SpeedtreeSeeds == null) SpeedtreeSeeds = new SpeedtreeSeeds(); SpeedtreeSeeds.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) Data = new TreeData(); Data.ReadXML(subEle, master); } if (ele.TryPathTo("BillboardDimensions", false, out subEle)) { if (BillboardDimensions == null) BillboardDimensions = new BillboardDimensions(); BillboardDimensions.ReadXML(subEle, master); } }