public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadCharArray(128); Field1 = new LabelCondition(); Field1.Parse(buffer); Field2 = buffer.ReadInt(32); Field3 = buffer.ReadInt(32); serEntries = new SerializeData(); serEntries.Parse(buffer); //still checking variablearrays this.Entries = new List<LabelEntry>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Entries.Count; loop12++) { _Entries[loop12] = new LabelEntry(); _Entries[loop12].Parse(buffer); } }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; Field0 = stream.ReadString(128); stream.Position = offset + 128; Field1 = new LabelCondition(); Field1.FileRead(stream, stream.Position); stream.Position = offset + 152; Field2 = stream.ReadValueS32(); stream.Position = offset + 156; Field3 = stream.ReadValueS32(); stream.Position = offset + 168; serEntries = new SerializeData(); serEntries.FileRead(stream, stream.Position); stream.Position = offset + 160; //still checking variablearrays Entries = new List<LabelEntry>(); for(int i = 0; i < (int)(serEntries.Field1 / 20); i++) { stream.Position = serEntries.Field0 + 16 + (20*i) ; LabelEntry temp12_Entries; temp12_Entries = new LabelEntry(); temp12_Entries.FileRead(stream, stream.Position); _Entries.Add(temp12_Entries); } }