|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
Structured ADT liquid entities (namespace wowlib::formats::adt): the modern MH2O (WotLK+) and the legacy MCLQ (up to and including WotLK), decoded to an editable form. More...
#include <algorithm>#include <bit>#include <cstddef>#include <cstdint>#include <cstring>#include <format>#include <span>#include <vector>#include <welder/vocabulary.hpp>#include <wowlib/core/buffer.hpp>#include <wowlib/core/error.hpp>#include <wowlib/formats/adt/chunks/liquid.hpp>#include <wowlib/formats/common/types.hpp>Go to the source code of this file.
Classes | |
| struct | wowlib::formats::adt::LiquidInstance |
| One liquid layer of one terrain cell, fully decoded (an MH2O instance). More... | |
| struct | wowlib::formats::adt::MapChunkLiquid |
| All liquid of one terrain cell: the attribute masks plus its layers. More... | |
| struct | wowlib::formats::adt::MH2OData |
| The whole-tile MH2O chunk: liquid for each of the 256 cells, decoded. More... | |
| struct | wowlib::formats::adt::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... | |
Namespaces | |
| namespace | wowlib |
| namespace | wowlib::formats |
| namespace | wowlib::formats::adt |
| namespace | wowlib::formats::adt::detail |
Functions | |
| LiquidVertexFormat | wowlib::formats::adt::detail::resolveVertexFormat (std::uint16_t stored, std::size_t totalBytes, std::size_t n) |
| Resolve a liquid instance's vertex layout from its stored field and the span of its vertex-data block: the offset-multiplier method (wowdev), robust across every client. | |
Structured ADT liquid entities (namespace wowlib::formats::adt): the modern MH2O (WotLK+) and the legacy MCLQ (up to and including WotLK), decoded to an editable form.
The two coexist in WotLK — Northrend tiles use MH2O while Outland tiles still ship MCLQ.
Both are intra-chunk OFFSET structures — a header whose fields address trailing variable-length data — so, like WMO's MLIQData, they own their payload encoding (SelfSerializing) rather than memcpy'ing. wowlib stores the fully-decoded liquid (heights, depths, texture coordinates, exists masks, attributes) and re-derives every binary offset on write; the guarantee is a semantic round-trip, not byte-identical bytes.
MH2OData is version-independent: the WotLK+ MH2O layout is stable, and the per-instance vertex format is a runtime axis (resolved from the data, not the client version), so it is not templated on ClientVersion.
Definition in file liquid.hpp.