Ejemplo n.º 1
0
        public uint Unknown_16Ch; // 0x00000000

        /// <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.KeyframeProps = reader.ReadBlock <ResourcePointerList64 <KeyframeProp> >();
            this.Unknown_20h   = reader.ReadUInt32();
            this.Unknown_24h   = reader.ReadUInt32();
            this.Unknown_28h   = reader.ReadUInt32();
            this.Unknown_2Ch   = reader.ReadUInt32();
            this.KeyframeProp0 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp1 = reader.ReadBlock <KeyframeProp>();
            this.Unknown_150h  = reader.ReadUInt32();
            this.Unknown_154h  = reader.ReadUInt32();
            this.Unknown_158h  = reader.ReadUInt32();
            this.Unknown_15Ch  = reader.ReadUInt32();
            this.Unknown_160h  = reader.ReadUInt32();
            this.Unknown_164h  = reader.ReadUInt32();
            this.Unknown_168h  = reader.ReadUInt32();
            this.Unknown_16Ch  = reader.ReadUInt32();
        }
Ejemplo n.º 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.KeyframeProps = reader.ReadBlock <ResourcePointerList64 <KeyframeProp> >();
            this.Unknown_20h   = reader.ReadUInt64();
            this.Unknown_28h   = reader.ReadUInt64();
            this.KeyframeProp0 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp1 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp2 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp3 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp4 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp5 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp6 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp7 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp8 = reader.ReadBlock <KeyframeProp>();
            this.Unknown_540h  = reader.ReadUInt32();
            this.Unknown_544h  = reader.ReadUInt32();
            this.Unknown_548h  = reader.ReadUInt32();
            this.Unknown_54Ch  = reader.ReadUInt32();
        }
        /// <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.ReadBlock <ResourcePointerList64 <Unknown_P_018> >();
            this.Unknown_20h  = reader.ReadUInt32();
            this.Unknown_24h  = reader.ReadUInt32();
            this.Unknown_28h  = reader.ReadUInt32();
            this.Unknown_2Ch  = reader.ReadUInt32();
            this.emb1         = reader.ReadBlock <Unknown_P_018>();
            this.emb2         = reader.ReadBlock <Unknown_P_018>();
            this.emb3         = reader.ReadBlock <Unknown_P_018>();
            this.emb4         = reader.ReadBlock <Unknown_P_018>();
            this.emb5         = reader.ReadBlock <Unknown_P_018>();
            this.emb6         = reader.ReadBlock <Unknown_P_018>();
            this.emb7         = reader.ReadBlock <Unknown_P_018>();
            this.Unknown_420h = reader.ReadUInt32();
            this.Unknown_424h = reader.ReadUInt32();
            this.Unknown_428h = reader.ReadUInt32();
            this.Unknown_42Ch = reader.ReadUInt32();
        }
Ejemplo 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.KeyframeProps = reader.ReadBlock <ResourcePointerList64 <KeyframeProp> >();
            this.Unknown_20h   = reader.ReadUInt64();
            this.Unknown_28h   = reader.ReadUInt64();
            this.KeyframeProp0 = reader.ReadBlock <KeyframeProp>();
            this.Unknown_C0h   = reader.ReadUInt32();
            this.Unknown_C4h   = reader.ReadUInt32();
            this.Unknown_C8h   = reader.ReadUInt32();
            this.Unknown_CCh   = reader.ReadUInt32();
            this.Unknown_D0h   = reader.ReadUInt32();
            this.Unknown_D4h   = 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();
        }
Ejemplo 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_10h = reader.ReadUInt16();
            this.Unknown_12h = reader.ReadUInt16();
            this.Unknown_14h = reader.ReadUInt16();
            this.Unknown_16h = reader.ReadUInt16();
            this.Unknown_18h = reader.ReadSingle();
            this.Unknown_1Ch = reader.ReadUInt32();
            this.Unknown_20h = reader.ReadUInt32();
            this.Unknown_24h = reader.ReadUInt32();
            this.Unknown_28h = reader.ReadUInt32();
            this.Unknown_2Ch = reader.ReadUInt32();
            this.Unknown_30h = reader.ReadUInt32();
            this.Unknown_34h = reader.ReadUInt32();
            this.Unknown_38h = reader.ReadUInt32();
            this.Unknown_3Ch = reader.ReadUInt32();
            this.Sequences   = reader.ReadBlock <ResourcePointerList64 <Sequence> >();
            this.Unknown_50h = reader.ReadBlock <ResourceSimpleList64 <Animation_Unknown> >();
        }
