|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
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). | |
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.
|
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.
|
default |
|
inline |
Decode the whole-tile MH2O offset structure into the 256 per-chunk entries.
| payload | the MH2O chunk payload. |
Definition at line 197 of file liquid.hpp.
References cells, wowlib::ChunkTruncated, wowlib::formats::adt::MapChunkLiquid::deep, wowlib::formats::adt::LiquidInstance::depthmap, wowlib::formats::adt::chunks::DepthOnly, wowlib::formats::adt::LiquidInstance::existsBitmap, wowlib::formats::adt::MapChunkLiquid::fishable, wowlib::formats::adt::MapChunkLiquid::hasAttributes, wowlib::formats::adt::LiquidInstance::height, wowlib::formats::adt::chunks::HeightDepth, wowlib::formats::adt::LiquidInstance::heightmap, wowlib::formats::adt::chunks::HeightUv, wowlib::formats::adt::chunks::HeightUvDepth, wowlib::formats::adt::MapChunkLiquid::instances, wowlib::formats::adt::LiquidInstance::liquidObjectOrLvf, wowlib::formats::adt::LiquidInstance::liquidType, wowlib::makeError(), wowlib::formats::adt::LiquidInstance::maxHeight, wowlib::formats::adt::LiquidInstance::minHeight, wowlib::formats::adt::detail::resolveVertexFormat(), wowlib::formats::adt::LiquidInstance::uvmap, wowlib::formats::adt::LiquidInstance::vertexCount(), wowlib::formats::adt::LiquidInstance::vertexFormat, wowlib::formats::adt::LiquidInstance::width, wowlib::formats::adt::LiquidInstance::xOffset, and wowlib::formats::adt::LiquidInstance::yOffset.
|
inline |
Re-lay the 256 entries into a fresh canonical MH2O payload (every binary offset derived), appended to out.
| out | the destination buffer. |
Definition at line 306 of file liquid.hpp.
References cells, wowlib::formats::adt::MapChunkLiquid::deep, wowlib::formats::adt::LiquidInstance::depthmap, wowlib::formats::adt::LiquidInstance::existsBitmap, wowlib::formats::adt::MapChunkLiquid::fishable, wowlib::formats::adt::MapChunkLiquid::hasAttributes, wowlib::formats::adt::LiquidInstance::height, wowlib::formats::adt::LiquidInstance::heightmap, wowlib::formats::adt::MapChunkLiquid::instances, wowlib::formats::adt::LiquidInstance::liquidType, wowlib::formats::adt::LiquidInstance::maxHeight, wowlib::formats::adt::LiquidInstance::minHeight, wowlib::formats::adt::LiquidInstance::uvmap, wowlib::formats::adt::LiquidInstance::width, wowlib::formats::adt::LiquidInstance::xOffset, and wowlib::formats::adt::LiquidInstance::yOffset.
| 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.