Exemple #1
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            base.Read(reader, parameters);

            this.NodesPointer                = reader.ReadUInt64();
            this.NodesCount                  = reader.ReadUInt32();
            this.NodesCountVehicle           = reader.ReadUInt32();
            this.NodesCountPed               = reader.ReadUInt32();
            this.Unk24                       = reader.ReadUInt32();
            this.LinksPtr                    = reader.ReadUInt64();
            this.LinksCount                  = reader.ReadUInt32();
            this.Unk34                       = reader.ReadUInt32();
            this.JunctionsPtr                = reader.ReadUInt64();
            this.JunctionHeightmapBytesPtr   = reader.ReadUInt64();
            this.Unk48                       = reader.ReadUInt32();
            this.Unk4C                       = reader.ReadUInt32();
            this.JunctionRefsPtr             = reader.ReadUInt64();
            this.JunctionRefsCount0          = reader.ReadUInt16();
            this.JunctionRefsCount1          = reader.ReadUInt16();
            this.Unk5C                       = reader.ReadUInt32();
            this.JunctionsCount              = reader.ReadUInt32();
            this.JunctionHeightmapBytesCount = reader.ReadUInt32();
            this.Unk68                       = reader.ReadUInt32();
            this.Unk6C                       = reader.ReadUInt32();

            this.Nodes     = reader.ReadStructsAt <Node>(this.NodesPointer, this.NodesCount);
            this.Links     = reader.ReadStructsAt <NodeLink>(this.LinksPtr, this.LinksCount);
            this.Junctions = reader.ReadStructsAt <NodeJunction>(this.JunctionsPtr, this.JunctionsCount);
            this.JunctionHeightmapBytes = reader.ReadBytesAt(this.JunctionHeightmapBytesPtr, this.JunctionHeightmapBytesCount);
            this.JunctionRefs           = reader.ReadStructsAt <NodeJunctionRef>(this.JunctionRefsPtr, this.JunctionRefsCount1);
        }
Exemple #2
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            Pointer     = reader.ReadUInt64();
            Count       = reader.ReadUInt32();
            Unknown_0Ch = reader.ReadUInt32();

            Items = reader.ReadStructsAt <T>(Pointer, Count);
        }
Exemple #3
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            UnkOffset      = reader.ReadUInt32();
            Unused_04h     = reader.ReadUInt32();
            PolyIDsPointer = reader.ReadUInt64();
            UnkDataPointer = reader.ReadUInt64();
            PolyIDsCount   = reader.ReadUInt16();
            UnkDataCount   = reader.ReadUInt16();
            Unused_1Ch     = reader.ReadUInt32();

            PolyIDs = reader.ReadUshortsAt(PolyIDsPointer, PolyIDsCount);
            UnkData = reader.ReadStructsAt <NavMeshSectorDataUnk>(UnkDataPointer, UnkDataCount);
        }
Exemple #4
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            PointsStartID  = reader.ReadUInt32();
            Unused_04h     = reader.ReadUInt32();
            PolyIDsPointer = reader.ReadUInt64();
            PointsPointer  = reader.ReadUInt64();
            PolyIDsCount   = reader.ReadUInt16();
            PointsCount    = reader.ReadUInt16();
            Unused_1Ch     = reader.ReadUInt32();

            PolyIDs = reader.ReadUshortsAt(PolyIDsPointer, PolyIDsCount);
            Points  = reader.ReadStructsAt <NavMeshPoint>(PointsPointer, PointsCount);
        }
Exemple #5
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.StructureNameHash = (MetaName)reader.ReadInt32();
            this.StructureKey      = reader.ReadUInt32();
            this.Unknown_8h        = reader.ReadUInt32();
            this.Unknown_Ch        = reader.ReadUInt32();
            this.EntriesPointer    = reader.ReadInt64();
            this.StructureSize     = reader.ReadInt32();
            this.Unknown_1Ch       = reader.ReadInt16();
            this.EntriesCount      = reader.ReadInt16();

            // read reference data
            this.Entries = reader.ReadStructsAt <MetaStructureEntryInfo_s>((ulong)this.EntriesPointer, (uint)this.EntriesCount);
        }
Exemple #6
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.EnumNameHash   = (MetaName)reader.ReadInt32();
            this.EnumKey        = reader.ReadUInt32();
            this.EntriesPointer = reader.ReadInt64();
            this.EntriesCount   = reader.ReadInt32();
            this.Unknown_14h    = reader.ReadInt32();

            // read reference data
            //this.Entries = reader.ReadBlockAt<ResourceSimpleArray<MetaEnumEntryInfo>>(
            //    (ulong)this.EntriesPointer, // offset
            //    this.EntriesCount
            //);
            this.Entries = reader.ReadStructsAt <MetaEnumEntryInfo_s>((ulong)this.EntriesPointer, (uint)this.EntriesCount);
        }
