wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
objects.hpp
Go to the documentation of this file.
1#pragma once
2
9
10#include <cstdint>
11
12#include <welder/vocabulary.hpp>
13
16
18 struct [[
19 =welder::weld,
20 =welder::doc(R"(
21 A low-resolution WMO placement (an MLMD record, Legion+): an
22 SMMapObjDef without the extents — those live in the parallel MLMX
23 record. name_id is always a FileDataID here (the WDL has no name
24 table).)")
25 ]] LodMapObjDef {
26 [[=welder::doc("The WMO FileDataID.")]]
27 std::uint32_t nameId = 0;
28
29 [[=welder::doc("Unique instance id across the whole map; matches the full-"
30 "resolution ADT placement.")]]
31 std::uint32_t uniqueId = 0;
33 [[=welder::doc("Position, in the map's placement coordinate system.")]]
36 [[=welder::doc("Rotation as Euler angles, degrees.")]]
39 [[=welder::doc("Flags; MapObjDefFlags bits.")]]
42 [[=welder::doc("The WMO doodad set shown by this instance.")]]
43 std::uint16_t doodadSet = 0;
44
45 [[=welder::doc("The WMO name set.")]]
46 std::uint16_t nameSet = 0;
47
48 [[=welder::doc("Scale, 1024 = 1.0.")]]
49 std::uint16_t scale = 0;
50 };
52 static_assert(sizeof(LodMapObjDef) == 0x28);
53
54 struct [[
55 =welder::weld,
56 =welder::doc(R"(
57 Visibility extents for one low-resolution placement (an MLDX/MLMX
58 record, Legion+): the transformed model's bounding box and a radius,
59 in server coordinates. Same count and order as the placement list it
60 accompanies.)")
62 [[=welder::doc("The transformed model's bounding box.")]]
63 CAaBox bounds{};
64
65 [[=welder::doc("The visibility radius.")]]
66 float radius = 0;
67 };
68
69 static_assert(sizeof(LodExtent) == 28);
70
71 struct [[
72 =welder::weld,
73 =welder::doc(R"(
74 A fade-distance range for one low-resolution M2 placement (an MLDF
75 record, BfA): undocumented on wowdev; layout established by surveying
76 every 8.3.7 WDL carrying the chunk (33 files) — always exactly one
77 8-byte record per MLDD entry, holding a pair of ascending distances
78 drawn from clean round values ((500, 3500), (3500, 4000),
79 (5000, 5050), (10000, 10050)).)")
80 ]] LodDoodadFade {
81 [[=welder::doc("The distance the fade starts at.")]]
82 float fadeStart = 0;
83
84 [[=welder::doc("The distance the fade ends at.")]]
85 float fadeEnd = 0;
86 };
87
88 static_assert(sizeof(LodDoodadFade) == 8);
89}
The map-placement binary records SHARED across the world file formats (namespace wowlib::formats::com...
MapObjDefFlags
WMO placement flag bits (SMMapObjDef.flags).
WDL chunk binary structs (per-tile heightmaps, hole and ocean masks, low-resolution placements,...
Definition objects.hpp:17
A 3D float vector — the workhorse: positions, normals, rotations-as-Euler-degrees in placements.
Definition types.hpp:49
An axis-aligned bounding box: minimum and maximum corners.
Definition types.hpp:134
float fadeStart
The distance the fade starts at.
Definition objects.hpp:58
float fadeEnd
The distance the fade ends at.
Definition objects.hpp:61
CAaBox bounds
The transformed model's bounding box.
Definition objects.hpp:48
float radius
The visibility radius.
Definition objects.hpp:51
common::MapObjDefFlags flags
Flags; MapObjDefFlags bits.
Definition objects.hpp:32
C3Vector position
Position, in the map's placement coordinate system.
Definition objects.hpp:26
std::uint16_t scale
Scale, 1024 = 1.0.
Definition objects.hpp:41
std::uint32_t uniqueId
Unique instance id across the whole map; matches the full-resolution ADT placement.
Definition objects.hpp:23
std::uint32_t nameId
The WMO FileDataID.
Definition objects.hpp:20
std::uint16_t doodadSet
The WMO doodad set shown by this instance.
Definition objects.hpp:35
std::uint16_t nameSet
The WMO name set.
Definition objects.hpp:38
C3Vector rotation
Rotation as Euler angles, degrees.
Definition objects.hpp:29
The binary-level math and color primitives shared across WoW file formats (wowdev....