Exemplo n.º 1
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.Type                  = reader.ReadByte();
            this.Unknown_11h           = reader.ReadByte();
            this.Unknown_12h           = reader.ReadUInt16();
            this.BoundingSphereRadius  = reader.ReadSingle();
            this.Unknown_18h           = reader.ReadUInt32();
            this.Unknown_1Ch           = reader.ReadUInt32();
            this.BoundingBoxMax        = reader.ReadBlock <RAGE_Vector3>();
            this.Margin                = reader.ReadSingle();
            this.BoundingBoxMin        = reader.ReadBlock <RAGE_Vector3>();
            this.Unknown_3Ch           = reader.ReadUInt32();
            this.BoundingBoxCenter     = reader.ReadBlock <RAGE_Vector3>();
            this.MaterialIndex         = reader.ReadByte();
            this.ProceduralId          = reader.ReadByte();
            this.RoomId_And_PedDensity = reader.ReadByte();
            this.Unknown_4Fh           = reader.ReadByte();
            this.CenterGravity         = reader.ReadBlock <RAGE_Vector3>();
            this.PolyFlags             = reader.ReadByte();
            this.MaterialColorIndex    = reader.ReadByte();
            this.Unknown_5Eh           = reader.ReadUInt16();
            this.Unknown_60h           = reader.ReadSingle();
            this.Unknown_64h           = reader.ReadSingle();
            this.Unknown_68h           = reader.ReadSingle();
            this.BoundingBoxVolume     = reader.ReadSingle();
        }
        /// <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.ShaderGroupPointer           = reader.ReadUInt64();
            this.SkeletonPointer              = reader.ReadUInt64();
            this.BoundingCenter               = reader.ReadBlock <RAGE_Vector3>();
            this.BoundingSphereRadius         = reader.ReadSingle();
            this.BoundingBoxMin               = reader.ReadBlock <RAGE_Vector4>();
            this.BoundingBoxMax               = reader.ReadBlock <RAGE_Vector4>();
            this.DrawableModelsHighPointer    = reader.ReadUInt64();
            this.DrawableModelsMediumPointer  = reader.ReadUInt64();
            this.DrawableModelsLowPointer     = reader.ReadUInt64();
            this.DrawableModelsVeryLowPointer = reader.ReadUInt64();
            this.Unknown_70h            = reader.ReadSingle();
            this.Unknown_74h            = reader.ReadSingle();
            this.Unknown_78h            = reader.ReadSingle();
            this.Unknown_7Ch            = reader.ReadSingle();
            this.Unknown_80h            = reader.ReadUInt32();
            this.Unknown_84h            = reader.ReadUInt32();
            this.Unknown_88h            = reader.ReadUInt32();
            this.Unknown_8Ch            = reader.ReadUInt32();
            this.JointsPointer          = reader.ReadUInt64();
            this.Unknown_98h            = reader.ReadUInt32();
            this.Unknown_9Ch            = reader.ReadUInt32();
            this.DrawableModelsXPointer = reader.ReadUInt64();

            // read reference data
            this.ShaderGroup = reader.ReadBlockAt <ShaderGroup_GTA5_pc>(
                this.ShaderGroupPointer // offset
                );
            this.Skeleton = reader.ReadBlockAt <Skeleton_GTA5_pc>(
                this.SkeletonPointer // offset
                );
            this.DrawableModelsHigh = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel_GTA5_pc> >(
                this.DrawableModelsHighPointer // offset
                );
            this.DrawableModelsMedium = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel_GTA5_pc> >(
                this.DrawableModelsMediumPointer // offset
                );
            this.DrawableModelsLow = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel_GTA5_pc> >(
                this.DrawableModelsLowPointer // offset
                );
            this.DrawableModelsVeryLow = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel_GTA5_pc> >(
                this.DrawableModelsVeryLowPointer // offset
                );
            this.Joints = reader.ReadBlockAt <Joints_GTA5_pc>(
                this.JointsPointer // offset
                );
            this.DrawableModelsX = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel_GTA5_pc> >(
                this.DrawableModelsXPointer // offset
                );
        }
Exemplo n.º 3
0
        public uint Unknown_3Ch; // 0x00000000

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.Unknown_0h  = reader.ReadUInt32();
            this.Unknown_4h  = reader.ReadUInt32();
            this.BoneId      = reader.ReadUInt32();
            this.Unknown_Ch  = reader.ReadUInt32();
            this.Unknown_10h = reader.ReadUInt32();
            this.Unknown_14h = reader.ReadUInt32();
            this.Unknown_18h = reader.ReadUInt32();
            this.Unknown_1Ch = reader.ReadUInt32();
            this.Min         = reader.ReadBlock <RAGE_Vector3>();
            this.Unknown_2Ch = reader.ReadUInt32();
            this.Max         = reader.ReadBlock <RAGE_Vector3>();
            this.Unknown_3Ch = reader.ReadUInt32();
        }
Exemplo n.º 4
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.Type                 = reader.ReadByte();
            this.Unknown_11h          = reader.ReadByte();
            this.Unknown_12h          = reader.ReadUInt16();
            this.BoundingSphereRadius = reader.ReadSingle();
            this.Unknown_18h          = reader.ReadUInt32();
            this.Unknown_1Ch          = reader.ReadUInt32();
            this.BoundingBoxMax       = reader.ReadBlock <RAGE_Vector3>();
            this.Unknown_2Ch          = reader.ReadSingle();
            this.BoundingBoxMin       = reader.ReadBlock <RAGE_Vector3>();
            this.Unknown_3Ch          = reader.ReadUInt32();
            this.BoundingBoxCenter    = reader.ReadBlock <RAGE_Vector3>();
            this.Unknown_4Ch          = reader.ReadUInt32();
            this.Center               = reader.ReadBlock <RAGE_Vector3>();
            this.Unknown_5Ch          = reader.ReadUInt32();
            this.Unknown_60h          = reader.ReadSingle();
            this.Unknown_64h          = reader.ReadSingle();
            this.Unknown_68h          = reader.ReadSingle();
            this.Unknown_6Ch          = reader.ReadUInt32();
        }
Exemplo n.º 5
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
            );
        }