Inheritance: BananaMpq.Layer.Chunks.Chunk
Beispiel #1
0
        private unsafe Chunk CreateChunks(ChunkHeader *header)
        {
            switch (header->Magic)
            {
            case "MCVT":
                var mcvt = new McvtChunk(header);
                HeightMap          = mcvt.HeightMap;
                _bounds.Maximum.Z += HeightMap.Cast <float>().Max();
                return(mcvt);

            case "MCRD":
                var mcrd = new OffsetChunk(header);
                DoodadReferences = mcrd.Offsets;
                return(mcrd);

            case "MCRW":
                var mcrw = new OffsetChunk(header);
                WmoReferences = mcrw.Offsets;
                return(mcrw);

            default:
                return(new Chunk(header));
            }
        }
Beispiel #2
0
 private unsafe Chunk CreateChunks(ChunkHeader* header)
 {
     switch (header->Magic)
     {
         case "MCVT":
             var mcvt = new McvtChunk(header);
             HeightMap = mcvt.HeightMap;
             _bounds.Maximum.Z += HeightMap.Cast<float>().Max();
             return mcvt;
         case "MCRD":
             var mcrd = new OffsetChunk(header);
             DoodadReferences = mcrd.Offsets;
             return mcrd;
         case "MCRW":
             var mcrw = new OffsetChunk(header);
             WmoReferences = mcrw.Offsets;
             return mcrw;
         default:
             return new Chunk(header);
     }
 }