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

A per-cell texture layer (MCLY, 16 bytes). More...

#include <wowlib/formats/adt/chunks/texture.hpp>

Public Member Functions

std::uint32_t animationRotation () const
 The animation direction in 45-degree steps (flag bits 0x7).
std::uint32_t animationSpeed () const
 The animation speed (flag bits 0x38).
bool operator== (const SMLayer &) const =default

Public Attributes

std::uint32_t textureId = 0
 The texture: an index into the tile's texture list (MTEX names, or the MDID FileDataID table since 8.1).
LayerFlags flags {}
 Flags; LayerFlags bits (the low 6 bits are animation rotation/speed).
std::uint32_t offsetInMcal = 0
std::int32_t effectId = -1
 The ground-effect link (a GroundEffectTexture foreign key), or -1 for none (in the alpha clients, a u16 + padding).

Detailed Description

A per-cell texture layer (MCLY, 16 bytes).

offsetInMCAL is derived on write from the layer's alpha map, so it is hidden.

Definition at line 33 of file texture.hpp.

Member Function Documentation

◆ animationRotation()

std::uint32_t wowlib::formats::adt::chunks::SMLayer::animationRotation ( ) const
inlinenodiscard

The animation direction in 45-degree steps (flag bits 0x7).

Definition at line 47 of file texture.hpp.

References flags.

◆ animationSpeed()

std::uint32_t wowlib::formats::adt::chunks::SMLayer::animationSpeed ( ) const
inlinenodiscard

The animation speed (flag bits 0x38).

Definition at line 51 of file texture.hpp.

References flags.

◆ operator==()

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

Member Data Documentation

◆ effectId

std::int32_t wowlib::formats::adt::chunks::SMLayer::effectId = -1

The ground-effect link (a GroundEffectTexture foreign key), or -1 for none (in the alpha clients, a u16 + padding).

Definition at line 43 of file texture.hpp.

◆ flags

LayerFlags wowlib::formats::adt::chunks::SMLayer::flags {}

Flags; LayerFlags bits (the low 6 bits are animation rotation/speed).

Definition at line 38 of file texture.hpp.

Referenced by animationRotation(), and animationSpeed().

◆ offsetInMcal

std::uint32_t wowlib::formats::adt::chunks::SMLayer::offsetInMcal = 0

Definition at line 40 of file texture.hpp.

◆ textureId

std::uint32_t wowlib::formats::adt::chunks::SMLayer::textureId = 0

The texture: an index into the tile's texture list (MTEX names, or the MDID FileDataID table since 8.1).

Definition at line 35 of file texture.hpp.


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