示例#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.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>(
                this.ShaderGroupPointer // offset
                );
            this.Skeleton = reader.ReadBlockAt <SkeletonData>(
                this.SkeletonPointer // offset
                );
            this.DrawableModelsHigh = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(
                this.DrawableModelsHighPointer // offset
                );
            this.DrawableModelsMedium = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(
                this.DrawableModelsMediumPointer // offset
                );
            this.DrawableModelsLow = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(
                this.DrawableModelsLowPointer // offset
                );
            this.DrawableModelsVeryLow = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(
                this.DrawableModelsVeryLowPointer // offset
                );
            this.Joints = reader.ReadBlockAt <Joints>(
                this.JointsPointer // offset
                );
            this.DrawableModelsX = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(
                this.DrawableModelsXPointer // offset
                );
        }
示例#2
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.SkeletonPointer = reader.ReadUInt64();
            this.LodGroup        = reader.ReadBlock <LodGroup>();
            this.JointsPointer   = reader.ReadUInt64();
            this.Unknown_98h     = reader.ReadUInt16();
            this.Unknown_9Ah     = reader.ReadUInt16();
            this.Unknown_9Ch     = reader.ReadUInt32();
            this.PrimaryDrawableModelsPointer = reader.ReadUInt64();

            // read reference data
            this.Skeleton = reader.ReadBlockAt <SkeletonData>(
                this.SkeletonPointer // offset
                );
            this.Joints = reader.ReadBlockAt <Joints>(
                this.JointsPointer // offset
                );
            this.PrimaryDrawableModels = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(
                this.PrimaryDrawableModelsPointer // offset
                );
        }