12#include <welder/vocabulary.hpp>
27 =welder::weld_as(
"M2Sequence"),
30 One animation sequence entry. Abstract over the client version; construct a concrete
31 version with M2Sequence.ForVersion / for_version.)")
40 =welder::doc(
"M2Sequence flags — the 0x20/0x40/0x130 combination decides "
41 "where the sequence's track data lives (.m2 vs .anim file).")
44 TiltIn [[=welder::doc(
"Model tilts over X/Y by the end of the animation.")]] = 0x2,
45 TiltOut [[=welder::doc(
"Model starts tilted and returns upright.")]] = 0x4,
46 TiltFixed [[=welder::doc(
"Model stays tilted for the whole animation.")]] = 0x8,
48 welder::doc(
"Set at runtime for loaded low-priority sequences.")]] = 0x10,
49 DataInM2 [[=welder::doc(
"Primary bone sequence: track data is in the .m2 "
50 "itself, not an .anim file.")]] = 0x20,
51 Alias [[=welder::doc(
"The sequence is an alias: follow alias_next until an "
52 "entry without this flag owns the data.")]] = 0x40,
53 Blended [[=welder::doc(
"Blend (lerp) into/out of this sequence.")]] = 0x80,
54 StoredInModel [[=welder::doc(
"Sequence stored in the model (0x100).")]] = 0x100,
56 welder::doc(
"blend_time is the in/out pair, not one u32.")]] = 0x200,
57 Legion0x800 [[=welder::doc(
"Seen in Legion 24500 models.")]] = 0x800
65 return (
flags & 0x130u) == 0;
71 template <ClientVersion V>
78 "An animation sequence, pre-WotLK layout: global start/end timestamps, "
79 "one u32 blend time.")
81 [[=welder::doc(
"Animation id in AnimationData.dbc.")]]
83 [[=welder::doc(
"Which variation of the animation this is.")]]
85 [[=welder::doc(
"Slice start on the global timeline.")]]
87 [[=welder::doc(
"Slice end on the global timeline.")]]
89 [[=welder::doc(
"Character move speed during the sequence.")]]
91 [[=welder::doc(
"See SequenceFlags.")]]
93 [[=welder::doc(
"Playback probability weight (sums to 0x7FFF per id).")]]
95 [[=welder::doc(
"Unused alignment padding.")]]
97 [[=welder::doc(
"Random repetition bounds; both 0 = no repeat.")]]
99 [[=welder::doc(
"Transition blend duration, milliseconds.")]]
100 std::uint32_t blendTime = 0;
101 [[=welder::doc(
"Bounds while the sequence plays.")]]
103 [[=welder::doc(
"Next variation index, -1 if none.")]]
104 std::int16_t variationNext = -1;
105 [[=welder::doc(
"Alias target (flags & 0x40 chains).")]]
106 std::uint16_t aliasNext = 0;
108 [[=welder::doc(
"Whether this sequence is an alias (flag 0x40): it owns "
109 "NO track data — resolve it by following alias_next. "
110 "Files still carry stale array records for aliases "
111 "(dead offsets, junk values), so they are never "
114 return (std::to_underlying(
flags) & 0x40u) != 0;
117 [[=welder::doc(
"Whether this sequence owns an external .anim file: its "
118 "data is low-priority (0x10/0x20/0x100 all clear) and "
120 constexpr bool ownsAnimFile()
const {
124 bool operator==(
const M2Sequence&)
const =
default;
131 "An animation sequence, WotLK through MoP layout: an own duration, one "
134 [[=welder::doc(
"Animation id in AnimationData.dbc.")]]
135 std::uint16_t
id = 0;
136 [[=welder::doc(
"Which variation of the animation this is.")]]
138 [[=welder::doc(
"Sequence length, milliseconds.")]]
140 [[=welder::doc(
"Character move speed during the sequence.")]]
142 [[=welder::doc(
"See SequenceFlags.")]]
144 [[=welder::doc(
"Playback probability weight (sums to 0x7FFF per id).")]]
145 std::int16_t frequency = 0;
146 [[=welder::doc(
"Unused alignment padding.")]]
147 std::uint16_t padding = 0;
148 [[=welder::doc(
"Random repetition bounds; both 0 = no repeat.")]]
150 [[=welder::doc(
"Transition blend duration, milliseconds.")]]
151 std::uint32_t blendTime = 0;
152 [[=welder::doc(
"Bounds while the sequence plays.")]]
154 [[=welder::doc(
"Next variation index, -1 if none.")]]
155 std::int16_t variationNext = -1;
156 [[=welder::doc(
"Alias target (flags & 0x40 chains).")]]
157 std::uint16_t aliasNext = 0;
159 [[=welder::doc(
"Whether this sequence is an alias (flag 0x40): it owns "
160 "NO track data — resolve it by following alias_next. "
161 "Files still carry stale array records for aliases "
162 "(dead offsets, junk values), so they are never "
164 constexpr bool isAlias()
const {
165 return (std::to_underlying(flags) & 0x40u) != 0;
168 [[=welder::doc(
"Whether this sequence owns an external .anim file: its "
169 "data is low-priority (0x10/0x20/0x100 all clear) and "
175 bool operator==(
const M2Sequence&)
const =
default;
182 "An animation sequence, WoD+ layout: an own duration, split "
183 "blend-in/out times.")
185 [[=welder::doc(
"Animation id in AnimationData.dbc.")]]
186 std::uint16_t
id = 0;
187 [[=welder::doc(
"Which variation of the animation this is.")]]
189 [[=welder::doc(
"Sequence length, milliseconds.")]]
191 [[=welder::doc(
"Character move speed during the sequence.")]]
193 [[=welder::doc(
"See SequenceFlags.")]]
195 [[=welder::doc(
"Playback probability weight (sums to 0x7FFF per id).")]]
196 std::int16_t frequency = 0;
197 [[=welder::doc(
"Unused alignment padding.")]]
198 std::uint16_t padding = 0;
199 [[=welder::doc(
"Random repetition bounds; both 0 = no repeat.")]]
201 [[=welder::doc(
"Blend-in duration, milliseconds.")]]
202 std::uint16_t blendTimeIn = 0;
203 [[=welder::doc(
"Blend-out duration, milliseconds.")]]
204 std::uint16_t blendTimeOut = 0;
205 [[=welder::doc(
"Bounds while the sequence plays.")]]
207 [[=welder::doc(
"Next variation index, -1 if none.")]]
208 std::int16_t variationNext = -1;
209 [[=welder::doc(
"Alias target (flags & 0x40 chains).")]]
210 std::uint16_t aliasNext = 0;
212 [[=welder::doc(
"Whether this sequence is an alias (flag 0x40): it owns "
213 "NO track data — resolve it by following alias_next. "
214 "Files still carry stale array records for aliases "
215 "(dead offsets, junk values), so they are never "
217 constexpr bool isAlias()
const {
218 return (std::to_underlying(flags) & 0x40u) != 0;
221 [[=welder::doc(
"Whether this sequence owns an external .anim file: its "
222 "data is low-priority (0x10/0x20/0x100 all clear) and "
224 constexpr bool ownsAnimFile()
const {
228 bool operator==(
const M2Sequence&)
const =
default;
236 template <ClientVersion V>
241 =welder::doc(
"A pre-WotLK playable-animation fallback: the substitute "
242 "animation id plus how to play it (0 normal, 1 backwards, "
243 "2 frame-by-frame, 3 freeze).")
244 ]] M2SequenceFallback {
245 [[=welder::doc(
"Substitute animation id in AnimationData.dbc.")]]
246 std::int16_t fallbackAnimationId = 0;
247 [[=welder::doc(
"Playback mode: 0 normal, 1 backwards, 2 frame-by-frame, "
249 std::int16_t flags = 0;
251 bool operator==(
const M2SequenceFallback&)
const =
default;
257 static_assert(
sizeof(M2SequenceFallback) == 4);
Client version identity, the flavor axis that separates a client's CONTENT version from the engine ge...
Flag-testing convenience for the binary formats' bit-mask enums.
Binding-language identities welder's core does not name.
#define WOWLIB_CS_FAMILY_SURFACE
The C# rod's family-surface opt-in, spellable in every build.
The M2 version vocabulary: the layout pivots record/entity partial specializations key on,...
The M2 animation vocabulary (namespace wowlib::formats::m2::root::record): the small fixed-size primi...