wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
bone.hpp
Go to the documentation of this file.
1#pragma once
2
7
8#include <cstdint>
9#include <vector>
10
11#include <welder/vocabulary.hpp>
12
16
19 struct [[
20 =welder::weld,
21 =welder::doc("The .bone file prelude: a version marker (always 1).")
23 [[=welder::doc("The format version; always 1 so far.")]]
24 std::uint32_t version = 1;
25
26 bool operator==(const BoneFilePrelude&) const = default;
27 };
28
29 static_assert(sizeof(BoneFilePrelude) == 4);
30
34 chunk framework; no chunk here is version-gated).
35 @see https://wowdev.wiki/BONE */
36 struct [[
37 =welder::weld,
38 =welder::doc(R"(
39 A .bone file (WoD+): facial-pose (FacePose 808) bone offset matrices,
40 one file per pose variant, referenced by BFID. See
41 https://wowdev.wiki/BONE.)")
43 static constexpr ClientVersion Version = versions::Wod;
45
47 =welder::doc("The raw u32 prelude (version marker).")]]
49
50 [[
53 =welder::mark::no_reassign,
54 =welder::doc("The affected bone ids (BIDA).")]]
55 std::vector<std::uint16_t> boneIds;
56
57 [[
60 =welder::mark::no_reassign,
61 =welder::doc("The per-bone offset matrices (BOMT), same count as "
62 "bone_ids.")]]
63 std::vector<C44Matrix> boneOffsetMatrices;
64
65 bool operator==(const BoneFile&) const = default;
66 };
67}
The chunk framework, vocabulary and engine in one header.
Client version identity, the flavor axis that separates a client's CONTENT version from the engine ge...
The .bone facial-pose file entity (WoD+).
Definition bone.hpp:17
constexpr detail::HeaderSpec Header
Mark a member as a container payload's raw header prelude (e.g.
constexpr detail::OptionalSpec Optional
Mark a chunk member the format does not require: absence on read is fine.
FourCCEndian
How a chunk's FourCC characters are laid out on disk.
Definition fourcc.hpp:14
@ Forward
The characters are stored as written: 'AFID' appears in the file as the bytes "AFID".
Definition fourcc.hpp:22
consteval detail::ChunkSpec chunk(const char(&cc)[5], FourCCEndian endian=FourCCEndian::Reversed)
Declare the chunk a member maps to.
constexpr ClientVersion Wod
The serialization face of a chunked entity, mixed in CRTP-style: an entity struct E : ChunkedFile<E> ...
The .bone raw prelude: a version marker, always 1 so far.
Definition bone.hpp:20
std::uint32_t version
The format version; always 1 so far.
Definition bone.hpp:22
bool operator==(const BoneFilePrelude &) const =default
One .bone file: which bones get facial-pose offset matrices, and the matrices.
Definition bone.hpp:34
std::vector< C44Matrix > boneOffsetMatrices
The per-bone offset matrices (BOMT), same count as bone_ids.
Definition bone.hpp:48
BoneFilePrelude prelude
The raw u32 prelude (version marker).
Definition bone.hpp:40
static constexpr FourCCEndian UnknownFourccEndian
Definition bone.hpp:36
std::vector< std::uint16_t > boneIds
The affected bone ids (BIDA).
Definition bone.hpp:44
static constexpr ClientVersion Version
Definition bone.hpp:35
bool operator==(const BoneFile &) const =default
The binary-level math and color primitives shared across WoW file formats (wowdev....