Пример #1
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            base.Read(reader, parameters);

            // read structure data
            this.ShaderGroupPointer           = reader.ReadUInt64();
            this.Unknown_18h                  = reader.ReadUInt64();
            this.BoundingCenter               = reader.ReadVector3();
            this.BoundingSphereRadius         = reader.ReadSingle();
            this.BoundingBoxMin               = reader.ReadVector4();
            this.BoundingBoxMax               = reader.ReadVector4();
            this.DrawableModelsHighPointer    = reader.ReadUInt64();
            this.DrawableModelsMediumPointer  = reader.ReadUInt64();
            this.DrawableModelsLowPointer     = reader.ReadUInt64();
            this.DrawableModelsVeryLowPointer = reader.ReadUInt64();
            this.LodDistanceHigh              = reader.ReadSingle();
            this.LodDistanceMedium            = reader.ReadSingle();
            this.LodDistanceLow               = reader.ReadSingle();
            this.LodDistanceVeryLow           = reader.ReadSingle();
            this.DrawBucketMaskHigh           = reader.ReadUInt32();
            this.DrawBucketMaskMedium         = reader.ReadUInt32();
            this.DrawBucketMaskLow            = reader.ReadUInt32();
            this.DrawBucketMaskVeryLow        = reader.ReadUInt32();
            this.Unknown_40h                  = reader.ReadUInt64();
            this.Unknown_48h                  = reader.ReadUInt64();
            this.Unknown_50h                  = reader.ReadUInt64();
            this.NamePointer                  = reader.ReadUInt64();
            this.Unknown_60h                  = reader.ReadUInt64();
            this.BoundPointer                 = reader.ReadUInt64();
            this.Unknown_70h_Pointer          = reader.ReadUInt64();
            this.Unknown_78h                  = reader.ReadUInt64();

            // read reference data
            this.ShaderGroup           = reader.ReadBlockAt <ShaderGroup>(this.ShaderGroupPointer);
            this.DrawableModelsHigh    = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(this.DrawableModelsHighPointer);
            this.DrawableModelsMedium  = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(this.DrawableModelsMediumPointer);
            this.DrawableModelsLow     = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(this.DrawableModelsLowPointer);
            this.DrawableModelsVeryLow = reader.ReadBlockAt <ResourcePointerList64 <DrawableModel> >(this.DrawableModelsVeryLowPointer);
            this.Name  = reader.ReadBlockAt <string_r>(NamePointer);
            this.Bound = reader.ReadBlockAt <Bound>(BoundPointer);
        }
Пример #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.Unknown_10h            = reader.ReadUInt64();
            this.Unknown_18h            = reader.ReadUInt64();
            this.BoundingSphereCenter   = reader.ReadVector3();
            this.BoundingSphereRadius   = reader.ReadSingle();
            this.PrimaryDrawablePointer = reader.ReadUInt64();
            this.DrawablesPointer       = reader.ReadUInt64();
            this.DrawablesNamesPointer  = reader.ReadUInt64();
            this.DrawablesCount         = reader.ReadUInt32();
            this.Unknown_4Ch            = reader.ReadUInt32();
            this.Unknown_50h            = reader.ReadUInt64();
            this.NamePointer            = reader.ReadUInt64();
            this.Clothes                       = reader.ReadBlock <ResourcePointerList64 <EnvironmentCloth> >();
            this.Unknown_70h                   = reader.ReadUInt64();
            this.Unknown_78h                   = reader.ReadUInt64();
            this.Unknown_80h                   = reader.ReadUInt64();
            this.Unknown_88h                   = reader.ReadUInt64();
            this.Unknown_90h                   = reader.ReadUInt64();
            this.Unknown_98h                   = reader.ReadUInt64();
            this.Unknown_A0h                   = reader.ReadUInt64();
            this.MatrixSetPointer              = reader.ReadUInt64();
            this.Unknown_B0h                   = reader.ReadUInt32();
            this.Unknown_B4h                   = reader.ReadUInt32();
            this.Unknown_B8h                   = reader.ReadUInt32();
            this.Unknown_BCh                   = reader.ReadUInt32();
            this.Unknown_C0h                   = reader.ReadUInt32();
            this.Unknown_C4h                   = reader.ReadUInt32();
            this.Unknown_C8h                   = reader.ReadUInt32();
            this.Unknown_CCh                   = reader.ReadUInt32();
            this.GravityMultiplier             = reader.ReadSingle();
            this.BuoyancyMultiplier            = reader.ReadSingle();
            this.Unknown_D8h                   = reader.ReadByte();
            this.GlassPaneModelInfosCount      = reader.ReadByte();
            this.Unknown_DAh                   = reader.ReadUInt16();
            this.Unknown_DCh                   = reader.ReadUInt32();
            this.GlassPaneModelInfosPointer    = reader.ReadUInt64();
            this.Unknown_E8h                   = reader.ReadUInt64();
            this.PhysicsLODGroupPointer        = reader.ReadUInt64();
            this.ClothDrawablePointer          = reader.ReadUInt64();
            this.Unknown_100h                  = reader.ReadUInt64();
            this.Unknown_108h                  = reader.ReadUInt64();
            this.LightAttributes               = reader.ReadBlock <ResourceSimpleList64 <LightAttributes> >();
            this.VehicleGlassWindowDataPointer = reader.ReadUInt64();
            this.Unknown_128h                  = reader.ReadUInt64();

            // read reference data
            this.PrimaryDrawable = reader.ReadBlockAt <FragDrawable>(
                this.PrimaryDrawablePointer // offset
                );
            this.Drawables = reader.ReadBlockAt <ResourcePointerArray64 <FragDrawable> >(
                this.DrawablesPointer, // offset
                this.DrawablesCount
                );
            this.DrawablesNames = reader.ReadBlockAt <ResourcePointerArray64 <string_r> >(
                this.DrawablesNamesPointer, // offset
                this.DrawablesCount
                );
            this.Name = reader.ReadBlockAt <string_r>(
                this.NamePointer // offset
                );
            this.MatrixSet = reader.ReadBlockAt <MatrixSet>(
                this.MatrixSetPointer // offset
                );
            this.GlassPaneModelInfos = reader.ReadBlockAt <ResourcePointerArray64 <GlassPaneModelInfo> >(
                this.GlassPaneModelInfosPointer, // offset
                this.GlassPaneModelInfosCount
                );
            this.PhysicsLODGroup = reader.ReadBlockAt <FragPhysicsLODGroup>(
                this.PhysicsLODGroupPointer // offset
                );
            this.ClothDrawable = reader.ReadBlockAt <FragDrawable>(
                this.ClothDrawablePointer // offset
                );
            this.VehicleGlassWindowData = reader.ReadBlockAt <VehicleGlassWindowData>(
                this.VehicleGlassWindowDataPointer // offset
                );
        }
Пример #3
0
 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     Value = reader.ReadVector3();
 }