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 "MODL": if (Model == null) { Model = new Model(); } Model.ReadBinary(reader); break; case "DATA": if (Data == null) { Data = new ImpactData(); } Data.ReadBinary(reader); break; case "DODT": if (DecalData == null) { DecalData = new DecalData(); } DecalData.ReadBinary(reader); break; case "DNAM": if (TextureSet == null) { TextureSet = new RecordReference(); } TextureSet.ReadBinary(reader); break; case "SNAM": if (Sound1 == null) { Sound1 = new RecordReference(); } Sound1.ReadBinary(reader); break; case "NAM1": if (Sound2 == null) { Sound2 = new RecordReference(); } Sound2.ReadBinary(reader); break; default: throw new Exception(); } } }
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 "TX00": if (BaseImage_Transparency == null) { BaseImage_Transparency = new SimpleSubrecord <String>(); } BaseImage_Transparency.ReadBinary(reader); break; case "TX01": if (NormalMap_Specular == null) { NormalMap_Specular = new SimpleSubrecord <String>(); } NormalMap_Specular.ReadBinary(reader); break; case "TX02": if (EnvironmentMapMask == null) { EnvironmentMapMask = new SimpleSubrecord <String>(); } EnvironmentMapMask.ReadBinary(reader); break; case "TX03": if (GlowMap == null) { GlowMap = new SimpleSubrecord <String>(); } GlowMap.ReadBinary(reader); break; case "TX04": if (ParallaxMap == null) { ParallaxMap = new SimpleSubrecord <String>(); } ParallaxMap.ReadBinary(reader); break; case "TX05": if (EnvironmentMap == null) { EnvironmentMap = new SimpleSubrecord <String>(); } EnvironmentMap.ReadBinary(reader); break; case "DODT": if (DecalData == null) { DecalData = new DecalData(); } DecalData.ReadBinary(reader); break; case "DNAM": if (TextureSetFlags == null) { TextureSetFlags = new SimpleSubrecord <TXSTFlags>(); } TextureSetFlags.ReadBinary(reader); break; default: throw new Exception(); } } }