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

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

#include <wowlib/formats/adt/liquid.hpp>

Public Member Functions

Result< void > read (std::span< const std::byte > payload)
 Decode an MCLQ payload into the height range, 9x9 vertex grid, 8x8 tile flags and active flow vectors.
Result< void > write (FileBuffer &out) const
 Re-lay the legacy liquid into a fixed-grid MCLQ payload (81 verts, 64 tiles, the two-slot flow pair), appended to out.
bool empty () const
 Whether the chunk carries no legacy liquid.
bool operator== (const MCLQData &) const =default

Public Attributes

CRange heightRange {}
 The surface height range (CRange: min, max).
std::vector< SLVert > vertices
 The 9x9 = 81 liquid vertices, row-major.
std::vector< std::uint8_t > tiles
 The 8x8 = 64 tile flag bytes (bits: liquid type, don't-render, fatigue).
std::vector< SWFlowv > flows
 The active flow vectors (0-2).

Detailed Description

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.

SelfSerializing.

Definition at line 141 of file liquid.hpp.

Member Function Documentation

◆ empty()

bool wowlib::formats::adt::MCLQData::empty ( ) const
inlinenodiscard

Whether the chunk carries no legacy liquid.

Returns
whether the chunk carries no legacy liquid.

Definition at line 169 of file liquid.hpp.

References vertices.

◆ operator==()

bool wowlib::formats::adt::MCLQData::operator== ( const MCLQData & ) const
default

◆ read()

Result< void > wowlib::formats::adt::MCLQData::read ( std::span< const std::byte > payload)
inline

Decode an MCLQ payload into the height range, 9x9 vertex grid, 8x8 tile flags and active flow vectors.

Parameters
payloadthe MCLQ chunk payload.
Returns
a structural error or success.

Definition at line 392 of file liquid.hpp.

References flows, heightRange, tiles, and vertices.

◆ write()

Result< void > wowlib::formats::adt::MCLQData::write ( FileBuffer & out) const
inline

Re-lay the legacy liquid into a fixed-grid MCLQ payload (81 verts, 64 tiles, the two-slot flow pair), appended to out.

Parameters
outthe destination buffer.
Returns
a structural error or success.

Definition at line 418 of file liquid.hpp.

References flows, heightRange, tiles, and vertices.

Member Data Documentation

◆ flows

std::vector<SWFlowv> wowlib::formats::adt::MCLQData::flows

The active flow vectors (0-2).

Definition at line 152 of file liquid.hpp.

Referenced by read(), and write().

◆ heightRange

CRange wowlib::formats::adt::MCLQData::heightRange {}

The surface height range (CRange: min, max).

Definition at line 143 of file liquid.hpp.

Referenced by read(), and write().

◆ tiles

std::vector<std::uint8_t> wowlib::formats::adt::MCLQData::tiles

The 8x8 = 64 tile flag bytes (bits: liquid type, don't-render, fatigue).

Definition at line 149 of file liquid.hpp.

Referenced by read(), and write().

◆ vertices

std::vector<SLVert> wowlib::formats::adt::MCLQData::vertices

The 9x9 = 81 liquid vertices, row-major.

Definition at line 146 of file liquid.hpp.

Referenced by empty(), read(), and write().


The documentation for this struct was generated from the following file: