wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
wowlib::formats::adt::chunks Namespace Reference

ADT chunk binary structs (the MCNK cell header, texture layers, liquid records, flying bounds) and their flag enums. More...

Classes

struct  CWSoundEmitter
 One sound emitter (MCSE, 28 bytes): the client reads 0x1C bytes per entry — a sound-entry id and a position/size pair. More...
struct  CWSoundEmitterVanilla
 One pre-WotLK sound emitter (MCSE, 52 bytes): the full inline emitter parameters later folded into SoundEntriesAdvanced. More...
struct  MCNREntry
 One MCNR normal (3 signed bytes, x Z Y; 127 == 1.0). More...
struct  MFBOPlanes
 The flying bounding box (MFBO, BC+): two 3x3 grids of int16 heights — a maximum plane you fall through and a minimum plane below the world. More...
struct  MHDRData
 The tile header (MHDR, 64 bytes, root/monolithic). More...
struct  SLVert
 One legacy liquid vertex (MCLQ, 8 bytes). More...
struct  SMChunk
 The per-cell MCNK header — 128 bytes, memcpy'd verbatim. More...
struct  SMDoodadSetRange
 One Shadowlands doodad-set range (MWDR): a [begin, end] span into MWDS. More...
struct  SMLayer
 A per-cell texture layer (MCLY, 16 bytes). More...
struct  SMTerrainMaterial
 One MCMT terrain-material record (Cata+): a TerrainMaterial id per layer. More...
struct  SMTextureColorGrading
 One MTCG color-grading record (Shadowlands+): the color-grading LUT FileDataIDs for the same-index diffuse texture. More...
struct  SMTextureFlags
 One MTXF texture-flags record (WotLK+): flags for the same-index MTEX texture. More...
struct  SMTextureParams
 One MTXP texture-parameter record (MoP+): the MTXF flags plus the _h height-texture scale/offset that drive height-based blending. More...
struct  SMVert
 The magma/slime reading of an MCLQ vertex (8 bytes): two u16 texcoords and the shared height. More...
struct  SWFlowv
 One legacy liquid flow vector (MCLQ SWFlowv, 40 bytes). More...
struct  UVMapEntry
 One MH2O UV texture-coordinate entry (two u16, divided by 8 in shaders). More...

Enumerations

enum class  MapChunkFlags : std::uint32_t {
  HasMcsh = 0x1 , Impassable = 0x2 , LqRiver = 0x4 , LqOcean = 0x8 ,
  LqMagma = 0x10 , LqSlime = 0x20 , HasMccv , unknown_0x80 = 0x80 ,
  DoNotFixAlphaMap = 0x8000 , HighResHoles = 0x10000
}
 Per-cell MCNK header flag bits (SMChunk.flags). More...
enum class  MapHeaderFlags : std::uint32_t { HasMfbo = 0x1 , Northrend = 0x2 }
 Tile header flag bits (MHDRData.flags). More...
enum class  LiquidVertexFormat : std::uint16_t { HeightDepth = 0 , HeightUv = 1 , DepthOnly = 2 , HeightUvDepth = 3 }
enum class  LayerFlags : std::uint32_t {
  AnimationEnabled = 0x40 , Overbright = 0x80 , UseAlphaMap = 0x100 , AlphaMapCompressed = 0x200 ,
  UseCubeMapReflection = 0x400 , unknown_0x800 = 0x800 , unknown_0x1000 = 0x1000
}
 Per-cell texture-layer flag bits (SMLayer.flags). More...

Detailed Description

ADT chunk binary structs (the MCNK cell header, texture layers, liquid records, flying bounds) and their flag enums.

Enumeration Type Documentation

◆ LayerFlags

enum class wowlib::formats::adt::chunks::LayerFlags : std::uint32_t
strong

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().

Enumerator
AnimationEnabled 

Texture-coordinate animation is on.

Overbright 

Render much brighter (used for glowing lava).

UseAlphaMap 

This layer blends through an MCAL alpha map (set on every layer after the first).

AlphaMapCompressed 

The layer's MCAL alpha map is RLE-compressed on disk.

wowlib decodes it either way; on write it re-compresses when this bit is set.

UseCubeMapReflection 

Treat the ground layer as a skybox reflection (needs an MTXF entry).

unknown_0x800 

WoD?

  • with 0x1000: apply the texture-effect texture scale.
unknown_0x1000 

WoD?

+; see 0x800.

Definition at line 21 of file texture.hpp.

◆ LiquidVertexFormat

enum class wowlib::formats::adt::chunks::LiquidVertexFormat : std::uint16_t
strong
Enumerator
HeightDepth 

Case 0: a float height map and a byte depth map (the pre-WoD go-to).

HeightUv 

Case 1: a float height map and a UV texture-coordinate map.

DepthOnly 

Case 2: a byte depth map only; the surface is flat at 0.0 (ocean).

HeightUvDepth 

Case 3: a float height map, a UV map and a byte depth map.

Definition at line 19 of file liquid.hpp.

◆ MapChunkFlags

enum class wowlib::formats::adt::chunks::MapChunkFlags : std::uint32_t
strong

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

Enumerator
HasMcsh 

The cell has a baked shadow map (MCSH sub-chunk).

Impassable 

Impassable terrain (no walking).

LqRiver 

Legacy (MCLQ) river liquid present.

LqOcean 

Legacy (MCLQ) ocean liquid present.

LqMagma 

Legacy (MCLQ) magma liquid present.

LqSlime 

Legacy (MCLQ) slime liquid present.

HasMccv 

The cell has vertex colors (MCCV sub-chunk, WotLK+).

unknown_0x80 

Unknown (0x80).

DoNotFixAlphaMap 
HighResHoles 

Definition at line 24 of file header.hpp.

◆ MapHeaderFlags

enum class wowlib::formats::adt::chunks::MapHeaderFlags : std::uint32_t
strong

Tile header flag bits (MHDRData.flags).

Enumerator
HasMfbo 

The tile has a flying bounds chunk (MFBO).

Northrend 

Set on some Northrend tiles; meaning unknown.

Definition at line 112 of file header.hpp.