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

The whole-tile MH2O chunk: liquid for each of the 256 cells, decoded. More...

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

Public Member Functions

Result< void > read (std::span< const std::byte > payload)
 Decode the whole-tile MH2O offset structure into the 256 per-chunk entries.
Result< void > write (FileBuffer &out) const
 Re-lay the 256 entries into a fresh canonical MH2O payload (every binary offset derived), appended to out.
bool empty () const
 Whether the tile has no liquid at all.
bool operator== (const MH2OData &) const =default

Public Attributes

std::vector< MapChunkLiquid > cells
 Liquid for each of the 256 terrain chunks (y * 16 + x).

Detailed Description

The whole-tile MH2O chunk: liquid for each of the 256 cells, decoded.

SelfSerializing — it owns the offset-based MH2O payload layout.

Definition at line 112 of file liquid.hpp.

Member Function Documentation

◆ empty()

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

Whether the tile has no liquid at all.

Definition at line 129 of file liquid.hpp.

References cells, and wowlib::formats::adt::MapChunkLiquid::instances.

◆ operator==()

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

◆ read()

◆ write()

Member Data Documentation

◆ cells

std::vector<MapChunkLiquid> wowlib::formats::adt::MH2OData::cells

Liquid for each of the 256 terrain chunks (y * 16 + x).

Definition at line 114 of file liquid.hpp.

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


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