|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
A lazy per-sequence .anim loader handing out resolution windows: for a chunked file (leading AFM2) the requested chunk's payload, for a raw file the whole content when AFM2 is asked for (raw files predate the split sections). More...
#include <wowlib/formats/m2/satellites.hpp>
Public Member Functions | |
| AnimCache (std::function< Result< FileBuffer >(SequenceKey)> loader) | |
| std::span< const std::byte > | window (SequenceKey key, std::uint32_t target) |
| The resolution window of sequence key's file for chunk target (afm2/afsa/AfsbMagic); empty when unavailable. | |
| template<typename Sequence> | |
| auto | sequenceBase (const std::vector< Sequence > &sequences, std::span< const std::byte > inlineBase, std::uint32_t target) |
| The per-sequence base resolver every M2-family read path shares: sequence i's inner arrays resolve against inlineBase when its data is inline, the EMPTY span when it is an alias (stale records are never chased — see M2Sequence::isAlias), or the matching .anim window otherwise. | |
Static Public Member Functions | |
| static std::uint32_t | afidLookup (std::span< const chunked::record::AnimFileEntry > entries, SequenceKey key) |
| The AFID FileDataID for sequence key, 0 when unlisted. | |
Static Public Attributes | |
| static constexpr std::uint32_t | Afm2Magic = fourcc("AFM2", FourCCEndian::Forward) |
| static constexpr std::uint32_t | AfsaMagic = fourcc("AFSA", FourCCEndian::Forward) |
| static constexpr std::uint32_t | AfsbMagic = fourcc("AFSB", FourCCEndian::Forward) |
A lazy per-sequence .anim loader handing out resolution windows: for a chunked file (leading AFM2) the requested chunk's payload, for a raw file the whole content when AFM2 is asked for (raw files predate the split sections).
Missing files and absent sections resolve to empty spans — the offset engine leaves those tracks empty.
Definition at line 103 of file satellites.hpp.
|
inlineexplicit |
| loader | fetches the .anim bytes for a sequence key. |
Definition at line 118 of file satellites.hpp.
|
inlinestatic |
The AFID FileDataID for sequence key, 0 when unlisted.
Definition at line 111 of file satellites.hpp.
References wowlib::formats::m2::SequenceKey::id, and wowlib::formats::m2::SequenceKey::variation.
|
inline |
The per-sequence base resolver every M2-family read path shares: sequence i's inner arrays resolve against inlineBase when its data is inline, the EMPTY span when it is an alias (stale records are never chased — see M2Sequence::isAlias), or the matching .anim window otherwise.
The alias-datablock policy lives here ONCE for the monolithic, chunked and skeleton decode paths alike.
| sequences | the sequence table driving the flags; taken by reference — it may still be mid-decode when the context is built, the resolver reads it lazily. |
| inlineBase | the buffer inline sequence data resolves against. |
| target | the .anim chunk the tracks live in (afm2/afsa/afsb). |
Definition at line 159 of file satellites.hpp.
References window().
|
inline |
The resolution window of sequence key's file for chunk target (afm2/afsa/AfsbMagic); empty when unavailable.
Definition at line 123 of file satellites.hpp.
References Afm2Magic, and wowlib::formats::fourcc().
Referenced by sequenceBase().
|
staticconstexpr |
Definition at line 106 of file satellites.hpp.
Referenced by window().
|
staticconstexpr |
Definition at line 107 of file satellites.hpp.
Referenced by wowlib::formats::m2::detail::Skeleton< V >::write().
|
staticconstexpr |
Definition at line 108 of file satellites.hpp.
Referenced by wowlib::formats::m2::detail::Skeleton< V >::write().