Ejemplo n.º 6
0
        public uint Unknown_27Ch; // 0x00000000

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.VFT           = reader.ReadUInt32();
            this.Unknown_4h    = reader.ReadUInt32();
            this.Unknown_8h    = reader.ReadUInt32();
            this.Unknown_Ch    = reader.ReadByte();
            this.Unknown_Dh    = reader.ReadByte();
            this.Unknown_Eh    = reader.ReadUInt16();
            this.Unknown_10h   = reader.ReadUInt32();
            this.Unknown_14h   = reader.ReadUInt32();
            this.KeyframeProp0 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp1 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp2 = reader.ReadBlock <KeyframeProp>();
            this.KeyframeProp3 = reader.ReadBlock <KeyframeProp>();
            this.Unknown_258h  = reader.ReadUInt32();
            this.Unknown_25Ch  = reader.ReadUInt32();
            this.KeyframeProps = reader.ReadBlock <ResourcePointerList64 <KeyframeProp> >();
            this.Unknown_270h  = reader.ReadUInt32();
            this.Unknown_274h  = reader.ReadUInt32();
            this.Unknown_278h  = reader.ReadUInt32();
            this.Unknown_27Ch  = reader.ReadUInt32();
        }
        public uint Unknown_ECh; // 0x00000000

        /// <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.ReadBlock <ResourcePointerList64 <Unknown_P_018> >();
            this.Unknown_20h = reader.ReadUInt32();
            this.Unknown_24h = reader.ReadUInt32();
            this.Unknown_28h = reader.ReadUInt32();
            this.Unknown_2Ch = reader.ReadUInt32();
            this.emb1        = reader.ReadBlock <Unknown_P_018>();
            this.Unknown_C0h = reader.ReadUInt32();
            this.Unknown_C4h = reader.ReadUInt32();
            this.Unknown_C8h = reader.ReadUInt32();
            this.Unknown_CCh = reader.ReadUInt32();
            this.Unknown_D0h = reader.ReadUInt32();
            this.Unknown_D4h = 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();
        }
Ejemplo n.º 8
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
                );
        }
Ejemplo n.º 9
0
        private void AddSelectionDrawableModelsTreeNodes(ResourcePointerList64 <DrawableModel> models, string prefix, bool check)
        {
            if (models == null)
            {
                return;
            }
            if (models.data_items == null)
            {
                return;
            }

            for (int mi = 0; mi < models.data_items.Length; mi++)
            {
                var    model   = models.data_items[mi];
                string mprefix = prefix + " " + (mi + 1).ToString();
                var    mnode   = SelDrawableModelsTreeView.Nodes.Add(mprefix + " " + model.ToString());
                mnode.Tag     = model;
                mnode.Checked = check;

                var tmnode = SelDrawableTexturesTreeView.Nodes.Add(mprefix + " " + model.ToString());
                tmnode.Tag = model;

                if ((model.Geometries == null) || (model.Geometries.data_items == null))
                {
                    continue;
                }

                foreach (var geom in model.Geometries.data_items)
                {
                    var gname = geom.ToString();
                    var gnode = mnode.Nodes.Add(gname);
                    gnode.Tag     = geom;
                    gnode.Checked = true;// check;

                    var tgnode = tmnode.Nodes.Add(gname);
                    tgnode.Tag = geom;

                    if ((geom.Shader != null) && (geom.Shader.ParametersList != null) && (geom.Shader.ParametersList.Hashes != null))
                    {
                        var pl = geom.Shader.ParametersList;
                        var h  = pl.Hashes;
                        var p  = pl.Parameters;
                        for (int ip = 0; ip < h.Length; ip++)
                        {
                            var hash = pl.Hashes[ip];
                            var parm = pl.Parameters[ip];
                            var tex  = parm.Data as TextureBase;
                            if (tex != null)
                            {
                                var t    = tex as Texture;
                                var tstr = tex.Name.Trim();
                                if (t != null)
                                {
                                    tstr = string.Format("{0} ({1}x{2}, embedded)", tex.Name, t.Width, t.Height);
                                }
                                var tnode = tgnode.Nodes.Add(hash.ToString().Trim() + ": " + tstr);
                                tnode.Tag = tex;
                            }
                        }
                        tgnode.Expand();
                    }
                }

                mnode.Expand();
                tmnode.Expand();
            }
        }
Ejemplo n.º 10
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
                );
        }
Ejemplo n.º 11
0
 public TextureDictionary()
 {
     this.TextureNameHashes = new ResourceSimpleList64 <uint_r>();
     this.Textures          = new ResourcePointerList64 <TextureDX11>();
 }
Ejemplo n.º 12
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.LodGroupHigh           = reader.ReadSingle();
            this.LodGroupMed            = reader.ReadSingle();
            this.LodGroupLow            = reader.ReadSingle();
            this.LodGroupVlow           = 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.ReadUInt16();
            this.Unknown_9Ah            = reader.ReadUInt16();
            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
                );
        }
