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

MCAL codec: decode/encode the per-layer 64x64 alpha maps through AlphaMapCodec, indexing the sibling layers' flags + offsetInMcal. More...

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

Static Public Member Functions

template<typename Chunk>
static Result< void > read (Chunk &self, std::span< const std::byte > sub, const MapChunkReadCtx &ctx)
template<typename Chunk>
static void prepare (const Chunk &self, AlphaFormat af, std::vector< std::byte > &blob, std::vector< SMLayer > &stamped)
 Build the MCAL blob and the layers copy carrying each layer's derived offsetInMcal (MCLY emits that copy).
template<typename Chunk>
static void write (const Chunk &, FileBuffer &out, const MapChunkWriteCtx &ctx)
template<typename Chunk>
static bool engaged (const Chunk &, const MapChunkWriteCtx &ctx)

Detailed Description

MCAL codec: decode/encode the per-layer 64x64 alpha maps through AlphaMapCodec, indexing the sibling layers' flags + offsetInMcal.

Definition at line 232 of file map_chunk.hpp.

Member Function Documentation

◆ engaged()

template<typename Chunk>
bool wowlib::formats::adt::detail::AlphaCodec::engaged ( const Chunk & ,
const MapChunkWriteCtx & ctx )
inlinestatic

◆ prepare()

template<typename Chunk>
void wowlib::formats::adt::detail::AlphaCodec::prepare ( const Chunk & self,
AlphaFormat af,
std::vector< std::byte > & blob,
std::vector< SMLayer > & stamped )
inlinestatic

Build the MCAL blob and the layers copy carrying each layer's derived offsetInMcal (MCLY emits that copy).

Called once before the write walk.

Parameters
selfthe chunk.
afthe tile alpha bit depth.
blobreceives the encoded MCAL bytes.
stampedreceives the layers with offsetInMcal stamped.

Definition at line 253 of file map_chunk.hpp.

References wowlib::formats::adt::chunks::AlphaMapCompressed, wowlib::formats::adt::detail::AlphaMapCodec::encode(), wowlib::formats::hasFlag(), and wowlib::formats::adt::chunks::UseAlphaMap.

Referenced by wowlib::formats::adt::detail::MapChunk< V >::writeTo().

◆ read()

template<typename Chunk>
Result< void > wowlib::formats::adt::detail::AlphaCodec::read ( Chunk & self,
std::span< const std::byte > sub,
const MapChunkReadCtx & ctx )
inlinestatic

◆ write()

template<typename Chunk>
void wowlib::formats::adt::detail::AlphaCodec::write ( const Chunk & ,
FileBuffer & out,
const MapChunkWriteCtx & ctx )
inlinestatic

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