Exemple #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.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.Unknown_30h       = reader.ReadUInt32();
            this.Unknown_34h       = reader.ReadUInt32();
            this.Unknown_38h       = reader.ReadUInt32();
            this.Unknown_3Ch       = reader.ReadUInt32();
            this.Unknown_40h       = reader.ReadUInt32();
            this.Unknown_44h       = reader.ReadUInt32();
            this.Unknown_48h       = reader.ReadUInt32();
            this.Unknown_4Ch       = reader.ReadUInt32();
            this.Unknown_50h       = reader.ReadUInt32();
            this.Unknown_54h       = reader.ReadUInt32();
            this.Unknown_58h       = reader.ReadUInt32();
            this.Unknown_5Ch       = reader.ReadUInt32();
            this.Unknown_60h       = reader.ReadUInt32();
            this.Unknown_64h       = reader.ReadUInt32();
            this.Unknown_68h       = reader.ReadUInt32();
            this.Unknown_6Ch       = reader.ReadUInt32();
            this.p2                = reader.ReadUInt64();
            this.Unknown_78h       = reader.ReadUInt32();
            this.Unknown_7Ch       = reader.ReadUInt32();
            this.p3                = reader.ReadUInt64();
            this.p4                = 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.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.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.Unknown_F0h       = reader.ReadUInt32();
            this.Unknown_F4h       = reader.ReadUInt32();
            this.Unknown_F8h       = reader.ReadUInt32();
            this.Unknown_FCh       = reader.ReadUInt32();
            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.p5                = reader.ReadUInt64();
            this.SectorTreePointer = reader.ReadUInt64();
            this.p7                = reader.ReadUInt64();
            this.p8                = reader.ReadUInt64();
            this.Unknown_138h      = reader.ReadUInt32();
            this.Unknown_13Ch      = reader.ReadUInt32();
            this.Unknown_140h      = reader.ReadUInt32();
            this.Unknown_144h      = reader.ReadUInt32();
            this.Unknown_148h      = reader.ReadUInt32();
            this.c0                = reader.ReadUInt32();
            this.c1                = 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();

            // read reference data
            this.Vertices = reader.ReadBlockAt <VerticesData>(
                this.p2 // offset
                );
            this.Indices = reader.ReadBlockAt <IndicesData>(
                this.p3 // offset
                );
            this.AdjPolys = reader.ReadBlockAt <AdjPolysData>(
                this.p4 // offset
                );
            this.Polys = reader.ReadBlockAt <PolysData>(
                this.p5 // offset
                );
            this.SectorTree = reader.ReadBlockAt <Sector_GTA5_pc>(
                this.SectorTreePointer // offset
                );
            this.Portals = reader.ReadBlockAt <ResourceSimpleArray <Portal> >(
                this.p7, // offset
                this.c0
                );
            this.p8data = reader.ReadBlockAt <ResourceSimpleArray <ushort_r> >(
                this.p8, // offset
                this.c1
                );
        }
        /// <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.Unknown_30h = reader.ReadUInt32();
            this.Unknown_34h = reader.ReadUInt32();
            this.Unknown_38h = reader.ReadUInt32();
            this.Unknown_3Ch = reader.ReadUInt32();
            this.Unknown_40h = reader.ReadUInt32();
            this.Unknown_44h = reader.ReadUInt32();
            this.Unknown_48h = reader.ReadUInt32();
            this.Unknown_4Ch = reader.ReadUInt32();
            this.Unknown_50h = reader.ReadUInt32();
            this.Unknown_54h = reader.ReadUInt32();
            this.Unknown_58h = reader.ReadUInt32();
            this.Unknown_5Ch = reader.ReadUInt32();
            this.Unknown_60h = reader.ReadUInt32();
            this.Unknown_64h = reader.ReadUInt32();
            this.Unknown_68h = reader.ReadUInt32();
            this.Unknown_6Ch = reader.ReadUInt32();
            this.p2 = reader.ReadUInt64();
            this.Unknown_78h = reader.ReadUInt32();
            this.Unknown_7Ch = reader.ReadUInt32();
            this.p3 = reader.ReadUInt64();
            this.p4 = 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.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.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.Unknown_F0h = reader.ReadUInt32();
            this.Unknown_F4h = reader.ReadUInt32();
            this.Unknown_F8h = reader.ReadUInt32();
            this.Unknown_FCh = reader.ReadUInt32();
            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.p5 = reader.ReadUInt64();
            this.SectorTreePointer = reader.ReadUInt64();
            this.p7 = reader.ReadUInt64();
            this.p8 = reader.ReadUInt64();
            this.Unknown_138h = reader.ReadUInt32();
            this.Unknown_13Ch = reader.ReadUInt32();
            this.Unknown_140h = reader.ReadUInt32();
            this.Unknown_144h = reader.ReadUInt32();
            this.Unknown_148h = reader.ReadUInt32();
            this.c0 = reader.ReadUInt32();
            this.c1 = 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();

            // read reference data
            this.Vertices = reader.ReadBlockAt<VerticesData>(
                this.p2 // offset
            );
            this.Indices = reader.ReadBlockAt<IndicesData>(
                this.p3 // offset
            );
            this.AdjPolys = reader.ReadBlockAt<AdjPolysData>(
                this.p4 // offset
            );
            this.Polys = reader.ReadBlockAt<PolysData>(
                this.p5 // offset
            );
            this.SectorTree = reader.ReadBlockAt<Sector_GTA5_pc>(
                this.SectorTreePointer // offset
            );
            this.Portals = reader.ReadBlockAt<ResourceSimpleArray<Portal>>(
                this.p7, // offset
                this.c0
            );
            this.p8data = reader.ReadBlockAt<ResourceSimpleArray<ushort_r>>(
                this.p8, // offset
                this.c1
            );
        }