Ejemplo n.º 13
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.ReadUInt32();
            this.Unknown_14h                = reader.ReadUInt32();
            this.Unknown_18h                = reader.ReadUInt64();
            this.emb1                       = reader.ReadBlock <EffectSpawner>();
            this.emb2                       = reader.ReadBlock <EffectSpawner>();
            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.ReadSingle();
            this.Unknown_118h               = reader.ReadUInt32();
            this.Unknown_11Ch               = reader.ReadUInt32();
            this.NamePointer                = reader.ReadUInt64();
            this.Unknown_128h               = reader.ReadBlock <ResourcePointerList64 <Behaviour> >();
            this.Unknown_138h               = reader.ReadBlock <ResourcePointerList64 <Behaviour> >();
            this.Unknown_148h               = reader.ReadBlock <ResourcePointerList64 <Behaviour> >();
            this.Unknown_158h               = reader.ReadBlock <ResourcePointerList64 <Behaviour> >();
            this.Unknown_168h               = reader.ReadBlock <ResourcePointerList64 <Behaviour> >();
            this.Unknown_178h               = reader.ReadUInt64();
            this.Unknown_180h               = reader.ReadUInt64();
            this.Unknown_188h               = reader.ReadBlock <ResourceSimpleList64 <Unknown_P_013> >();
            this.Unknown_198h               = reader.ReadUInt64();
            this.Unknown_1A0h               = reader.ReadUInt64();
            this.Unknown_1A8h               = reader.ReadUInt64();
            this.VFTx3                      = reader.ReadUInt64();
            this.ShaderNamePointer          = reader.ReadUInt64();
            this.ShaderTechniqueNamePointer = reader.ReadUInt64();
            this.Unknown_1C8h               = reader.ReadUInt64();
            this.Unknown_1D0h               = reader.ReadUInt32();
            this.Unknown_1D4h               = reader.ReadUInt32();
            this.VFTx4                      = reader.ReadUInt64();
            this.Unknown_1E0h               = reader.ReadUInt32();
            this.Unknown_1E4h               = reader.ReadUInt32();
            this.Unknown_1E8h               = reader.ReadUInt32();
            this.Unknown_1ECh               = reader.ReadUInt32();
            this.ShaderVars                 = reader.ReadBlock <ResourcePointerList64 <ShaderVar> >();
            this.Unknown_200h               = reader.ReadUInt32();
            this.Unknown_204h               = reader.ReadUInt32();
            this.ShaderNameHash             = reader.ReadUInt32();
            this.Unknown_20Ch               = reader.ReadUInt32();
            this.Unknown_210h               = reader.ReadBlock <ResourceSimpleList64 <Unknown_P_012> >();
            this.Unknown_220h               = reader.ReadUInt32();
            this.Unknown_224h               = reader.ReadUInt32();
            this.Unknown_228h               = reader.ReadUInt64();
            this.Unknown_230h               = reader.ReadUInt64();
            this.Unknown_238h               = reader.ReadUInt64();

            // read reference data
            this.Name = reader.ReadBlockAt <string_r>(
                this.NamePointer // offset
                );
            this.ShaderName = reader.ReadBlockAt <string_r>(
                this.ShaderNamePointer // offset
                );
            this.ShaderTechniqueName = reader.ReadBlockAt <string_r>(
                this.ShaderTechniqueNamePointer // offset
                );
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.VFT          = reader.ReadUInt32();
            this.Unknown_4h   = reader.ReadUInt32();
            this.Unknown_8h   = 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.emb1         = reader.ReadBlock <Unknown_P_020>();
            this.emb2         = reader.ReadBlock <Unknown_P_020>();
            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 = reader.ReadUInt32();
            this.Unknown_11Ch = reader.ReadUInt32();
            this.NamePointer  = reader.ReadUInt64();
            this.Unknown_128h = reader.ReadBlock <ResourcePointerList64 <Behaviour_GTA5_pc> >();
            this.Unknown_138h = reader.ReadBlock <ResourcePointerList64 <Behaviour_GTA5_pc> >();
            this.Unknown_148h = reader.ReadBlock <ResourcePointerList64 <Behaviour_GTA5_pc> >();
            this.Unknown_158h = reader.ReadBlock <ResourcePointerList64 <Behaviour_GTA5_pc> >();
            this.Unknown_168h = reader.ReadBlock <ResourcePointerList64 <Behaviour_GTA5_pc> >();
            this.Unknown_178h = reader.ReadUInt32();
            this.Unknown_17Ch = reader.ReadUInt32();
            this.Unknown_180h = reader.ReadUInt32();
            this.Unknown_184h = reader.ReadUInt32();
            this.Unknown_188h = reader.ReadBlock <ResourceSimpleList64 <Unknown_P_032> >();
            this.Unknown_198h = reader.ReadUInt32();
            this.Unknown_19Ch = reader.ReadUInt32();
            this.Unknown_1A0h = reader.ReadUInt32();
            this.Unknown_1A4h = reader.ReadUInt32();
            this.Unknown_1A8h = reader.ReadUInt32();
            this.Unknown_1ACh = reader.ReadUInt32();
            this.VFTx3        = reader.ReadUInt32();
            this.Unknown_1B4h = reader.ReadUInt32();
            this.p9           = reader.ReadUInt64();
            this.p10          = reader.ReadUInt64();
            this.Unknown_1C8h = reader.ReadUInt32();
            this.Unknown_1CCh = reader.ReadUInt32();
            this.Unknown_1D0h = reader.ReadUInt32();
            this.Unknown_1D4h = reader.ReadUInt32();
            this.VFTx4        = reader.ReadUInt32();
            this.Unknown_1DCh = reader.ReadUInt32();
            this.Unknown_1E0h = reader.ReadUInt32();
            this.Unknown_1E4h = reader.ReadUInt32();
            this.Unknown_1E8h = reader.ReadUInt32();
            this.Unknown_1ECh = reader.ReadUInt32();
            this.Unknown_1F0h = reader.ReadBlock <ResourcePointerList64 <Unknown_P_007> >();
            this.Unknown_200h = reader.ReadUInt32();
            this.Unknown_204h = reader.ReadUInt32();
            this.Unknown_208h = reader.ReadUInt32();
            this.Unknown_20Ch = reader.ReadUInt32();
            this.Unknown_210h = reader.ReadBlock <ResourceSimpleList64 <Unknown_P_022> >();
            this.Unknown_220h = reader.ReadUInt32();
            this.Unknown_224h = reader.ReadUInt32();
            this.Unknown_228h = reader.ReadUInt32();
            this.Unknown_22Ch = reader.ReadUInt32();
            this.Unknown_230h = reader.ReadUInt32();
            this.Unknown_234h = reader.ReadUInt32();
            this.Unknown_238h = reader.ReadUInt32();
            this.Unknown_23Ch = reader.ReadUInt32();

            // read reference data
            this.Name = reader.ReadBlockAt <string_r>(
                this.NamePointer // offset
                );
            this.p9data = reader.ReadBlockAt <string_r>(
                this.p9 // offset
                );
            this.p10data = reader.ReadBlockAt <string_r>(
                this.p10 // offset
                );
        }
