예제 #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));
            }
        }