예제 #1
0
 internal MeshBlock(MeshBlock meshBlockToClone)
 {
     this.region        = meshBlockToClone.region;
     this.layer         = meshBlockToClone.layer;
     this.isReplacement = meshBlockToClone.isReplacement;
     this.ITGtable      = new TGI[meshBlockToClone.ITGtable.Length];
     for (int i = 0; i < ITGtable.Length; i++)
     {
         this.ITGtable[i] = new TGI(meshBlockToClone.ITGtable[i].Type, meshBlockToClone.ITGtable[i].Group, meshBlockToClone.ITGtable[i].Instance);
     }
 }
예제 #2
0
        public RegionMap(BinaryReader br)
        {
            br.BaseStream.Position = 0;
            contextVersion         = br.ReadUInt32();
            publicKeyCount         = br.ReadUInt32();
            externalKeyCount       = br.ReadUInt32();
            delayLoadKeyCount      = br.ReadUInt32();
            objectCount            = br.ReadUInt32();
            publicKey = new TGI[publicKeyCount];
            for (int i = 0; i < publicKeyCount; i++)
            {
                publicKey[i] = new TGI(br, TGI.TGIsequence.ITG);
            }
            externalKey = new TGI[externalKeyCount];
            for (int i = 0; i < externalKeyCount; i++)
            {
                externalKey[i] = new TGI(br, TGI.TGIsequence.ITG);
            }
            delayLoadKey = new TGI[delayLoadKeyCount];
            for (int i = 0; i < delayLoadKeyCount; i++)
            {
                delayLoadKey[i] = new TGI(br, TGI.TGIsequence.ITG);
            }
            objData = new ObjectData[objectCount];
            for (int i = 0; i < objectCount; i++)
            {
                objData[i] = new ObjectData(br);
            }
            version = br.ReadInt32();
            int numMeshBlocks = br.ReadInt32();

            meshBlocks = new MeshBlock[numMeshBlocks];
            for (int i = 0; i < numMeshBlocks; i++)
            {
                meshBlocks[i] = new MeshBlock(br);
            }
        }