Ejemplo n.º 15
0
        static ModelData GenCol_GetModelData(ResourcePointerList64 <DrawableModel> models)
        {
            var   vertices   = new List <VertexVector3>();
            var   bbMin      = new Vector3(float.MaxValue);
            var   bbMax      = new Vector3(float.MinValue);
            var   bsCenter   = Vector3.Zero;
            float bsRadius   = 0.0f;
            var   geometries = new List <GeometryData>();

            for (int i = 0; i < models.Entries.Count; i++)
            {
                var entry = models.Entries[i];

                for (int j = 0; j < entry.Geometries.Count; j++)
                {
                    var geometry = entry.Geometries[j];

                    var   gVertices = new List <VertexVector3>();
                    var   gBbMin    = new Vector3(float.MaxValue);
                    var   gBbMax    = new Vector3(float.MinValue);
                    var   gBsCenter = Vector3.Zero;
                    float gBsRadius = 0.0f;

                    var vb = geometry.VertexData.VertexBytes;
                    var vs = geometry.VertexData.VertexStride;
                    var vc = geometry.VertexData.VertexCount;

                    for (int k = 0; k < vc; k++)
                    {
                        var position = MetaUtils.ConvertData <Vector3>(vb, k * vs);
                        var vertex   = new VertexVector3(k, position);

                        gBbMin = Vector3.Min(gBbMin, vertex.PositionVector);
                        gBbMax = Vector3.Max(gBbMax, vertex.PositionVector);

                        bbMin = Vector3.Min(bbMin, vertex.PositionVector);
                        bbMax = Vector3.Max(bbMax, vertex.PositionVector);

                        gVertices.Add(vertex);
                        vertices.Add(vertex);
                    }

                    if (gVertices.Count > 0)
                    {
                        gBsCenter = (gBbMin + gBbMax) * 0.5f;

                        foreach (var vertex in gVertices)
                        {
                            gBsRadius = Math.Max(gBsRadius, (vertex.PositionVector - gBsCenter).Length());
                        }
                    }

                    var gData = new GeometryData
                    {
                        Ref      = geometry,
                        BbMax    = gBbMax,
                        BbMin    = gBbMin,
                        BsCenter = gBsCenter,
                        BsRadius = gBsRadius,
                        Vertices = gVertices,
                        Indices  = geometry.IndexBuffer.Indices.Data.Select(e => e.Value).ToList()
                    };

                    geometries.Add(gData);
                }
            }

            if (vertices.Count > 0)
            {
                bsCenter = (bbMin + bbMax) * 0.5f;

                foreach (var vertex in vertices)
                {
                    bsRadius = Math.Max(bsRadius, (vertex.PositionVector - bsCenter).Length());
                }
            }

            return(new ModelData
            {
                BbMin = bbMin,
                BbMax = bbMax,
                BsCenter = bsCenter,
                BsRadius = bsRadius,
                Geometries = geometries,
                Vertices = vertices
            });
        }
