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

The 148-byte BLP2 file header, exactly as on disk (the 1024-byte palette follows it). More...

#include <wowlib/formats/blp/blp.hpp>

Public Attributes

std::uint32_t magic = BlpMagic
 'BLP2'.
std::uint32_t version = BlpVersion1
 Always 1.
std::uint8_t colorEncoding = 2
 ColorEncoding byte.
std::uint8_t alphaDepth = 0
 Alpha bits per pixel: 0/1/4/8.
std::uint8_t preferredFormat = 0
 PixelFormat byte.
std::uint8_t mipFlags = 0
 0 = no mips, 1 = generated, 2 = handmade.
std::uint32_t width = 0
 Level-0 width in pixels.
std::uint32_t height = 0
 Level-0 height in pixels.
std::array< std::uint32_t, BlpMaxMips > mipOffsets {}
 Absolute file offsets, 0 = unused.
std::array< std::uint32_t, BlpMaxMips > mipSizes {}
 Payload byte sizes, 0 = unused.

Detailed Description

The 148-byte BLP2 file header, exactly as on disk (the 1024-byte palette follows it).

The entity decomposes these fields into welded members; this struct exists for layout-exact serialization.

Definition at line 83 of file blp.hpp.

Member Data Documentation

◆ alphaDepth

std::uint8_t wowlib::formats::blp::detail::BLPHeader::alphaDepth = 0

Alpha bits per pixel: 0/1/4/8.

Definition at line 87 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ colorEncoding

std::uint8_t wowlib::formats::blp::detail::BLPHeader::colorEncoding = 2

ColorEncoding byte.

Definition at line 86 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ height

std::uint32_t wowlib::formats::blp::detail::BLPHeader::height = 0

Level-0 height in pixels.

Definition at line 91 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ magic

std::uint32_t wowlib::formats::blp::detail::BLPHeader::magic = BlpMagic

'BLP2'.

Definition at line 84 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ mipFlags

std::uint8_t wowlib::formats::blp::detail::BLPHeader::mipFlags = 0

0 = no mips, 1 = generated, 2 = handmade.

Definition at line 89 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ mipOffsets

std::array<std::uint32_t, BlpMaxMips> wowlib::formats::blp::detail::BLPHeader::mipOffsets {}

Absolute file offsets, 0 = unused.

Definition at line 92 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ mipSizes

std::array<std::uint32_t, BlpMaxMips> wowlib::formats::blp::detail::BLPHeader::mipSizes {}

Payload byte sizes, 0 = unused.

Definition at line 94 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ preferredFormat

std::uint8_t wowlib::formats::blp::detail::BLPHeader::preferredFormat = 0

PixelFormat byte.

Definition at line 88 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ version

std::uint32_t wowlib::formats::blp::detail::BLPHeader::version = BlpVersion1

Always 1.

Definition at line 85 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().

◆ width

std::uint32_t wowlib::formats::blp::detail::BLPHeader::width = 0

Level-0 width in pixels.

Definition at line 90 of file blp.hpp.

Referenced by wowlib::formats::blp::BLP::read(), and wowlib::formats::blp::BLP::write().


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