wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
boundaries.hpp
Go to the documentation of this file.
1#pragma once
2
12
13#include <array>
14#include <cstdint>
15
16#include <welder/vocabulary.hpp>
17
21
22namespace wowlib::formats::adt {
24 inline constexpr std::uint32_t AdtVersion18 = 18;
25
29 inline constexpr std::size_t ChunksPerTile = 16 * 16;
30
31 // --- layout pivots (documented boundaries that change ADT<V> content) -------
32
36
40
41 // --- version grids ----------------------------------------------------------
42
58
59 // --- per-family canonicalization pivots -------------------------------------
60 // Listed generously; a pivot that does not separate two grid versions is a
61 // no-op (version_range.hpp). Each names a build where an ADT<V> or MapChunk<V>
62 // member first appears or vanishes.
63
73 inline constexpr std::array MapChunkPivots{builds::WotLK, builds::Cata};
74
82
83 // --- alpha-format context ---------------------------------------------------
84
85 enum class [[
86 =welder::weld,
87 =welder::doc(R"(
88 The on-disk MCAL alpha-map bit depth for a tile, decided by the map's
89 WDT MPHD flags (adt_has_big_alpha 0x4 / adt_has_height_texturing 0x80),
90 not the client era. wowlib always decodes alpha maps to a 64x64 8-bit
91 edit surface; this records how they were laid out on disk so a write can
92 reproduce the same encoding. RLE compression is an independent per-layer
93 choice (the MCLY alpha_map_compressed flag), orthogonal to the depth.)")
94 ]] AlphaFormat : std::uint8_t {
95 Lowres4Bit [[=welder::doc(
96 "2048-byte 4-bit alpha maps (the default when the WDT "
97 "sets neither big-alpha flag).")]] = 0,
98 Highres8Bit [[=welder::doc(
99 "4096-byte 8-bit alpha maps (the WDT has adt_has_big_alpha "
100 "or adt_has_height_texturing).")]] = 1
101 };
102}
Named ClientVersion constants for the exact client builds format features appeared (or vanished) at —...
Client version identity, the flavor axis that separates a client's CONTENT version from the engine ge...
constexpr ClientVersion Cata
Cataclysm (any 4.x client).
constexpr ClientVersion BfA_TidesOfVengeance_28294
BfA, Tides of Vengeance, 8.1.0 build 28294 (WDT MAID and the MPHD FileDataID layout — the namehash re...
constexpr ClientVersion TBC
The Burning Crusade (any 2.x client).
constexpr ClientVersion WotLK
Wrath of the Lich King (any 3.x client).
constexpr std::array AdtVersions
The versions ADT is instantiated (and welded) for: every targeted last-minor-of-major release,...
constexpr ClientVersion AdtSplit
Cataclysm: ADTs split into root/_tex0/_obj0 (+_obj1); MCIN gone, MCLV / MCRD / MCRW / MAMP / MCMT arr...
constexpr std::array MapChunkPivots
MapChunk<V> content pivots — only boundaries that change what a chunk CURRENTLY carries: WotLK (MCCV ...
constexpr std::uint32_t AdtVersion18
The ADT format version every supported client writes (the MVER payload).
constexpr ClientVersion AdtTexFdids
8.1.0.27826: MDID/MHID diffuse+height FileDataID tables arrive in _tex0 (MTEX still present this one ...
constexpr std::size_t ChunksPerTile
The terrain chunks a tile is divided into: a 16x16 grid, indexed row-major (y * 16 + x) — the client ...
@ Highres8Bit
4096-byte 8-bit alpha maps (the WDT has adt_has_big_alpha or adt_has_height_texturing).
@ Lowres4Bit
2048-byte 4-bit alpha maps (the default when the WDT sets neither big-alpha flag).
constexpr std::array AdtPivots
ADT<V> assembly content pivots — only boundaries that change what the tile CURRENTLY carries: TBC (MF...
constexpr ClientVersion Shadowlands
constexpr ClientVersion Tww
constexpr ClientVersion Bfa
constexpr ClientVersion Mop
constexpr ClientVersion Wod
constexpr ClientVersion Tbc
constexpr ClientVersion Vanilla
constexpr ClientVersion Legion
constexpr ClientVersion Dragonflight
constexpr ClientVersion Cata
constexpr ClientVersion Wotlk
Version-range canonicalization: the machinery behind collapsing a versioned family's instantiations t...