Ejemplo n.º 16
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.Unknown_20h = reader.ReadBlock<RAGE_Vector4>();
            this.Unknown_30h = reader.ReadBlock<RAGE_Vector4>();
            this.Unknown_40h = reader.ReadBlock<RAGE_Vector4>();
            this.DrawableModels1Pointer = reader.ReadUInt64();
            this.DrawableModels2Pointer = reader.ReadUInt64();
            this.DrawableModels3Pointer = reader.ReadUInt64();
            this.DrawableModels4Pointer = reader.ReadUInt64();
            this.Unknown_70h = reader.ReadUInt32();
            this.Unknown_74h = reader.ReadUInt32();
            this.Unknown_78h = reader.ReadUInt32();
            this.Unknown_7Ch = reader.ReadUInt32();
            this.Unknown_80h = reader.ReadUInt32();
            this.Unknown_84h = reader.ReadUInt32();
            this.Unknown_88h = reader.ReadUInt32();
            this.Unknown_8Ch = reader.ReadUInt32();
            this.Unknown_90h_Pointer = 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.DrawableModels1 = reader.ReadBlockAt<ResourcePointerList64<DrawableModel_GTA5_pc>>(
                this.DrawableModels1Pointer // offset
            );
            this.DrawableModels2 = reader.ReadBlockAt<ResourcePointerList64<DrawableModel_GTA5_pc>>(
                this.DrawableModels2Pointer // offset
            );
            this.DrawableModels3 = reader.ReadBlockAt<ResourcePointerList64<DrawableModel_GTA5_pc>>(
                this.DrawableModels3Pointer // offset
            );
            this.DrawableModels4 = reader.ReadBlockAt<ResourcePointerList64<DrawableModel_GTA5_pc>>(
                this.DrawableModels4Pointer // offset
            );
            this.Unknown_90h_Data = reader.ReadBlockAt<Unknown_D_002>(
                this.Unknown_90h_Pointer // offset
            );
            this.DrawableModelsX = reader.ReadBlockAt<ResourcePointerList64<DrawableModel_GTA5_pc>>(
                this.DrawableModelsXPointer // offset
            );            
        }
