|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
Namespaces | |
| namespace | chunks |
| ADT chunk binary structs (the MCNK cell header, texture layers, liquid records, flying bounds) and their flag enums. | |
| namespace | detail |
Classes | |
| struct | ADTBase |
| The version-agnostic base of every ADT<V> (welded as "ADT"): the language bindings attach for_version/read/write/convert here. More... | |
| struct | LiquidInstance |
| One liquid layer of one terrain cell, fully decoded (an MH2O instance). More... | |
| struct | MapChunkBase |
| The version-agnostic base of every MapChunk<V> (welded as "MapChunk"): the language bindings attach for_version here and give the per-version chunks a common welded supertype. More... | |
| struct | MapChunkLiquid |
| All liquid of one terrain cell: the attribute masks plus its layers. More... | |
| struct | MCLQData |
| The legacy per-chunk liquid (MCLQ, up to and including WotLK): a 9x9 vertex grid, an 8x8 tile-flag grid and up to two flow vectors, decoded. More... | |
| struct | MH2OData |
| The whole-tile MH2O chunk: liquid for each of the 256 cells, decoded. More... | |
Typedefs | |
| template<ClientVersion V> | |
| using | ADT = detail::ADT<canonicalVersion(V, AdtPivots, AdtVersions)> |
| A terrain tile — the canonicalizing face of detail::ADT. | |
| template<ClientVersion V> | |
| using | MapChunk = detail::MapChunk<canonicalVersion(V, MapChunkPivots, AdtVersions)> |
| A terrain chunk — the canonicalizing face of detail::MapChunk: every client version collapses to its range's first grid version (MapChunkPivots). | |
Enumerations | |
| enum class | AlphaFormat : std::uint8_t { Lowres4Bit = 0 , Highres8Bit = 1 } |
| enum class | FileKind : std::uint8_t { Monolithic = 0 , Root = 1 , Tex0 = 2 , Obj0 = 3 , Obj1 = 4 , Lod = 5 } |
| Which physical ADT file a chunk's portion belongs to. More... | |
| enum class | InFile : std::uint8_t { Root , Tex , Obj } |
| The physical-file group a binary chunk (tile-level or MCNK sub-chunk) is routed to on write; the monolithic file carries every group. More... | |
Functions | |
| consteval detail::InFileSpec | inFile (InFile file) |
| Annotate a binary chunk member with the physical file it is routed to on write (the monolithic file carries every group). | |
| consteval detail::SerializerSpec | serializedBy (std::meta::info codec) |
| Annotate a sub-chunk member with a MapChunk-context codec (a struct with static read(self, span, ReadCtx) / write(self, out, WriteCtx) / engaged(self, WriteCtx) templates) instead of the default uniform transfer. | |
| constexpr bool | routesTo (InFile file, FileKind kind) |
| Whether a member routed to file participates in physical file kind: the monolithic file carries every group, each split file only its own. | |
| constexpr bool | fileHasHeader (FileKind kind) |
| Whether a given physical file carries the 128-byte MCNK header (the root or the pre-Cata monolithic file). | |
Variables | |
| constexpr std::uint32_t | AdtVersion18 = 18 |
| The ADT format version every supported client writes (the MVER payload). | |
| constexpr std::size_t | ChunksPerTile = 16 * 16 |
| The terrain chunks a tile is divided into: a 16x16 grid, indexed row-major (y * 16 + x) — the client addresses them positionally, so the count is fixed for every version. | |
| constexpr ClientVersion | AdtTexFdids = builds::BfA_TidesOfVengeance_28294 |
| 8.1.0.27826: MDID/MHID diffuse+height FileDataID tables arrive in _tex0 (MTEX still present this one build). | |
| constexpr ClientVersion | AdtSplit = builds::Cata |
| Cataclysm: ADTs split into root/_tex0/_obj0 (+_obj1); MCIN gone, MCLV / MCRD / MCRW / MAMP / MCMT arrive. | |
| constexpr std::array | AdtVersions |
| The versions ADT is instantiated (and welded) for: every targeted last-minor-of-major release, in release order. | |
| constexpr std::array | MapChunkPivots {builds::WotLK, builds::Cata} |
| MapChunk<V> content pivots — only boundaries that change what a chunk CURRENTLY carries: WotLK (MCCV vertex colors arrive) and Cata (MCLV baked lighting + MCMT materials arrive, and the legacy MCLQ liquid is finally gone). | |
| constexpr std::array | AdtPivots {builds::TBC, builds::WotLK, builds::Cata, AdtTexFdids} |
| ADT<V> assembly content pivots — only boundaries that change what the tile CURRENTLY carries: TBC (MFBO), WotLK (MH2O/MTXF/MCCV), Cata (split files, MAMP, obj1/lod), 8.1 (MDID/MHID FileDataID texture tables). | |
| using wowlib::formats::adt::ADT = detail::ADT<canonicalVersion(V, AdtPivots, AdtVersions)> |
A terrain tile — the canonicalizing face of detail::ADT.
| using wowlib::formats::adt::MapChunk = detail::MapChunk<canonicalVersion(V, MapChunkPivots, AdtVersions)> |
A terrain chunk — the canonicalizing face of detail::MapChunk: every client version collapses to its range's first grid version (MapChunkPivots).
Definition at line 676 of file map_chunk.hpp.
|
strong |
Definition at line 85 of file boundaries.hpp.
|
strong |
Which physical ADT file a chunk's portion belongs to.
Pre-Cata tiles are one monolithic file carrying every chunk; Cata+ tiles distribute chunks over the split ADT files (root/_tex0/_obj0/_obj1/_lod).
Definition at line 72 of file map_chunk.hpp.
|
strong |
The physical-file group a binary chunk (tile-level or MCNK sub-chunk) is routed to on write; the monolithic file carries every group.
Used by both ADT tile chunks and MapChunk sub-chunks via the inFile() annotation.
Definition at line 85 of file map_chunk.hpp.
|
constexpr |
Whether a given physical file carries the 128-byte MCNK header (the root or the pre-Cata monolithic file).
| kind | the physical file. |
Definition at line 139 of file map_chunk.hpp.
References Monolithic, and Root.
Referenced by wowlib::formats::adt::detail::MapChunk< V >::readFrom(), wowlib::formats::adt::detail::ADT< V >::writeFile(), and wowlib::formats::adt::detail::MapChunk< V >::writeTo().
|
consteval |
Annotate a binary chunk member with the physical file it is routed to on write (the monolithic file carries every group).
| file | the physical-file group. |
Definition at line 109 of file map_chunk.hpp.
Whether a member routed to file participates in physical file kind: the monolithic file carries every group, each split file only its own.
| file | the member's routing group. |
| kind | the physical file being read/written. |
Definition at line 125 of file map_chunk.hpp.
References Monolithic, Obj, Obj0, Root, Tex, and Tex0.
Referenced by wowlib::formats::adt::detail::ADT< V >::writeFile(), and wowlib::formats::adt::detail::MapChunk< V >::writeTo().
|
consteval |
Annotate a sub-chunk member with a MapChunk-context codec (a struct with static read(self, span, ReadCtx) / write(self, out, WriteCtx) / engaged(self, WriteCtx) templates) instead of the default uniform transfer.
| codec | the reflection of the codec type, e.g. ^^AlphaCodec. |
Definition at line 116 of file map_chunk.hpp.
|
inlineconstexpr |
ADT<V> assembly content pivots — only boundaries that change what the tile CURRENTLY carries: TBC (MFBO), WotLK (MH2O/MTXF/MCCV), Cata (split files, MAMP, obj1/lod), 8.1 (MDID/MHID FileDataID texture tables).
MoP/WoD add no modeled tile chunks, and _obj1/_lod stay raw until stage 3, so Legion and SL are not yet pivots. Ranges: Vanilla / tbc / wotlk / CataToLegion / BfaPlus.
Definition at line 81 of file boundaries.hpp.
|
inlineconstexpr |
Cataclysm: ADTs split into root/_tex0/_obj0 (+_obj1); MCIN gone, MCLV / MCRD / MCRW / MAMP / MCMT arrive.
Definition at line 39 of file boundaries.hpp.
|
inlineconstexpr |
8.1.0.27826: MDID/MHID diffuse+height FileDataID tables arrive in _tex0 (MTEX still present this one build).
Definition at line 35 of file boundaries.hpp.
|
inlineconstexpr |
The ADT format version every supported client writes (the MVER payload).
Definition at line 24 of file boundaries.hpp.
Referenced by wowlib::formats::adt::detail::ADT< V >::writeFile().
|
inlineconstexpr |
The versions ADT is instantiated (and welded) for: every targeted last-minor-of-major release, in release order.
Definition at line 45 of file boundaries.hpp.
Referenced by wowlib::audit::detail::FormatDrivers::adt().
|
inlineconstexpr |
The terrain chunks a tile is divided into: a 16x16 grid, indexed row-major (y * 16 + x) — the client addresses them positionally, so the count is fixed for every version.
Definition at line 29 of file boundaries.hpp.
Referenced by wowlib::formats::adt::detail::ADT< V >::validate().
|
inlineconstexpr |
MapChunk<V> content pivots — only boundaries that change what a chunk CURRENTLY carries: WotLK (MCCV vertex colors arrive) and Cata (MCLV baked lighting + MCMT materials arrive, and the legacy MCLQ liquid is finally gone).
The legacy MCLQ liquid is NOT removed at WotLK — Outland tiles keep shipping it in 3.3.5a and the exact removal build is unknown, so it stays available through WotLK (see map_chunk.hpp). MoP MCBB/MPTX and later per-chunk sub-chunks are not modeled yet; add their pivots when they are (a no-op pivot would just over-instantiate). Ranges: VanillaToTbc / wotlk / CataPlus.
Definition at line 73 of file boundaries.hpp.