Class MapChunkVanillaToTbc
One terrain chunk (MCNK) of a map tile, fully decoded: the chunk header, the 9x9+8x8 height and normal grids, the texture layers with their decoded 64x64 alpha maps, the shadow map, doodad/object references, sound emitters and (version dependent) vertex colors, baked lighting and legacy liquid. A tile has 256 of these. wowlib decodes alpha/shadow maps to a plain 64x64 edit surface and re-encodes on write; the round-trip is semantic, not byte-identical. See https://wowdev.wiki/ADT/v18#MCNK_chunk.
public class MapChunkVanillaToTbc : MapChunk, IDisposable
- Inheritance
-
MapChunkVanillaToTbc
- Implements
- Inherited Members
Constructors
MapChunkVanillaToTbc()
public MapChunkVanillaToTbc()
MapChunkVanillaToTbc(MapChunkVanillaToTbc)
Copy-construct: a deep copy of other (the C++ copy constructor).
public MapChunkVanillaToTbc(MapChunkVanillaToTbc other)
Parameters
otherMapChunkVanillaToTbc
Properties
AlphaMaps
One decoded 64x64 (4096-byte) alpha map per layer, aligned with layers (layer 0's is empty); 0 = base texture, 255 = this layer.
public Vector<Vector<byte>> AlphaMaps { get; }
Property Value
DoodadRefs
Doodad references (MCRF doodad part pre-Cata, MCRD Cata+): indices into the tile's MDDF placements drawn in this chunk.
public Vector<uint> DoodadRefs { get; }
Property Value
Header
The chunk header (flags, grid position, area, holes, origin).
public SMChunk Header { get; set; }
Property Value
Heights
The 9x9 + 8x8 = 145 terrain heights (MCVT), relative to the chunk origin, in the interleaved outer/inner row order.
public Vector<float> Heights { get; }
Property Value
Layers
The texture layers (MCLY); layer 0 is opaque, later layers blend through their alpha map.
public Vector<SMLayer> Layers { get; }
Property Value
LegacyLiquid
The legacy per-chunk liquid (MCLQ, up to and including WotLK).
public MclqData LegacyLiquid { get; set; }
Property Value
Normals
The 145 terrain normals (MCNR), X Z Y signed bytes.
public Vector<McnrEntry> Normals { get; }
Property Value
ObjectRefs
Object references (MCRF object part pre-Cata, MCRW Cata+): indices into the tile's MODF placements drawn in this chunk.
public Vector<uint> ObjectRefs { get; }
Property Value
ShadowMap
The decoded 64x64 (4096-byte) shadow map (MCSH), 0/1 per texel; empty when the chunk casts no baked shadow.
public Vector<byte> ShadowMap { get; }
Property Value
SoundEmitters
Sound emitters placed in this chunk (MCSE): pre-WotLK versions carry the full 52-byte inline emitter (CWSoundEmitterVanilla), WotLK+ the 28-byte SoundEntriesAdvanced reference (CWSoundEmitter).
public Vector<CwSoundEmitterVanilla> SoundEmitters { get; }
Property Value
Methods
Dispose()
Release the native object now. Optional: the finalizer releases it on
collection anyway - dispose (or using) when you want native memory back
promptly.
public override void Dispose()