Ejemplo n.º 17
0
        public Exporter(string name, ResourcePointerList64 <DrawableModel> models, GameFileCache Cache)
        {
            using (StreamWriter FBXwriter = new StreamWriter("FBX/" + name + ".fbx"))
            {
                var timestamp = DateTime.Now;
                int BaseId    = 10000;

                StringBuilder fbx = new StringBuilder();
                StringBuilder ob  = new StringBuilder(); //Objects builder
                StringBuilder cb  = new StringBuilder(); //Connections builder
                StringBuilder mb  = new StringBuilder(); //Materials builder to get texture count in advance
                StringBuilder cb2 = new StringBuilder(); //and keep connections ordered
                cb.Append("\n}\n");                      //Objects end
                cb.Append("\nConnections:  {");
                List <DrawableGeometry> Geoms    = new List <DrawableGeometry>();
                List <ShaderFX>         Shaders  = new List <ShaderFX>();
                List <Texture>          Textures = new List <Texture>();
                //Models
                for (int mi = 0; mi < models.data_items.Length; mi++)
                {
                    var model = models.data_items[mi];
                    //SubMesh & Materials
                    foreach (var geom in model.Geometries.data_items)
                    {
                        if ((geom.Shader != null) && (geom.Shader.ParametersList != null) && (geom.Shader.ParametersList.Hashes != null))
                        {
                            Geoms.Add(geom);
                            Shaders.Add(geom.Shader);
                            var gname = "Geom" + Geoms.Count;
                            //创建节点
                            ob.AppendFormat("\n\tModel: 1{0}, \"Model::{1}\", \"Mesh\" {{", BaseId + Geoms.Count, gname);
                            ob.Append("\n\t\tVersion: 232");
                            ob.Append("\n\t\tProperties70:  {");
                            ob.Append("\n\t\t\tP: \"InheritType\", \"enum\", \"\", \"\",1");
                            ob.Append("\n\t\t\tP: \"ScalingMax\", \"Vector3D\", \"Vector\", \"\",0,0,0");
                            ob.Append("\n\t\t\tP: \"DefaultAttributeIndex\", \"int\", \"Integer\", \"\",0");
                            ob.AppendFormat("\n\t\t\tP: \"Lcl Translation\", \"Lcl Translation\", \"\", \"A\",{0},{1},{2}", 0, 0, 0);
                            ob.AppendFormat("\n\t\t\tP: \"Lcl Rotation\", \"Lcl Rotation\", \"\", \"A\",{0},{1},{2}", 0, 0, 0);//handedness is switched in quat
                            ob.AppendFormat("\n\t\t\tP: \"Lcl Scaling\", \"Lcl Scaling\", \"\", \"A\",{0},{1},{2}", 1, 1, 1);
                            ob.Append("\n\t\t}");
                            ob.Append("\n\t\tShading: T");
                            ob.Append("\n\t\tCulling: \"CullingOff\"\n\t}");

                            //把节点挂在根节点上
                            cb.AppendFormat("\n\n\t;Model::{0}, Model::RootNode", gname);
                            cb.AppendFormat("\n\tC: \"OO\",1{0},0", BaseId + Geoms.Count);

                            //把几何体挂在节点上
                            cb2.AppendFormat("\n\n\t;Geometry::, Model::{0}", gname);
                            cb2.AppendFormat("\n\tC: \"OO\",3{0},1{1}", BaseId + Geoms.Count, BaseId + Geoms.Count);
                            //把材质挂在节点上
                            cb2.AppendFormat("\n\n\t;Material::, Model::{0}", gname);
                            cb2.AppendFormat("\n\tC: \"OO\",6{0},1{1}", BaseId + Shaders.Count, BaseId + Geoms.Count);

                            var pl = geom.Shader.ParametersList;
                            var h  = pl.Hashes;
                            var p  = pl.Parameters;
                            for (int ip = 0; ip < h.Length; ip++)
                            {
                                var hash = pl.Hashes[ip];
                                var parm = pl.Parameters[ip];
                                var tex  = parm.Data as TextureBase;
                                if (tex != null)
                                {
                                    var t = tex as Texture;
                                    if (t == null)
                                    {
                                        YtdFile file = Cache.TryGetTextureDictForTexture(tex.NameHash);
                                        if (file != null)
                                        {
                                            t = file.TextureDict.Lookup(tex.NameHash);
                                        }
                                    }
                                    var tstr = tex.Name.Trim();
                                    if (t != null)
                                    {
                                        Textures.Add(t);
                                        cb2.AppendFormat("\n\n\t;Texture::, Material::{0}", geom.Shader.Name);
                                        cb2.AppendFormat("\n\tC: \"OP\",7{0},6{1}, ", BaseId + Textures.Count, BaseId + Shaders.Count);
                                        switch (hash.ToString().Trim())
                                        {
                                        case "DiffuseSampler":
                                            cb2.Append("\"DiffuseColor\"");
                                            break;

                                        case "BumpSampler":
                                            cb2.Append("\"NormalMap\"");
                                            break;

                                        case "SpecSampler":
                                            cb2.Append("\"SpecularColor\"");
                                            break;

                                        case "DetailSampler":
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }



                fbx.Append("; FBX 7.1.0 project file");
                fbx.Append("\nFBXHeaderExtension:  {\n\tFBXHeaderVersion: 1003\n\tFBXVersion: 7100\n\tCreationTimeStamp:  {\n\t\tVersion: 1000");
                fbx.Append("\n\t\tYear: " + timestamp.Year);
                fbx.Append("\n\t\tMonth: " + timestamp.Month);
                fbx.Append("\n\t\tDay: " + timestamp.Day);
                fbx.Append("\n\t\tHour: " + timestamp.Hour);
                fbx.Append("\n\t\tMinute: " + timestamp.Minute);
                fbx.Append("\n\t\tSecond: " + timestamp.Second);
                fbx.Append("\n\t\tMillisecond: " + timestamp.Millisecond);
                fbx.Append("\n\t}\n\tCreator: \"Unity Studio by Chipicao\"\n}\n");

                fbx.Append("\nGlobalSettings:  {");
                fbx.Append("\n\tVersion: 1000");
                fbx.Append("\n\tProperties70:  {");
                fbx.Append("\n\t\tP: \"UpAxis\", \"int\", \"Integer\", \"\",1");
                fbx.Append("\n\t\tP: \"UpAxisSign\", \"int\", \"Integer\", \"\",1");
                fbx.Append("\n\t\tP: \"FrontAxis\", \"int\", \"Integer\", \"\",2");
                fbx.Append("\n\t\tP: \"FrontAxisSign\", \"int\", \"Integer\", \"\",1");
                fbx.Append("\n\t\tP: \"CoordAxis\", \"int\", \"Integer\", \"\",0");
                fbx.Append("\n\t\tP: \"CoordAxisSign\", \"int\", \"Integer\", \"\",1");
                fbx.Append("\n\t\tP: \"OriginalUpAxis\", \"int\", \"Integer\", \"\",1");
                fbx.Append("\n\t\tP: \"OriginalUpAxisSign\", \"int\", \"Integer\", \"\",1");
                fbx.AppendFormat("\n\t\tP: \"UnitScaleFactor\", \"double\", \"Number\", \"\",1");
                fbx.Append("\n\t\tP: \"OriginalUnitScaleFactor\", \"double\", \"Number\", \"\",1.0");
                fbx.Append("\n\t}\n}\n");

                fbx.Append("\nDocuments:  {");
                fbx.Append("\n\tCount: 1");
                fbx.Append("\n\tDocument: 1234567890, \"\", \"Scene\" {");
                fbx.Append("\n\t\tProperties70:  {");
                fbx.Append("\n\t\t\tP: \"SourceObject\", \"object\", \"\", \"\"");
                fbx.Append("\n\t\t\tP: \"ActiveAnimStackName\", \"KString\", \"\", \"\", \"\"");
                fbx.Append("\n\t\t}");
                fbx.Append("\n\t\tRootNode: 0");
                fbx.Append("\n\t}\n}\n");
                fbx.Append("\nReferences:  {\n}\n");

                fbx.Append("\nDefinitions:  {");
                fbx.Append("\n\tVersion: 100");
                //      fbx.AppendFormat("\n\tCount: {0}", 1 + 2 * GameObjects.Count + Materials.Count + 2 * Textures.Count + ((bool)Properties.Settings.Default["exportDeformers"] ? Skins.Count + DeformerCount + Skins.Count + 1 : 0));

                fbx.Append("\n\tObjectType: \"GlobalSettings\" {");
                fbx.Append("\n\t\tCount: 1");
                fbx.Append("\n\t}");

                fbx.Append("\n\tObjectType: \"Model\" {");
                fbx.AppendFormat("\n\t\tCount: {0}", 1);
                fbx.Append("\n\t}");

                fbx.Append("\n\tObjectType: \"Geometry\" {");
                fbx.AppendFormat("\n\t\tCount: {0}", Geoms.Count);
                fbx.Append("\n\t}");

                fbx.Append("\n\tObjectType: \"Material\" {");
                fbx.AppendFormat("\n\t\tCount: {0}", Shaders.Count);
                fbx.Append("\n\t}");

                fbx.Append("\n\tObjectType: \"Texture\" {");
                fbx.AppendFormat("\n\t\tCount: {0}", Textures.Count);
                fbx.Append("\n\t}");


                fbx.Append("\n}\n");
                fbx.Append("\nObjects:  {");

                FBXwriter.Write(fbx);
                fbx.Clear();



                for (int i = 0; i < Shaders.Count; i++)
                {
                    ShaderFX Shader = Shaders[i];
                    mb.AppendFormat("\n\tMaterial: 6{0}, \"Material::{1}\", \"\" {{", BaseId + i + 1, Shader.Name);
                    mb.Append("\n\t\tVersion: 102");
                    mb.Append("\n\t\tShadingModel: \"phong\"");
                    mb.Append("\n\t\tMultiLayer: 0");
                    mb.Append("\n\t\tProperties70:  {");
                    mb.Append("\n\t\t\tP: \"ShadingModel\", \"KString\", \"\", \"\", \"phong\"");

                    //mb.Append("\n\t\t\tP: \"SpecularFactor\", \"Number\", \"\", \"A\",0");
                    mb.Append("\n\t\t}");
                    mb.Append("\n\t}");
                }
                for (int i = 0; i < Geoms.Count; i++)
                {
                    MeshFBX(Geoms[i], BaseId + i + 1, ob);

                    //write data 8MB at a time
                    if (ob.Length > (8 * 0x100000))
                    {
                        FBXwriter.Write(ob); ob.Clear();
                    }
                }
                for (int i = 0; i < Textures.Count; i++)
                {
                    Texture t = Textures[i];
                    //TODO check texture type and set path accordingly; eg. CubeMap, Texture3D
                    string texFilename = Path.GetFullPath("FBX/" + t.Name + ".png");

                    byte[]           bytes   = DDSIO.GetPixels(t, 0);
                    FileStream       stream  = new FileStream(texFilename, FileMode.Create);
                    PngBitmapEncoder encoder = new PngBitmapEncoder();
                    encoder.Interlace = PngInterlaceOption.On;
                    encoder.Frames.Add(BitmapFrame.Create(BitmapSource.Create(t.Width, t.Height, 96, 96, PixelFormats.Bgra32, null, bytes, t.Width * 4)));
                    encoder.Save(stream);
                    stream.Close();


                    //  File.WriteAllBytes(texFilename, DDSIO.GetDDSFile(t));



                    ob.AppendFormat("\n\tTexture: 7{0}, \"Texture::{1}\", \"\" {{", BaseId + i + 1, t.Name);
                    ob.Append("\n\t\tType: \"TextureVideoClip\"");
                    ob.Append("\n\t\tVersion: 202");
                    ob.AppendFormat("\n\t\tTextureName: \"Texture::{0}\"", t.Name);
                    ob.Append("\n\t\tProperties70:  {");
                    ob.Append("\n\t\t\tP: \"UVSet\", \"KString\", \"\", \"\", \"UVChannel_0\"");
                    ob.Append("\n\t\t\tP: \"UseMaterial\", \"bool\", \"\", \"\",1");
                    ob.Append("\n\t\t}");
                    ob.AppendFormat("\n\t\tMedia: \"Video::{0}\"", t.Name);
                    ob.AppendFormat("\n\t\tFileName: \"{0}\"", texFilename);
                    ob.AppendFormat("\n\t\tRelativeFilename: \"{0}\"", texFilename);
                    ob.Append("\n\t}");
                }

                ob.Append(mb); mb.Clear();
                cb.Append(cb2); cb2.Clear();

                FBXwriter.Write(ob);
                ob.Clear();

                cb.Append("\n}");//Connections end
                FBXwriter.Write(cb);
                cb.Clear();
            }
        }
Ejemplo n.º 18
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.ReadUInt32();
            this.Unknown_14h         = reader.ReadUInt32();
            this.Unknown_18h         = reader.ReadUInt32();
            this.Unknown_1Ch         = reader.ReadUInt32();
            this.Unknown_20h         = reader.ReadUInt32();
            this.Unknown_24h         = reader.ReadUInt32();
            this.Unknown_28h         = reader.ReadUInt32();
            this.Unknown_2Ch         = reader.ReadUInt32();
            this.DrawablePointer     = reader.ReadUInt64();
            this.Unknown_28h_Pointer = reader.ReadUInt64();
            this.Unknown_30h_Pointer = reader.ReadUInt64();
            this.Count0                 = reader.ReadUInt32();
            this.Unknown_4Ch            = reader.ReadUInt32();
            this.Unknown_50h            = reader.ReadUInt32();
            this.Unknown_54h            = reader.ReadUInt32();
            this.NamePointer            = reader.ReadUInt64();
            this.Clothes                = reader.ReadBlock <ResourcePointerList64 <EnvironmentCloth> >();
            this.Unknown_70h            = reader.ReadUInt32();
            this.Unknown_74h            = reader.ReadUInt32();
            this.Unknown_78h            = reader.ReadUInt32();
            this.Unknown_7Ch            = reader.ReadUInt32();
            this.Unknown_80h            = reader.ReadUInt32();
            this.Unknown_84h            = reader.ReadUInt32();
            this.Unknown_88h            = reader.ReadUInt32();
            this.Unknown_8Ch            = reader.ReadUInt32();
            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_Pointer    = 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.Unknown_D0h            = reader.ReadUInt32();
            this.Unknown_D4h            = reader.ReadUInt32();
            this.Unknown_D8h            = reader.ReadByte();
            this.Count3                 = reader.ReadByte();
            this.Unknown_DAh            = reader.ReadUInt16();
            this.Unknown_DCh            = reader.ReadUInt32();
            this.Unknown_E0h_Pointer    = reader.ReadUInt64();
            this.Unknown_E8h            = reader.ReadUInt32();
            this.Unknown_ECh            = reader.ReadUInt32();
            this.PhysicsLODGroupPointer = 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.LightAttributes        = reader.ReadBlock <ResourceSimpleList64 <LightAttributes> >();
            this.Unknown_120h_Pointer   = reader.ReadUInt64();
            this.Unknown_128h           = reader.ReadUInt32();
            this.Unknown_12Ch           = reader.ReadUInt32();

            // read reference data
            this.Drawable = reader.ReadBlockAt <FragDrawable>(
                this.DrawablePointer // offset
                );
            this.Unknown_28h_Data = reader.ReadBlockAt <ResourcePointerArray64 <FragDrawable> >(
                this.Unknown_28h_Pointer, // offset
                this.Count0
                );
            this.Unknown_30h_Data = reader.ReadBlockAt <ResourcePointerArray64 <string_r> >(
                this.Unknown_30h_Pointer, // offset
                this.Count0
                );
            this.Name = reader.ReadBlockAt <string_r>(
                this.NamePointer // offset
                );
            this.Unknown_A8h_Data = reader.ReadBlockAt <Unknown_F_003>(
                this.Unknown_A8h_Pointer // offset
                );
            this.Unknown_E0h_Data = reader.ReadBlockAt <ResourcePointerArray64 <Unknown_F_004> >(
                this.Unknown_E0h_Pointer, // offset
                this.Count3
                );
            this.PhysicsLODGroup = reader.ReadBlockAt <FragPhysicsLODGroup>(
                this.PhysicsLODGroupPointer // offset
                );
            this.Unknown_F8h_Data = reader.ReadBlockAt <FragDrawable>(
                this.Unknown_F8h_Pointer // offset
                );
            this.Unknown_120h_Data = reader.ReadBlockAt <Unknown_F_002>(
                this.Unknown_120h_Pointer // offset
                );
        }
Ejemplo n.º 19
0
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     Models = reader.ReadBlock <ResourcePointerList64 <DrawableModel> >(reader, parameters);
 }