/// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            base.Read(reader, parameters);

            // read structure data
            this.Unknown_70h = reader.ReadUInt32();
            this.Unknown_74h = reader.ReadUInt32();
            this.Unknown_78h_Pointer = reader.ReadUInt64();
            this.Unknown_80h = reader.ReadUInt32();
            this.Count1 = reader.ReadUInt32();
            this.PolygonsPointer = reader.ReadUInt64();
            this.Unknown_90h = reader.ReadUInt32();
            this.Unknown_94h = reader.ReadUInt32();
            this.Unknown_98h = reader.ReadUInt32();
            this.Unknown_9Ch = reader.ReadUInt32();
            this.Unknown_A0h = reader.ReadUInt32();
            this.Unknown_A4h = reader.ReadUInt32();
            this.Unknown_A8h = reader.ReadUInt32();
            this.Unknown_ACh = reader.ReadUInt32();
            this.VerticesPointer = reader.ReadUInt64();
            this.Unknown_B8h_Pointer = reader.ReadUInt64();
            this.Unknown_C0h_Pointer = reader.ReadUInt64();
            this.Unknown_C8h_Pointer = reader.ReadUInt64();
            this.VerticesCount = reader.ReadUInt32();
            this.PolygonsCount = reader.ReadUInt32();
            this.Unknown_D8h = reader.ReadUInt32();
            this.Unknown_DCh = reader.ReadUInt32();
            this.Unknown_E0h = reader.ReadUInt32();
            this.Unknown_E4h = reader.ReadUInt32();
            this.Unknown_E8h = reader.ReadUInt32();
            this.Unknown_ECh = reader.ReadUInt32();
            this.MaterialsPointer = reader.ReadUInt64();
            this.Unknown_F8h_Pointer = reader.ReadUInt64();
            this.Unknown_100h = reader.ReadUInt32();
            this.Unknown_104h = reader.ReadUInt32();
            this.Unknown_108h = reader.ReadUInt32();
            this.Unknown_10Ch = reader.ReadUInt32();
            this.Unknown_110h = reader.ReadUInt32();
            this.Unknown_114h = reader.ReadUInt32();
            this.Unknown_118h_Pointer = reader.ReadUInt64();
            this.MaterialsCount = reader.ReadByte();
            this.Count2 = reader.ReadByte();
            this.Unknown_122h = reader.ReadUInt16();
            this.Unknown_124h = reader.ReadUInt32();
            this.Unknown_128h = reader.ReadUInt32();
            this.Unknown_12Ch = reader.ReadUInt32();

            // read reference data
            this.p1data = reader.ReadBlockAt<ResourceSimpleArray<BoundVertex_GTA5_pc>>(
                this.Unknown_78h_Pointer, // offset
                this.VerticesCount
            );
            this.Polygons = reader.ReadBlockAt<ResourceSimpleArray<BoundPolygon_GTA5_pc>>(
                this.PolygonsPointer, // offset
                this.PolygonsCount
            );
            this.Vertices = reader.ReadBlockAt<ResourceSimpleArray<BoundVertex_GTA5_pc>>(
                this.VerticesPointer, // offset
                this.VerticesCount
            );
            this.Unknown_B8h_Data = reader.ReadBlockAt<ResourceSimpleArray<uint_r>>(
                this.Unknown_B8h_Pointer, // offset
                this.VerticesCount
            );
            this.Unknown_C0h_Data = reader.ReadBlockAt<ResourceSimpleArray<uint_r>>(
                this.Unknown_C0h_Pointer, // offset
                8
            );
            this.Unknown_C8h_Data = reader.ReadBlockAt<ResourceSimpleArrayArray64<uint_r>>(
                this.Unknown_C8h_Pointer, // offset
                8,
                this.Unknown_C0h_Data
            );
            this.Materials = reader.ReadBlockAt<ResourceSimpleArray<ulong_r>>(
                this.MaterialsPointer, // offset
                this.MaterialsCount
            );
            this.Unknown_F8h_Data = reader.ReadBlockAt<ResourceSimpleArray<uint_r>>(
                this.Unknown_F8h_Pointer, // offset
                this.Count2
            );
            this.PolygonMaterials = reader.ReadBlockAt<ResourceSimpleArray<byte_r>>(
                this.Unknown_118h_Pointer, // offset
                this.PolygonsCount
            );
        }
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            base.Read(reader, parameters);

            // read structure data
            this.Unknown_70h         = reader.ReadUInt32();
            this.Unknown_74h         = reader.ReadUInt32();
            this.Unknown_78h_Pointer = reader.ReadUInt64();
            this.Unknown_80h         = reader.ReadUInt32();
            this.Count1               = reader.ReadUInt32();
            this.PolygonsPointer      = reader.ReadUInt64();
            this.Unknown_90h          = reader.ReadUInt32();
            this.Unknown_94h          = reader.ReadUInt32();
            this.Unknown_98h          = reader.ReadUInt32();
            this.Unknown_9Ch          = reader.ReadUInt32();
            this.Unknown_A0h          = reader.ReadUInt32();
            this.Unknown_A4h          = reader.ReadUInt32();
            this.Unknown_A8h          = reader.ReadUInt32();
            this.Unknown_ACh          = reader.ReadUInt32();
            this.VerticesPointer      = reader.ReadUInt64();
            this.Unknown_B8h_Pointer  = reader.ReadUInt64();
            this.Unknown_C0h_Pointer  = reader.ReadUInt64();
            this.Unknown_C8h_Pointer  = reader.ReadUInt64();
            this.VerticesCount        = reader.ReadUInt32();
            this.PolygonsCount        = reader.ReadUInt32();
            this.Unknown_D8h          = reader.ReadUInt32();
            this.Unknown_DCh          = reader.ReadUInt32();
            this.Unknown_E0h          = reader.ReadUInt32();
            this.Unknown_E4h          = reader.ReadUInt32();
            this.Unknown_E8h          = reader.ReadUInt32();
            this.Unknown_ECh          = reader.ReadUInt32();
            this.MaterialsPointer     = reader.ReadUInt64();
            this.Unknown_F8h_Pointer  = reader.ReadUInt64();
            this.Unknown_100h         = reader.ReadUInt32();
            this.Unknown_104h         = reader.ReadUInt32();
            this.Unknown_108h         = reader.ReadUInt32();
            this.Unknown_10Ch         = reader.ReadUInt32();
            this.Unknown_110h         = reader.ReadUInt32();
            this.Unknown_114h         = reader.ReadUInt32();
            this.Unknown_118h_Pointer = reader.ReadUInt64();
            this.MaterialsCount       = reader.ReadByte();
            this.Count2               = reader.ReadByte();
            this.Unknown_122h         = reader.ReadUInt16();
            this.Unknown_124h         = reader.ReadUInt32();
            this.Unknown_128h         = reader.ReadUInt32();
            this.Unknown_12Ch         = reader.ReadUInt32();

            // read reference data
            this.p1data = reader.ReadBlockAt <ResourceSimpleArray <BoundVertex_GTA5_pc> >(
                this.Unknown_78h_Pointer, // offset
                this.VerticesCount
                );
            this.Polygons = reader.ReadBlockAt <ResourceSimpleArray <BoundPolygon_GTA5_pc> >(
                this.PolygonsPointer, // offset
                this.PolygonsCount
                );
            this.Vertices = reader.ReadBlockAt <ResourceSimpleArray <BoundVertex_GTA5_pc> >(
                this.VerticesPointer, // offset
                this.VerticesCount
                );
            this.Unknown_B8h_Data = reader.ReadBlockAt <ResourceSimpleArray <uint_r> >(
                this.Unknown_B8h_Pointer, // offset
                this.VerticesCount
                );
            this.Unknown_C0h_Data = reader.ReadBlockAt <ResourceSimpleArray <uint_r> >(
                this.Unknown_C0h_Pointer, // offset
                8
                );
            this.Unknown_C8h_Data = reader.ReadBlockAt <ResourceSimpleArrayArray64 <uint_r> >(
                this.Unknown_C8h_Pointer, // offset
                8,
                this.Unknown_C0h_Data
                );
            this.Materials = reader.ReadBlockAt <ResourceSimpleArray <ulong_r> >(
                this.MaterialsPointer, // offset
                this.MaterialsCount
                );
            this.Unknown_F8h_Data = reader.ReadBlockAt <ResourceSimpleArray <uint_r> >(
                this.Unknown_F8h_Pointer, // offset
                this.Count2
                );
            this.PolygonMaterials = reader.ReadBlockAt <ResourceSimpleArray <byte_r> >(
                this.Unknown_118h_Pointer, // offset
                this.PolygonsCount
                );
        }