Exemple #7
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            base.Read(reader, parameters);

            ContentFlags         = (NavMeshFlags)reader.ReadUInt32();
            VersionUnk1          = reader.ReadUInt32();
            Unused_018h          = reader.ReadUInt32();
            Unused_01Ch          = reader.ReadUInt32();
            Transform            = reader.ReadMatrix();
            AABBSize             = reader.ReadVector3();
            AABBUnk              = reader.ReadSingle();
            VerticesPointer      = reader.ReadUInt64();
            Unused_078h          = reader.ReadUInt32();
            Unused_07Ch          = reader.ReadUInt32();
            IndicesPointer       = reader.ReadUInt64();
            AdjPolysPointer      = reader.ReadUInt64();
            AdjPolysIndicesCount = reader.ReadUInt32();
            AdjAreaIDs           = reader.ReadStruct <NavMeshUintArray>();
            PolysPointer         = reader.ReadUInt64();
            SectorTreePointer    = reader.ReadUInt64();
            PortalsPointer       = reader.ReadUInt64();
            PortalLinksPointer   = reader.ReadUInt64();
            VerticesCount        = reader.ReadUInt32();
            PolysCount           = reader.ReadUInt32();
            AreaID           = reader.ReadUInt32();
            TotalBytes       = reader.ReadUInt32();
            SectorUnkCount   = reader.ReadUInt32();
            PortalsCount     = reader.ReadUInt32();
            PortalLinksCount = reader.ReadUInt32();
            Unused_154h      = reader.ReadUInt32();
            Unused_158h      = reader.ReadUInt32();
            Unused_15Ch      = reader.ReadUInt32();
            VersionUnk2      = reader.ReadUInt32();
            Unused_164h      = reader.ReadUInt32();
            Unused_168h      = reader.ReadUInt32();
            Unused_16Ch      = reader.ReadUInt32();



            Vertices    = reader.ReadBlockAt <NavMeshList <NavMeshVertex> >(VerticesPointer);
            Indices     = reader.ReadBlockAt <NavMeshList <ushort> >(IndicesPointer);
            AdjPolys    = reader.ReadBlockAt <NavMeshList <NavMeshAdjPoly> >(AdjPolysPointer);
            Polys       = reader.ReadBlockAt <NavMeshList <NavMeshPoly> >(PolysPointer);
            SectorTree  = reader.ReadBlockAt <NavMeshSector>(SectorTreePointer);
            Portals     = reader.ReadStructsAt <NavMeshPortal>(PortalsPointer, PortalsCount);
            PortalLinks = reader.ReadUshortsAt(PortalLinksPointer, PortalLinksCount);
        }
Exemple #8
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            base.Read(reader, parameters);

            ContentFlags       = (NavMeshFlags)reader.ReadUInt32();
            VersionUnk1        = reader.ReadUInt32();
            Unused_018h        = reader.ReadUInt32();
            Unused_01Ch        = reader.ReadUInt32();
            Transform          = reader.ReadMatrix();
            AABBSize           = reader.ReadVector3();
            AABBUnk            = reader.ReadUInt32();
            VerticesPointer    = reader.ReadUInt64();
            Unused_078h        = reader.ReadUInt32();
            Unused_07Ch        = reader.ReadUInt32();
            IndicesPointer     = reader.ReadUInt64();
            EdgesPointer       = reader.ReadUInt64();
            EdgesIndicesCount  = reader.ReadUInt32();
            AdjAreaIDs         = reader.ReadStruct <NavMeshUintArray>();
            PolysPointer       = reader.ReadUInt64();
            SectorTreePointer  = reader.ReadUInt64();
            PortalsPointer     = reader.ReadUInt64();
            PortalLinksPointer = reader.ReadUInt64();
            VerticesCount      = reader.ReadUInt32();
            PolysCount         = reader.ReadUInt32();
            AreaID             = reader.ReadUInt32();
            TotalBytes         = reader.ReadUInt32();
            PointsCount        = reader.ReadUInt32();
            PortalsCount       = reader.ReadUInt32();
            PortalLinksCount   = reader.ReadUInt32();
            Unused_154h        = reader.ReadUInt32();
            Unused_158h        = reader.ReadUInt32();
            Unused_15Ch        = reader.ReadUInt32();
            VersionUnk2        = reader.ReadUInt32();
            Unused_164h        = reader.ReadUInt32();
            Unused_168h        = reader.ReadUInt32();
            Unused_16Ch        = reader.ReadUInt32();



            Vertices    = reader.ReadBlockAt <NavMeshList <NavMeshVertex> >(VerticesPointer);
            Indices     = reader.ReadBlockAt <NavMeshList <ushort> >(IndicesPointer);
            Edges       = reader.ReadBlockAt <NavMeshList <NavMeshEdge> >(EdgesPointer);
            Polys       = reader.ReadBlockAt <NavMeshList <NavMeshPoly> >(PolysPointer);
            SectorTree  = reader.ReadBlockAt <NavMeshSector>(SectorTreePointer);
            Portals     = reader.ReadStructsAt <NavMeshPortal>(PortalsPointer, PortalsCount);
            PortalLinks = reader.ReadUshortsAt(PortalLinksPointer, PortalLinksCount);



            ////testing!
            //if (VersionUnk1 != 0x00010011)
            //{ }
            //if (Unused_018h != 0)
            //{ }
            //if (Unused_01Ch != 0)
            //{ }
            //if (AABBUnk != 0x7F800001)
            //{ }
            //if (Unused_078h != 0)
            //{ }
            //if (Unused_07Ch != 0)
            //{ }
            //if (Unused_154h != 0)
            //{ }
            //if (Unused_158h != 0)
            //{ }
            //if (Unused_15Ch != 0)
            //{ }
            //if (Unused_164h != 0)
            //{ }
            //if (Unused_168h != 0)
            //{ }
            //if (Unused_16Ch != 0)
            //{ }
            //switch (VersionUnk2.Hash)
            //{
            //    case 0: //vehicle
            //        break;
            //    case 0x85CB3561: //grid
            //        break;
            //    default:
            //        break;
            //}
            //UpdateCounts();
        }