Exemple #1
0
        public static MeshCollisionData Deserialize(FZReader reader)
        {
            var obj = new MeshCollisionData();

            obj.address         = (int)reader.BaseStream.Position;
            obj.unknown1        = reader.ReadBytes(20);
            obj.numTriangles    = reader.ReadInt32();
            obj.numQuads        = reader.ReadInt32();
            obj.trianglesOffset = reader.ReadInt32();
            obj.quadsOffset     = reader.ReadInt32();
            obj.triangles       = reader.ReadArrayAtOffset(obj.trianglesOffset, obj.numTriangles, Triangle.Deserialize);
            obj.quads           = reader.ReadArrayAtOffset(obj.quadsOffset, obj.numQuads, Quad.Deserialize);

            return(obj);
        }
Exemple #2
0
        public static MeshCollisionTable Deserialize(FZReader reader)
        {
            var table = new MeshCollisionTable();

            table.numEntries           = reader.ReadInt32();
            table.offset               = reader.ReadInt32();
            table.meshCollisionEntries = reader.ReadArrayAtOffset(table.offset, table.numEntries, MeshCollisionEntry.Deserialize);

            return(table);
        }
Exemple #3
0
        public static UnknownTable2 Deserialize(FZReader reader)
        {
            var table = new UnknownTable2();

            table.numEntries     = reader.ReadInt32();
            table.offset         = reader.ReadInt32();
            table.unknownEntries = reader.ReadArrayAtOffset(table.offset, table.numEntries, UnknownEntry2.Deserialize);

            return(table);
        }
Exemple #4
0
        public static CheckpointTable Deserialize(FZReader reader)
        {
            var table = new CheckpointTable();

            table.numEntries        = reader.ReadInt32();
            table.offset            = reader.ReadInt32();
            table.checkpointEntries = reader.ReadArrayAtOffset(table.offset, table.numEntries, CheckpointEntry.Deserialize);

            return(table);
        }