public override void Parse(GameBitBuffer buffer) { serTiles = new SerializeData(); serTiles.Parse(buffer); //still checking variablearrays this.Tiles = new List<TileInfo>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Tiles.Count; loop12++) { _Tiles[loop12] = new TileInfo(); _Tiles[loop12].Parse(buffer); } Field2 = buffer.ReadInt(32); serCommands = new SerializeData(); serCommands.Parse(buffer); //still checking variablearrays this.Commands = new List<DRLGCommand>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Commands.Count; loop12++) { _Commands[loop12] = new DRLGCommand(); _Commands[loop12].Parse(buffer); } serParentIndices = new SerializeData(); serParentIndices.Parse(buffer); //still checking variablearrays this.ParentIndices = new List<int>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _ParentIndices.Count; loop12++) { _ParentIndices[loop12] = buffer.ReadInt(0); } serDRLGTagMap = new SerializeData(); serDRLGTagMap.Parse(buffer); hDRLGTagMap = new DT_TAGMAP(); hDRLGTagMap.Parse(buffer); }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; serTiles = new SerializeData(); serTiles.FileRead(stream, stream.Position); stream.Position = offset + 8; //still checking variablearrays Tiles = new List<TileInfo>(); for(int i = 0; i < (int)(serTiles.Field1 / 72); i++) { stream.Position = serTiles.Field0 + 16 + (72*i) ; TileInfo temp12_Tiles; temp12_Tiles = new TileInfo(); temp12_Tiles.FileRead(stream, stream.Position); _Tiles.Add(temp12_Tiles); } stream.Position = offset + 64; Field2 = stream.ReadValueS32(); stream.Position = offset + 68; serCommands = new SerializeData(); serCommands.FileRead(stream, stream.Position); stream.Position = offset + 80; //still checking variablearrays Commands = new List<DRLGCommand>(); for(int i = 0; i < (int)(serCommands.Field1 / 152); i++) { stream.Position = serCommands.Field0 + 16 + (152*i) ; DRLGCommand temp12_Commands; temp12_Commands = new DRLGCommand(); temp12_Commands.FileRead(stream, stream.Position); _Commands.Add(temp12_Commands); } stream.Position = offset + 88; serParentIndices = new SerializeData(); serParentIndices.FileRead(stream, stream.Position); stream.Position = offset + 96; //still checking variablearrays ParentIndices = new List<int>(); for(int i = 0; i < (int)(serParentIndices.Field1 / 4); i++) { stream.Position = serParentIndices.Field0 + 16 + (4*i) ; int temp12_ParentIndices; temp12_ParentIndices = stream.ReadValueS32(); _ParentIndices.Add(temp12_ParentIndices); } stream.Position = offset + 104; serDRLGTagMap = new SerializeData(); serDRLGTagMap.FileRead(stream, stream.Position); stream.Position = offset + 112; // hDRLGTagMap: type DT_TAGMAP hasnt a deserializer implemented throw new Exception("some fields arent going to be decoded."); }