public static ShapeMotion ReadShapeMotion(BinaryReader reader) { ShapeMotion shapeMotion = new ShapeMotion(); reader.ReadInt32(); shapeMotion.Header = reader.ReadInt32(); int num = reader.ReadInt32(); for (int index = 0; index < num; ++index) { shapeMotion.Transforms.Add(new Matrix(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle())); } return(shapeMotion); }
public static Shape ReadShape(BinaryReader reader) { Shape shape = new Shape(); shape.Header = reader.ReadInt32(); shape.Name = Encoding.ASCII.GetString(reader.ReadBytes(reader.ReadInt32())); int num = reader.ReadInt32(); for (int index = 0; index < num; ++index) { shape.Lines.Add(Line.ReadLine(reader)); } shape.TextureName = Encoding.ASCII.GetString(reader.ReadBytes(reader.ReadInt32())); shape.Unknown = reader.ReadInt32(); shape.Motion = ShapeMotion.ReadShapeMotion(reader); return(shape); }