wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
wowlib::formats::m2::detail::Skeleton< V > Struct Template Reference

#include <wowlib/formats/m2/skeleton.hpp>

Inheritance diagram for wowlib::formats::m2::detail::Skeleton< V >:

Public Member Functions

const std::vector< chunked::record::AnimFileEntry > & effectiveAnimFdids () const
 The AFID set to resolve .anim files with: this file's, or the parent's when this skeleton is a child without its own.
const std::vector< std::uint32_t > & effectiveBoneFdids () const
 The BFID set to resolve .bone files with (own, else parent's).
Result< void > read (fs::FileSystem &fs, const FileKey &key)
 Load the skeleton: chunks, the parent's shared AFID/BFID and the .anim-resolved bone/attachment data.
Result< void > write (fs::FileSystem &fs, const FileKey &key) const
 Serialize the skeleton and its .anim files (AFSA/AFSB sections) through the project overlay.
bool operator== (const Skeleton &) const =default
Public Member Functions inherited from wowlib::formats::ChunkedFile< Skeleton< V > >
Result< void > read (std::span< const std::byte > data)
 Deserialize file bytes into this entity, replacing its contents.
Result< FileBuffer > write () const
 Serialize this entity.
ValidationReport validate () const
Result< void > ensureValid () const
 Validate and raise on the first error instead of returning a report — the assert-style face of validate().
bool operator== (const ChunkedFile &) const=default
Public Member Functions inherited from wowlib::formats::ChunkExtras
bool operator== (const ChunkExtras &) const =default
Public Member Functions inherited from wowlib::formats::m2::SkeletonBase
bool operator== (const SkeletonBase &) const =default

Public Attributes

SkelHeader< V > headerBlock {}
 The skeleton identity (SKL1).
ChunkBlob ska1
 SKA1 transport blob; decoded into attachment_block by read(fs, key), re-encoded on write.
ChunkBlob skb1
 SKB1 transport blob; decoded into bone_block by read(fs, key), re-encoded on write.
SkelSequences< V > sequenceBlock {}
 The sequence tables (SKS1).
std::vector< SkelParentData > parentLink
 The parent-skeleton link (SKPD); 0 or 1 entries.
std::vector< chunked::record::AnimFileEntry > animFdids
 .anim FileDataIDs (AFID); absent on child skeletons, which share the parent's (see parent_anim_fdids).
std::vector< std::uint32_t > boneFdids
 .bone FileDataIDs (BFID); absent on child skeletons, which share the parent's (see parent_bone_fdids).
SkelBones< V > boneBlock {}
 The bones (decoded SKB1).
SkelAttachments< V > attachmentBlock {}
 The attachments (decoded SKA1).
std::vector< chunked::record::AnimFileEntry > parentAnimFdids
 The parent's AFID entries when this skeleton is a child (filled by read(fs, key); not part of this file).
std::vector< std::uint32_t > parentBoneFdids
 The parent's BFID entries when this skeleton is a child (filled by read(fs, key); not part of this file).
Public Attributes inherited from wowlib::formats::ChunkExtras
std::vector< JournalEntry > journal
std::vector< UnknownChunk > unknown
std::vector< std::byte > trailing

Static Public Attributes

static constexpr ClientVersion Version = V
static constexpr FourCCEndian UnknownFourccEndian = FourCCEndian::Forward

Detailed Description

template<ClientVersion V>
requires (V >= M2ChunkedContainer)
struct wowlib::formats::m2::detail::Skeleton< V >

Definition at line 194 of file skeleton.hpp.

Member Function Documentation

◆ effectiveAnimFdids()

template<ClientVersion V>
const std::vector< chunked::record::AnimFileEntry > & wowlib::formats::m2::detail::Skeleton< V >::effectiveAnimFdids ( ) const
inline

The AFID set to resolve .anim files with: this file's, or the parent's when this skeleton is a child without its own.

The effective AFID entries: own when present, else the parent's.

Definition at line 245 of file skeleton.hpp.

◆ effectiveBoneFdids()

template<ClientVersion V>
const std::vector< std::uint32_t > & wowlib::formats::m2::detail::Skeleton< V >::effectiveBoneFdids ( ) const
inline

The BFID set to resolve .bone files with (own, else parent's).

The effective BFID entries: own when present, else the parent's.

Definition at line 251 of file skeleton.hpp.

◆ operator==()

template<ClientVersion V>
bool wowlib::formats::m2::detail::Skeleton< V >::operator== ( const Skeleton< V > & ) const
default

◆ read()

template<ClientVersion V>
requires (V >= M2ChunkedContainer)
Result< void > wowlib::formats::m2::detail::Skeleton< V >::read ( fs::FileSystem & fs,
const FileKey & key )

Load the skeleton: chunks, the parent's shared AFID/BFID and the .anim-resolved bone/attachment data.

Parameters
fsthe filesystem gateway
keythe .skel identity (path and/or FileDataID)

Definition at line 284 of file skeleton.hpp.

References parentLink, read(), and wowlib::formats::m2::detail::Skeleton< canonicalVersion(V, M2ChunkPayloadPivots, M2ChunkedVersions)>::read().

Referenced by read().

◆ write()

Member Data Documentation

◆ animFdids

.anim FileDataIDs (AFID); absent on child skeletons, which share the parent's (see parent_anim_fdids).

Definition at line 220 of file skeleton.hpp.

Referenced by write().

◆ attachmentBlock

template<ClientVersion V>
SkelAttachments<V> wowlib::formats::m2::detail::Skeleton< V >::attachmentBlock {}

The attachments (decoded SKA1).

Definition at line 233 of file skeleton.hpp.

Referenced by write().

◆ boneBlock

The bones (decoded SKB1).

Definition at line 230 of file skeleton.hpp.

Referenced by write().

◆ boneFdids

template<ClientVersion V>
std::vector<std::uint32_t> wowlib::formats::m2::detail::Skeleton< V >::boneFdids

.bone FileDataIDs (BFID); absent on child skeletons, which share the parent's (see parent_bone_fdids).

Definition at line 224 of file skeleton.hpp.

◆ headerBlock

template<ClientVersion V>
SkelHeader<V> wowlib::formats::m2::detail::Skeleton< V >::headerBlock {}

The skeleton identity (SKL1).

Definition at line 200 of file skeleton.hpp.

◆ parentAnimFdids

The parent's AFID entries when this skeleton is a child (filled by read(fs, key); not part of this file).

Definition at line 236 of file skeleton.hpp.

◆ parentBoneFdids

template<ClientVersion V>
std::vector<std::uint32_t> wowlib::formats::m2::detail::Skeleton< V >::parentBoneFdids

The parent's BFID entries when this skeleton is a child (filled by read(fs, key); not part of this file).

Definition at line 239 of file skeleton.hpp.

◆ parentLink

template<ClientVersion V>
std::vector<SkelParentData> wowlib::formats::m2::detail::Skeleton< V >::parentLink

The parent-skeleton link (SKPD); 0 or 1 entries.

Definition at line 216 of file skeleton.hpp.

Referenced by read().

◆ sequenceBlock

template<ClientVersion V>
SkelSequences<V> wowlib::formats::m2::detail::Skeleton< V >::sequenceBlock {}

The sequence tables (SKS1).

Definition at line 212 of file skeleton.hpp.

Referenced by write().

◆ ska1

SKA1 transport blob; decoded into attachment_block by read(fs, key), re-encoded on write.

Definition at line 204 of file skeleton.hpp.

Referenced by write().

◆ skb1

SKB1 transport blob; decoded into bone_block by read(fs, key), re-encoded on write.

Definition at line 208 of file skeleton.hpp.

Referenced by write().

◆ UnknownFourccEndian

template<ClientVersion V>
FourCCEndian wowlib::formats::m2::detail::Skeleton< V >::UnknownFourccEndian = FourCCEndian::Forward
staticconstexpr

Definition at line 196 of file skeleton.hpp.

◆ Version

template<ClientVersion V>
ClientVersion wowlib::formats::m2::detail::Skeleton< V >::Version = V
staticconstexpr

Definition at line 195 of file skeleton.hpp.


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