Esempio n. 3
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            base.Read(reader, parameters);

            // read structure data
            this.Unknown_70h = reader.ReadUInt32();
            this.Unknown_74h = reader.ReadUInt32();
            this.Unknown_78h_Pointer = reader.ReadUInt64();
            this.Unknown_80h = reader.ReadUInt32();
            this.VerticesCount1 = reader.ReadUInt32();
            this.PolygonsPointer = reader.ReadUInt64();
            this.Quantum = reader.ReadBlock<RAGE_Vector3>();
            this.Unknown_9Ch = reader.ReadUInt32();
            this.CenterGeometry = reader.ReadBlock<RAGE_Vector3>();
            this.Unknown_ACh = reader.ReadSingle();
            this.VerticesPointer = reader.ReadUInt64();
            this.Unknown_B8h_Pointer = reader.ReadUInt64();
            this.Unknown_C0h_Pointer = reader.ReadUInt64();
            this.Unknown_C8h_Pointer = reader.ReadUInt64();
            this.VerticesCount2 = reader.ReadUInt32();
            this.PolygonsCount = reader.ReadUInt32();
            this.Unknown_D8h = reader.ReadUInt32();
            this.Unknown_DCh = reader.ReadUInt32();
            this.Unknown_E0h = reader.ReadUInt32();
            this.Unknown_E4h = reader.ReadUInt32();
            this.Unknown_E8h = reader.ReadUInt32();
            this.Unknown_ECh = reader.ReadUInt32();
            this.MaterialsPointer = reader.ReadUInt64();
            this.MaterialColoursPointer = reader.ReadUInt64();
            this.Unknown_100h = reader.ReadUInt32();
            this.Unknown_104h = reader.ReadUInt32();
            this.Unknown_108h = reader.ReadUInt32();
            this.Unknown_10Ch = reader.ReadUInt32();
            this.Unknown_110h = reader.ReadUInt32();
            this.Unknown_114h = reader.ReadUInt32();
            this.PolygonMaterialIndicesPointer = reader.ReadUInt64();
            this.MaterialsCount = reader.ReadByte();
            this.MaterialColoursCount = reader.ReadByte();
            this.Unknown_122h = reader.ReadUInt16();
            this.Unknown_124h = reader.ReadUInt32();
            this.Unknown_128h = reader.ReadUInt32();
            this.Unknown_12Ch = reader.ReadUInt32();

            // read reference data
            this.Unknown_78h_Data = reader.ReadBlockAt<ResourceSimpleArray<BoundVertex>>(
                this.Unknown_78h_Pointer, // offset
                this.VerticesCount2
            );
            this.Polygons = reader.ReadBlockAt<ResourceSimpleArray<BoundPolygon>>(
                this.PolygonsPointer, // offset
                this.PolygonsCount
            );
            this.Vertices = reader.ReadBlockAt<ResourceSimpleArray<BoundVertex>>(
                this.VerticesPointer, // offset
                this.VerticesCount2
            );
            this.Unknown_B8h_Data = reader.ReadBlockAt<ResourceSimpleArray<uint_r>>(
                this.Unknown_B8h_Pointer, // offset
                this.VerticesCount2
            );
            this.Unknown_C0h_Data = reader.ReadBlockAt<ResourceSimpleArray<uint_r>>(
                this.Unknown_C0h_Pointer, // offset
                8
            );
            this.Unknown_C8h_Data = reader.ReadBlockAt<ResourceSimpleArrayArray64<uint_r>>(
                this.Unknown_C8h_Pointer, // offset
                8,
                this.Unknown_C0h_Data
            );
            this.Materials = reader.ReadBlockAt<ResourceSimpleArray<BoundMaterial>>(
                this.MaterialsPointer, // offset
                this.MaterialsCount
            );
            this.MaterialColours = reader.ReadBlockAt<ResourceSimpleArray<uint_r>>(
                this.MaterialColoursPointer, // offset
                this.MaterialColoursCount
            );
            this.PolygonMaterialIndices = reader.ReadBlockAt<ResourceSimpleArray<byte_r>>(
                this.PolygonMaterialIndicesPointer, // offset
                this.PolygonsCount
            );
        }