public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; Field0 = stream.ReadValueS32(); stream.Position = offset + 4; serVertices = new SerializeData(); serVertices.FileRead(stream, stream.Position); stream.Position = offset + 12; //still checking variablearrays Vertices = new List<ClothVertex>(); for(int i = 0; i < (int)(serVertices.Field1 / 84); i++) { stream.Position = serVertices.Field0 + 16 + (84*i) ; ClothVertex temp12_Vertices; temp12_Vertices = new ClothVertex(); temp12_Vertices.FileRead(stream, stream.Position); _Vertices.Add(temp12_Vertices); } stream.Position = offset + 16; Field3 = stream.ReadValueS32(); stream.Position = offset + 20; serFaces = new SerializeData(); serFaces.FileRead(stream, stream.Position); stream.Position = offset + 28; //still checking variablearrays Faces = new List<ClothFace>(); for(int i = 0; i < (int)(serFaces.Field1 / 28); i++) { stream.Position = serFaces.Field0 + 16 + (28*i) ; ClothFace temp12_Faces; temp12_Faces = new ClothFace(); temp12_Faces.FileRead(stream, stream.Position); _Faces.Add(temp12_Faces); } stream.Position = offset + 32; Field6 = stream.ReadValueS32(); stream.Position = offset + 36; serStaples = new SerializeData(); serStaples.FileRead(stream, stream.Position); stream.Position = offset + 44; //still checking variablearrays Staples = new List<ClothStaple>(); for(int i = 0; i < (int)(serStaples.Field1 / 28); i++) { stream.Position = serStaples.Field0 + 16 + (28*i) ; ClothStaple temp12_Staples; temp12_Staples = new ClothStaple(); temp12_Staples.FileRead(stream, stream.Position); _Staples.Add(temp12_Staples); } stream.Position = offset + 48; Field9 = stream.ReadValueS32(); stream.Position = offset + 52; serDistanceConstraints = new SerializeData(); serDistanceConstraints.FileRead(stream, stream.Position); stream.Position = offset + 60; //still checking variablearrays DistanceConstraints = new List<ClothConstraint>(); for(int i = 0; i < (int)(serDistanceConstraints.Field1 / 24); i++) { stream.Position = serDistanceConstraints.Field0 + 16 + (24*i) ; ClothConstraint temp12_DistanceConstraints; temp12_DistanceConstraints = new ClothConstraint(); temp12_DistanceConstraints.FileRead(stream, stream.Position); _DistanceConstraints.Add(temp12_DistanceConstraints); } stream.Position = offset + 64; Field12 = stream.ReadValueS32(); stream.Position = offset + 68; serBendingConstraints = new SerializeData(); serBendingConstraints.FileRead(stream, stream.Position); stream.Position = offset + 76; //still checking variablearrays BendingConstraints = new List<ClothConstraint>(); for(int i = 0; i < (int)(serBendingConstraints.Field1 / 24); i++) { stream.Position = serBendingConstraints.Field0 + 16 + (24*i) ; ClothConstraint temp12_BendingConstraints; temp12_BendingConstraints = new ClothConstraint(); temp12_BendingConstraints.FileRead(stream, stream.Position); _BendingConstraints.Add(temp12_BendingConstraints); } stream.Position = offset + 80; Field15 = stream.ReadValueS32(); stream.Position = offset + 84; Field16 = stream.ReadValueF32(); }
public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); serVertices = new SerializeData(); serVertices.Parse(buffer); //still checking variablearrays this.Vertices = new List<ClothVertex>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Vertices.Count; loop12++) { _Vertices[loop12] = new ClothVertex(); _Vertices[loop12].Parse(buffer); } Field3 = buffer.ReadInt(32); serFaces = new SerializeData(); serFaces.Parse(buffer); //still checking variablearrays this.Faces = new List<ClothFace>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Faces.Count; loop12++) { _Faces[loop12] = new ClothFace(); _Faces[loop12].Parse(buffer); } Field6 = buffer.ReadInt(32); serStaples = new SerializeData(); serStaples.Parse(buffer); //still checking variablearrays this.Staples = new List<ClothStaple>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Staples.Count; loop12++) { _Staples[loop12] = new ClothStaple(); _Staples[loop12].Parse(buffer); } Field9 = buffer.ReadInt(32); serDistanceConstraints = new SerializeData(); serDistanceConstraints.Parse(buffer); //still checking variablearrays this.DistanceConstraints = new List<ClothConstraint>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _DistanceConstraints.Count; loop12++) { _DistanceConstraints[loop12] = new ClothConstraint(); _DistanceConstraints[loop12].Parse(buffer); } Field12 = buffer.ReadInt(32); serBendingConstraints = new SerializeData(); serBendingConstraints.Parse(buffer); //still checking variablearrays this.BendingConstraints = new List<ClothConstraint>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _BendingConstraints.Count; loop12++) { _BendingConstraints[loop12] = new ClothConstraint(); _BendingConstraints[loop12].Parse(buffer); } Field15 = buffer.ReadInt(32); Field16 = buffer.ReadFloat32(); }