12#include <welder/vocabulary.hpp>
26 =welder::doc(
"Map header flag bits (SMMapHeader.flags).")
29 "A WMO-only map: one global map object (MWMO/MODF), "
30 "no terrain tiles.")]] = 0x1,
32 "ADTs carry MCCV vertex colors (WotLK+); with this set "
33 "every ADT of the map must have MCCV.")]] = 0x2,
35 "Terrain shader 2 (_env): 4096-byte uncompressed MCAL "
36 "alpha maps instead of 2048.")]] = 0x4,
38 [[=welder::doc(
"ADT MCRF/MCRD doodad references are sorted by size "
41 "ADTs carry the second MCLV color layer (Cata+; deprecated "
42 "and forbidden in 8.x).")]] = 0x10,
44 "Flip the ground upside down to create a "
45 "ceiling (Cata+).")]] = 0x20,
47 welder::doc(
"Unknown (MoP+); seen on Firelands2.wdt before Legion.")]] =
50 "Terrain shader 6: alpha maps are influenced by "
51 "the _h textures and MTXP (MoP+); also 4096-byte "
52 "uncompressed MCAL entries.")]] = 0x80,
54 welder::doc(
"Load _lod.adt (Legion+); implicitly sets 0x8000.")]] = 0x100,
56 "The WDT carries MAID: ADTs load by FileDataID instead of "
57 "path (8.1.0.28294+).")]] = 0x200,
58 unk_0x400 [[=welder::doc(
"Unknown.")]] = 0x400,
59 unk_0x800 [[=welder::doc(
"Unknown.")]] = 0x800,
60 unk_0x1000 [[=welder::doc(
"Unknown.")]] = 0x1000,
62 unk_0x4000 [[=welder::doc(
"Unknown.")]] = 0x4000,
64 "Affects _lod.adt rendering; implicitly set for the continent "
65 "maps (Legion+). Without it (or 0x100) distant map textures "
66 "and LOD do not render.")]] = 0x8000
80 =welder::weld_as(
"WDTHeader"),
82 =welder::doc(
"An MPHD map header, abstract over the client version. "
83 "Construct a concrete version with "
84 "WDTHeader.for_version(expansion).")
93 template <ClientVersion V>
99 =welder::doc(
"The MPHD map header: the map-wide flags; the rest of the "
100 "record is unused before 8.1.")
102 [[=welder::doc(
"Map-wide flags; MapHeaderFlags bits.")]]
106 "A legacy value the WotLK-era client reads but does not use "
107 "meaningfully; zero in shipped files.")]]
110 [[=welder::doc(
"Unused padding.")]]
111 std::array<std::uint32_t, 6>
unused{};
117 template <ClientVersion V>
requires(V >=
WdtMapFdids)
121 "The MPHD map header: the map-wide flags and the satellite-file "
122 "FileDataIDs (8.1+).")
124 [[=welder::doc(
"Map-wide flags; MapHeaderFlags bits.")]]
127 [[=welder::doc(
"FileDataID of the _lgt.wdt lights satellite, or 0.")]]
128 std::uint32_t lgtFdid = 0;
130 [[=welder::doc(
"FileDataID of the _occ.wdt occlusion satellite, or 0.")]]
131 std::uint32_t occFdid = 0;
134 "FileDataID of the _fogs.wdt volumetric-fog satellite, or 0.")]]
135 std::uint32_t fogsFdid = 0;
138 "FileDataID of the _mpv.wdt particulate-volume satellite, or 0.")]]
139 std::uint32_t mpvFdid = 0;
141 [[=welder::doc(
"FileDataID of the _tex.wdt texture-list satellite, or 0.")
143 std::uint32_t texFdid = 0;
146 "FileDataID of the map's .wdl low-resolution heightmap, or 0.")]]
147 std::uint32_t wdlFdid = 0;
149 [[=welder::doc(
"FileDataID of the map's .pd4 file, or 0.")]]
150 std::uint32_t pd4Fdid = 0;
160 template <ClientVersion V>
171 =welder::doc(
"Tile table flag bits (SMAreaInfo.flags).")
173 HasAdt [[=welder::doc(
"The tile has an ADT.")]] = 0x1,
175 "The whole tile is \"fake water\" (Cataclysm+; pre-Cata "
176 "clients read this bit as their loaded flag).")]] = 0x2,
177 Loaded [[=welder::doc(
"Runtime-only loaded marker; zero in files.")]] = 0x4
183 One MAIN tile table entry (SMAreaInfo). The table holds 64 x 64 of
184 them in row-major order (y outer, x inner).)")
186 [[=welder::doc("Tile flags; AreaInfoFlags bits.")]]
189 [[=welder::doc(
"Runtime-only async load id; zero in files.")]]
190 std::uint32_t asyncId = 0;
193 static_assert(
sizeof(SMAreaInfo) == 8);
200 One MAID per-tile FileDataID record (8.1.0.28294+): every file
201 belonging to one map tile. The table holds 64 x 64 of them in
202 row-major order (y outer, x inner); absent files are 0.)")
204 [[=welder::doc("FileDataID of mapname_xx_yy.adt (the root ADT).")]]
205 std::uint32_t rootAdt = 0;
207 [[=welder::doc(
"FileDataID of mapname_xx_yy_obj0.adt.")]]
208 std::uint32_t obj0Adt = 0;
210 [[=welder::doc(
"FileDataID of mapname_xx_yy_obj1.adt.")]]
211 std::uint32_t obj1Adt = 0;
213 [[=welder::doc(
"FileDataID of mapname_xx_yy_tex0.adt.")]]
214 std::uint32_t tex0Adt = 0;
216 [[=welder::doc(
"FileDataID of mapname_xx_yy_lod.adt.")]]
217 std::uint32_t lodAdt = 0;
219 [[=welder::doc(
"FileDataID of the mapname_xx_yy.blp map texture.")]]
220 std::uint32_t mapTexture = 0;
222 [[=welder::doc(
"FileDataID of the mapname_xx_yy_n.blp normal map texture.")]
224 std::uint32_t mapTextureN = 0;
226 [[=welder::doc(
"FileDataID of the mapxx_yy.blp minimap texture.")]]
227 std::uint32_t minimapTexture = 0;
230 static_assert(
sizeof(MapFileDataIDs) == 32);
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...
WDT version grids and per-family canonicalization pivots.