Commit graph

2 commits

Author SHA1 Message Date
Kelsi
cf886ec94b feat(editor): add WMNL JSON round-trip (--export/--import-wmnl-json)
Plain-shape JSON sidecar — WMNL has no enum fields to
coerce, just positional + textual data: levelIndex
(uint8), minZ/maxZ (floats), texturePath/displayName
(strings). Float-precise round-trip preserved (the
Stormwind/Dalaran/Undercity Z-range boundaries don't
have any rounding artifacts since they were authored
as integer-multiple values like 80.0, 130.0, 200.0).

All 3 presets (Stormwind/Dalaran/Undercity, 3+4+5 = 12
levels total across the city stack) byte-identical
roundtrip OK. CLI flag count 1196 -> 1198.
2026-05-10 02:04:47 -07:00
Kelsi
d49080db92 feat(editor): add WMNL (Minimap Multi-Level) — 110th open format
Novel replacement for the WorldMapTransforms.dbc +
WorldMapOverlay.dbc pair vanilla used to describe zones
with multiple vertical layers visible on the minimap
(Stormwind has Old Town / Cathedral / Keep at three
altitudes; Dalaran has Sewers / Street / Above Street /
Floating; Undercity has 5 distinct levels Sewer to
Throne Room). Each entry binds one (mapId, areaId,
levelIndex) triplet to a Z-range, minimap layer texture,
and display label.

The catalog acts as a per-level overlay on top of WMPX
world-map mappings: at every camera tick, the minimap
renderer queries findContainingZ(playerZ) to swap the
overlay layer when the player crosses a floor boundary.

Three preset emitters one per layered city: makeStormwind
(3 levels), makeDalaran (4 levels), makeUndercity (5
levels — deepest stack). Z-ranges abut precisely to
ensure clean transitions: Sewer Z[-110, -85), Canal
Z[-85, -65), Outer Ring Z[-65, -45), Inner Ring Z[-45,
-20), Throne Z[-20, 30) — half-open intervals so the
boundary Z value belongs to the upper level.

Validator's most novel checks combine grouping +
geometric constraints unique to multi-level layouts:
- per-area levelIndex uniqueness (no two levels at the
  same index — picker UI would show duplicate slot)
- per-area Z-range non-overlap (overlapping ranges
  would cause minimap-flicker as the player crosses
  the overlap region; the renderer can't decide which
  layer to display)
Plus the standard: id+name+areaId required, minZ<maxZ
(non-empty range), no duplicate levelIds.

Format count 109 -> 110. CLI flag count 1191 -> 1196.
2026-05-10 02:03:43 -07:00