Table of Contents

Namespace WoWLib.Formats.ADT.Chunks

Classes

CwSoundEmitter

A terrain sound emitter (MCSE, 28 bytes): a SoundEntriesAdvanced foreign key and a position/size pair placing an ambient sound in the cell.

CwSoundEmitterVanilla

A pre-WotLK terrain sound emitter (MCSE, 52 bytes): a SoundEntries foreign key plus the inline distance/time/loop parameters that later moved into SoundEntriesAdvanced.

MHDRData

The tile header (MHDR, 64 bytes): flags plus offsets to the tile's other chunks. wowlib derives every offset from the written layout, so only the flags and the Cata+ inline MAMP alpha-downscale value are exposed. See https://wowdev.wiki/ADT/v18#MHDR_chunk.

McnrEntry

A terrain vertex normal (MCNR entry, 3 signed bytes): the X, Z, Y components, 127 == 1.0. One per MCVT height vertex (9x9 + 8x8 = 145).

MfboPlanes

The flying bounds (MFBO, BC+): a maximum and a minimum plane, each a 3x3 grid of int16 heights, limiting where a player may fly on this tile.

SMChunk

A terrain cell header (MCNK, 128 bytes): the flags, its (x, y) position in the 16x16 cell grid, the area id, the terrain hole mask and the origin. The sub-chunk offset/size/count fields are binary bookkeeping wowlib derives on write, so they are not exposed. See https://wowdev.wiki/ADT/v18#MCNK_chunk.

SMLayer

A terrain texture layer (MCLY, 16 bytes): which tileset texture, the blend/animation flags and the ground-effect link. Layers after the first blend through an alpha map (see MapChunk.alphaMaps). The MCAL offset is derived on write and not exposed.

SMTerrainMaterial

Per-layer terrain material ids (MCMT, Cata+): four TerrainMaterial foreign keys, one per MCLY layer.

SMTextureColorGrading

Color-grading info for a tileset texture (MTCG, Shadowlands+): a start distance pair and the color-grading LUT / ramp FileDataIDs applied to the diffuse texture at the same index.

SMTextureFlags
SMTextureParams

Height-blend parameters for a tileset texture (MTXP, MoP+): the same flags as MTXF plus the _h texture's height scale and offset. Scale 0.0 / offset 1.0 means no _h texture is loaded.

SlVert

A legacy liquid vertex (MCLQ, 8 bytes). The first four bytes are flow / depth data for water and ocean or two u16 texture coordinates for magma / slime — the cell's liquid-type flags choose the reading (use as_magma()). The trailing float is the surface height in all readings.

SmDoodadSetRange

A doodad-set range (MWDR, Shadowlands+): an inclusive [begin, end] span into the MWDS index list, selecting which WMO doodad sets a placement loads.

SmVert

The magma/slime reading of a legacy liquid vertex (MCLQ): u16 texture coordinates s, t and the shared height. See SLVert.as_magma().

SwFlowv

A legacy liquid flow vector (MCLQ, 40 bytes): a sphere of influence, a direction and velocity/amplitude/frequency.

UvMapEntry

An MH2O liquid UV coordinate (case 1/3): x and y, each divided by 8 for shaders.

Structs

CwSoundEmitter.Data

A blittable value twin of the NATIVE layout (size 28): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

CwSoundEmitterVanilla.Data

A blittable value twin of the NATIVE layout (size 52): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

MHDRData.Data

A blittable value twin of the NATIVE layout (size 64): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

McnrEntry.Data

A blittable value twin of the NATIVE layout (size 3): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

MfboPlanes.Data

A blittable value twin of the NATIVE layout (size 36): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SMChunk.Data

A blittable value twin of the NATIVE layout (size 128): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SMLayer.Data

A blittable value twin of the NATIVE layout (size 16): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SMTerrainMaterial.Data

A blittable value twin of the NATIVE layout (size 4): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SMTextureColorGrading.Data

A blittable value twin of the NATIVE layout (size 16): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SMTextureFlags.Data

A blittable value twin of the NATIVE layout (size 4): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SMTextureParams.Data

A blittable value twin of the NATIVE layout (size 16): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SlVert.Data

A blittable value twin of the NATIVE layout (size 8): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SmDoodadSetRange.Data

A blittable value twin of the NATIVE layout (size 8): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SmVert.Data

A blittable value twin of the NATIVE layout (size 8): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

SwFlowv.Data

A blittable value twin of the NATIVE layout (size 40): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

UvMapEntry.Data

A blittable value twin of the NATIVE layout (size 4): read or write whole record buffers through Vector<T>.AsSpan<Data>() / FixedArray<T>.AsSpan<Data>() — one interop crossing for the buffer, where the live-view indexer pays per element. Field offsets are the native ABI's, asserted in the shim.

Enums

LayerFlags

Per-cell texture-layer flag bits (SMLayer.flags). The low 6 bits hold the animation rotation (0x7) and speed (0x38); see SMLayer.animation_rotation()/animation_speed().

LiquidVertexFormat

The MH2O per-instance vertex layout (LiquidVertexFormat). Which arrays a liquid instance stores — heights, depths, texture coordinates — and thus how wowlib decodes and re-lays its vertex data.

MapChunkFlags

Per-cell MCNK header flag bits (SMChunk.flags).

MapHeaderFlags

Tile header flag bits (MHDRData.flags).