10#include <welder/vocabulary.hpp>
24 =welder::doc(
"Per-triangle flag bits (MOPY and MPY2).")
27 welder::doc(
"A transition face, blending exterior and interior lighting.")
29 NoCamCollide [[=welder::doc(
"The camera does not collide with this face.")
31 Detail [[=welder::doc(
"A detail face.")]] = 0x4,
32 Collision [[=welder::doc(
"Collision-only (also turns off water ripples).")]] = 0x8,
33 Hint [[=welder::doc(
"A hint face.")]] = 0x10,
34 Render [[=welder::doc(
"A rendered face.")]] = 0x20,
36 welder::doc(
"Enables game-object culling against this face.")]] = 0x40,
37 CollideHit [[=welder::doc(
"Collides with projectiles/hit tests.")]] = 0x80
42 =welder::doc(
"Per-triangle material info (MOPY).")
44 [[=welder::doc(
"Triangle flags; PolyFlags bits.")]]
47 [[=welder::doc(
"Index into MOMT; 0xFF for collision-only faces.")]]
51 static_assert(
sizeof(
SMOPoly) == 0x2);
56 Per-triangle material info v2 (MPY2, 10.0+): the MOPY replacement with
57 16-bit fields for multiple-material support.)")
59 [[=welder::doc("Triangle flags; PolyFlags bits, plus 0x100 for MOQG "
60 "ground-type queries.")]]
61 std::uint16_t flags = 0;
63 [[=welder::doc(
"Index into MOMT.")]]
64 std::uint16_t materialId = 0;
67 static_assert(
sizeof(
Poly2) == 0x4);
79 =welder::weld_as(
"WMOBatch"),
81 =welder::doc(
"A MOBA render batch, abstract over the client version. "
82 "Construct a concrete version with "
83 "WMOBatch.for_version(expansion).")
92 template <ClientVersion V>
99 "One MOBA render batch: an index range sharing one material, "
100 "with its low-resolution culling box.")
102 [[=welder::doc(
"Culling box minimum corner (rounded vertex bounds).")]]
103 std::array<std::int16_t, 3>
boxMin{};
105 [[=welder::doc(
"Culling box maximum corner.")]]
106 std::array<std::int16_t, 3>
boxMax{};
108 [[=welder::doc(
"First face index in MOVI.")]]
111 [[=welder::doc(
"Number of MOVI indices.")]]
112 std::uint16_t
count = 0;
114 [[=welder::doc(
"First vertex used in MOVT.")]]
117 [[=welder::doc(
"Last vertex used, inclusive.")]]
120 [[=welder::doc(
"Batch flags.")]]
121 std::uint8_t
flags = 0;
123 [[=welder::doc(
"Index into MOMT.")]]
134 "One MOBA render batch: an index range sharing one material "
135 "(Legion+ layout with the 16-bit material id).")
138 [[=welder::mark::exclude]]std::array<std::uint8_t, 10> unknown{};
140 [[=welder::doc(
"16-bit material id; used when flags has 0x2.")]]
141 std::uint16_t materialIdLarge = 0;
143 [[=welder::doc(
"First face index in MOVI.")]]
144 std::uint32_t startIndex = 0;
146 [[=welder::doc(
"Number of MOVI indices.")]]
147 std::uint16_t count = 0;
149 [[=welder::doc(
"First vertex used in MOVT.")]]
150 std::uint16_t minIndex = 0;
152 [[=welder::doc(
"Last vertex used, inclusive.")]]
153 std::uint16_t maxIndex = 0;
155 [[=welder::doc(
"Batch flags; 0x2: use material_id_large.")]]
156 std::uint8_t flags = 0;
158 [[=welder::doc(
"Index into MOMT (when it fits 8 bits).")]]
159 std::uint8_t materialId = 0;
169 template <ClientVersion V>
179 One MORB entry (Cata+): a triangle-strip override of the matching MOBA
180 batch's start and count. Same count as MOBA; ignored unless the client
183 [[=welder::doc("Replacement first-index into the MORI strips.")]]
184 std::uint32_t startIndex = 0;
186 [[=welder::doc(
"Replacement index count.")]]
187 std::uint16_t indexCount = 0;
189 [[=welder::doc(
"Alignment padding; zero in client files.")]]
190 std::uint16_t padding = 0;
198 "One MOBS shadow batch (Cata+): the shadow-pass counterpart of "
199 "a MOBA render batch.")
202 [[=welder::mark::exclude]] std::array<std::uint8_t, 10> unknown{};
204 [[=welder::doc(
"16-bit material id; used when flags has 0x2.")]]
205 std::uint16_t materialIdLarge = 0;
207 [[=welder::doc(
"Start value; divided by 3 on use (a face index).")]]
208 std::int32_t start = 0;
210 [[=welder::doc(
"Count value; divided by 3 on use (a face count).")]]
211 std::int16_t count = 0;
214 [[=welder::mark::exclude]] std::array<std::uint8_t, 4> unknown2{};
216 [[=welder::doc(
"Batch flags; 0x2: use material_id_large.")]]
217 std::uint8_t flags = 0;
219 [[=welder::doc(
"Index into MOMT (when it fits 8 bits).")]]
220 std::uint8_t materialId = 0;
227 =welder::doc(
"One MOBN BSP node for collision: a split plane or a leaf "
228 "referencing faces through MOBR.")
230 [[=welder::doc(
"0-2: split axis, 0x4: leaf.")]]
231 std::uint16_t flags = 0;
233 [[=welder::doc(
"Negative-side child node, -1 for none.")]]
234 std::int16_t negChild = -1;
236 [[=welder::doc(
"Positive-side child node, -1 for none.")]]
237 std::int16_t posChild = -1;
239 [[=welder::doc(
"Face count in MOBR (leaves).")]]
240 std::uint16_t nFaces = 0;
242 [[=welder::doc(
"First face index in MOBR.")]]
243 std::uint32_t faceStart = 0;
245 [[=welder::doc(
"Split plane distance from the model origin.")]]
249 static_assert(
sizeof(CAaBspNode) == 0x10);
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 binary-level math and color primitives shared across WoW file formats (wowdev....
#define WOWLIB_EMPTY_BASES
Empty-base optimization for a binary struct that carries a (welded, empty) facade base: gcc/clang alw...
WMO version pivots that change a binary-struct layout (not just chunk presence).