コード例 #1
0
        /// <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.ReadSingle();
            this.Unknown_4h      = reader.ReadSingle();
            this.Unknown_8h      = reader.ReadSingle();
            this.Unknown_Ch      = reader.ReadSingle();
            this.Unknown_10h     = reader.ReadSingle();
            this.Unknown_14h     = reader.ReadSingle();
            this.Unknown_18h     = reader.ReadSingle();
            this.Unknown_1Ch     = reader.ReadSingle();
            this.Unknown_20h     = reader.ReadUInt32();
            this.Unknown_24h     = reader.ReadUInt32();
            this.Unknown_28h     = reader.ReadUInt32();
            this.DataPointer     = reader.ReadUInt64();
            this.SubTree1Pointer = reader.ReadUInt64();
            this.SubTree2Pointer = reader.ReadUInt64();
            this.SubTree3Pointer = reader.ReadUInt64();
            this.SubTree4Pointer = reader.ReadUInt64();
            this.Unknown_54h     = reader.ReadUInt32();
            this.Unknown_58h     = reader.ReadUInt32();
            this.Unknown_5Ch     = reader.ReadUInt32();

            // read reference data
            this.Data = reader.ReadBlockAt <SectorData_GTA5_pc>(
                this.DataPointer // offset
                );
            this.SubTree1 = reader.ReadBlockAt <Sector_GTA5_pc>(
                this.SubTree1Pointer // offset
                );
            this.SubTree2 = reader.ReadBlockAt <Sector_GTA5_pc>(
                this.SubTree2Pointer // offset
                );
            this.SubTree3 = reader.ReadBlockAt <Sector_GTA5_pc>(
                this.SubTree3Pointer // offset
                );
            this.SubTree4 = reader.ReadBlockAt <Sector_GTA5_pc>(
                this.SubTree4Pointer // offset
                );
        }
コード例 #2
0
ファイル: Sector_GTA5_pc.cs プロジェクト: isti37/gta-toolkit
        /// <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.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.Unknown_20h = reader.ReadUInt32();
            this.Unknown_24h = reader.ReadUInt32();
            this.Unknown_28h = reader.ReadUInt32();
            this.p0 = reader.ReadUInt64();
            this.p1 = reader.ReadUInt64();
            this.p2 = reader.ReadUInt64();
            this.p3 = reader.ReadUInt64();
            this.p4 = reader.ReadUInt64();
            this.Unknown_54h = reader.ReadUInt32();
            this.Unknown_58h = reader.ReadUInt32();
            this.Unknown_5Ch = reader.ReadUInt32();

            // read reference data
            this.Data = reader.ReadBlockAt<SectorData_GTA5_pc>(
                this.p0 // offset
            );
            this.SubTree1 = reader.ReadBlockAt<Sector_GTA5_pc>(
                this.p1 // offset
            );
            this.SubTree2 = reader.ReadBlockAt<Sector_GTA5_pc>(
                this.p2 // offset
            );
            this.SubTree3 = reader.ReadBlockAt<Sector_GTA5_pc>(
                this.p3 // offset
            );
            this.SubTree4 = reader.ReadBlockAt<Sector_GTA5_pc>(
                this.p4 // offset
            );
        }