protected override void ReadData(ESPReader reader) { using (MemoryStream stream = new MemoryStream(reader.ReadBytes(size))) using (ESPReader subReader = new ESPReader(stream, reader.Plugin)) { try { SkyUpper.ReadBinary(subReader); Fog.ReadBinary(subReader); Unused1.ReadBinary(subReader); Ambient.ReadBinary(subReader); Sunlight.ReadBinary(subReader); Sun.ReadBinary(subReader); Stars.ReadBinary(subReader); SkyLower.ReadBinary(subReader); Horizon.ReadBinary(subReader); Unused2.ReadBinary(subReader); } catch { return; } } }
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 "DESC": if (Content == null) { Content = new SimpleSubrecord <String>(); } Content.ReadBinary(reader); break; case "FULL": if (Header == null) { Header = new SimpleSubrecord <String>(); } Header.ReadBinary(reader); break; case "INAM": if (Icon == null) { Icon = new RecordReference(); } Icon.ReadBinary(reader); break; case "NAM0": if (Unused0 == null) { Unused0 = new SimpleSubrecord <Byte[]>(); } Unused0.ReadBinary(reader); break; case "NAM1": if (Unused1 == null) { Unused1 = new SimpleSubrecord <Byte[]>(); } Unused1.ReadBinary(reader); break; case "NAM2": if (Unused2 == null) { Unused2 = new SimpleSubrecord <Byte[]>(); } Unused2.ReadBinary(reader); break; case "NAM3": if (Unused3 == null) { Unused3 = new SimpleSubrecord <Byte[]>(); } Unused3.ReadBinary(reader); break; case "NAM4": if (Unused4 == null) { Unused4 = new SimpleSubrecord <Byte[]>(); } Unused4.ReadBinary(reader); break; case "NAM5": if (Unused5 == null) { Unused5 = new SimpleSubrecord <Byte[]>(); } Unused5.ReadBinary(reader); break; case "NAM6": if (Unused6 == null) { Unused6 = new SimpleSubrecord <Byte[]>(); } Unused6.ReadBinary(reader); break; case "NAM7": if (Unused7 == null) { Unused7 = new SimpleSubrecord <Byte[]>(); } Unused7.ReadBinary(reader); break; case "NAM8": if (Unused8 == null) { Unused8 = new SimpleSubrecord <Byte[]>(); } Unused8.ReadBinary(reader); break; case "NAM9": if (Unused9 == null) { Unused9 = new SimpleSubrecord <Byte[]>(); } Unused9.ReadBinary(reader); break; case "DNAM": if (MessageFlags == null) { MessageFlags = new SimpleSubrecord <MessageFlags>(); } MessageFlags.ReadBinary(reader); break; case "TNAM": if (DisplayTime == null) { DisplayTime = new SimpleSubrecord <UInt32>(); } DisplayTime.ReadBinary(reader); break; case "ITXT": if (Buttons == null) { Buttons = new List <MessageButton>(); } MessageButton tempITXT = new MessageButton(); tempITXT.ReadBinary(reader); Buttons.Add(tempITXT); break; default: throw new Exception(); } } }