Commit graph

377 commits

Author SHA1 Message Date
Kelsi
30fbd39272 refactor(editor): extract --info-{zone,project}-density into cli_info_density.cpp
Moves the two content-density audit handlers
(--info-zone-density, --info-project-density) out of main.cpp
into a new cli_info_density.{hpp,cpp} module. Both count
creatures/objects/quests per tile to surface sparse zones
(boring) and over-stuffed ones (frame-rate bombs); the project
variant rolls per-zone numbers into a project-wide table with
per-zone averages for content-pacing reviews.

main.cpp shrinks by 201 lines (7,254 to 7,053). Both --json
output modes preserved for balance-audit pipelines.
2026-05-09 07:33:40 -07:00
Kelsi
4ec0c1aea2 feat(editor): add --gen-texture-shingles roof-tile pattern
35th procedural texture: roof shingles done as half-row-staggered
rows of rectangular tiles. Three colors: shingle base, a shadow
band at the top of each row (where the row above overlaps), and
thin vertical seams between adjacent shingles in the same row.

The half-row stagger comes from the standard roofing convention
of offsetting alternate courses by half a tile width — gives the
classic interlocked look that pure brick patterns lack.

Useful for roofs, scale armor close-ups, fish bellies, anywhere
needing tightly-packed offset rectangles. Defaults to 32x24
shingles with 4-px shadow + 1-px seams.
2026-05-09 07:30:50 -07:00
Kelsi
a25961e2dd refactor(editor): extract --info-{zone,project}-water into cli_info_water.cpp
Moves the two water-layer audit handlers (--info-zone-water,
--info-project-water) out of main.cpp into a new
cli_info_water.{hpp,cpp} module. Both aggregate liquid data
(water/ocean/magma/slime) across MH2O chunks; the project
variant rolls per-zone counts into a project-wide total with
height range and per-type histogram.

main.cpp shrinks by 209 lines (7,463 to 7,254). Both --json
output modes preserved for capacity-planning pipelines.
2026-05-09 07:28:15 -07:00
Kelsi
8d71618c28 feat(editor): add --gen-mesh-bed bedroom-prop primitive
42nd procedural mesh: 8-box bed — 4 corner legs, mattress
slab, tall headboard at the +Z end, shorter footboard at the
-Z end, and a small pillow on the mattress near the headboard.
Pairs with --gen-mesh-table / --gen-mesh-bookshelf for inn
rooms, manor bedrooms, barracks, dungeon cells.

Defaults to 2.0 × 1.2 (length × width) with 0.30 leg height
and 0.20 mattress thickness — proportions of a single bed.
Customizable per dimension so the same primitive covers
single, double, and king-size beds plus child cots.
2026-05-09 07:25:11 -07:00
Kelsi
c005396040 refactor(editor): extract --info-{zone,project}-extents into cli_info_extents.cpp
Moves the two spatial-bounds info handlers (--info-zone-extents,
--info-project-extents) out of main.cpp into a new
cli_info_extents.{hpp,cpp} module. Both compute world-space XYZ
bounding boxes from manifest tile coords + per-chunk height
samples; the project variant unions every zone's box into one.

main.cpp shrinks by 232 lines (7,695 to 7,463). Both --json
output modes preserved for camera-framing pipelines.
2026-05-09 07:22:06 -07:00
Kelsi
c572c16114 feat(editor): add --gen-texture-stained-glass voronoi pattern
34th procedural texture: cathedral / magical-window stained
glass done as a Voronoi-cell tessellation. Each pixel snaps to
its nearest seed point; pixels near a cell boundary (small
relative gap to the second-nearest seed) become the lead color
producing the leaded-glass dividers between colored regions.

Three stained colors cycle across cells (cellIdx % 3) for a
balanced palette without per-cell color authoring. Defaults to
32 cells in 256x256, using ratio-based boundary detection so
lead-line thickness scales naturally with cell density.

Useful for cathedral windows, mage tower decals, magical
portals, ritual circle backdrops.
2026-05-09 07:19:02 -07:00
Kelsi
3009f406f8 refactor(editor): extract --info-{zone,project}-bytes into cli_info_bytes.cpp
Moves the two disk-byte audit handlers (--info-zone-bytes,
--info-project-bytes) out of main.cpp into a new
cli_info_bytes.{hpp,cpp} module. Both categorize files by
extension into open / proprietary / derived buckets — the
project-wide variant is the headline metric for tracking
the open-format migration's progress against the .m2/.wmo/
.blp/.dbc baseline.

main.cpp shrinks by 244 lines (7,939 to 7,695). Both --json
output modes preserved for machine-readable reports.
2026-05-09 07:16:27 -07:00
Kelsi
6c9edc8130 feat(editor): add --gen-mesh-lamppost urban-prop primitive
41st procedural mesh: 4-box urban lighting fixture — square
base plinth, tall thin vertical pole, lantern body box around
the pole top (overlaps so the lamp visually caps the pole),
and a slightly-wider cap plate that reads as an awning.

Useful for streets, plazas, courtyards, taverns — anywhere
that wants explicit lighting fixtures without modeling each
one by hand. Defaults to 3-meter pole + 0.5-meter lantern
(~3.6m total). Customizable per dimension to cover everything
from candlestick-stands to tall ornate streetlamps.
2026-05-09 07:12:46 -07:00
Kelsi
7950648943 refactor(editor): extract --info-{zone,project}-tree into cli_info_tree.cpp
Moves the two tree-style content browser handlers
(--info-zone-tree, --info-project-tree) out of main.cpp into
a new cli_info_tree.{hpp,cpp} module. Both render
Unix-`tree`-style hierarchical views — one drilling into a
single zone (manifest, tiles, creatures, objects, quests,
files) and one giving a bird's-eye view of every zone in a
project with bake/viewer status.

main.cpp shrinks by 201 lines (8,140 to 7,939). The remaining
info-zone/-project-* pairs (bytes, extents, water, density,
audio) form the next natural extraction batch.
2026-05-09 07:10:12 -07:00
Kelsi
b783a62289 feat(editor): add --gen-texture-scales overlapping-circle pattern
33rd procedural texture: fish / dragon / chain mail scales done
as a half-row-staggered grid of circles whose centers sit at the
bottom-center of each cell. Adjacent rows offset by half a cell
width, with circle radius slightly larger than half the cell, so
the circles interlock into the classic overlapping-scale look.

Three colors: background fills the gaps, scale body fills most of
each circle, and a rim color highlights the top arc to give the
raised / armored feel.

Defaults to 24×16 cells; scaled by cellW × cellH for fine control
of scale density. Useful for chain mail, dragonhide, fish skin,
roof shingles, anywhere needing tiled curved scales.
2026-05-09 07:06:29 -07:00
Kelsi
e128d91d66 refactor(editor): extract WOB/WHM/WOC IO into cli_world_io.cpp
Moves all six world-asset interchange handlers (--export-wob-glb,
--export-wob-obj, --import-wob-obj, --export-whm-glb,
--export-whm-obj, --export-woc-obj) out of main.cpp into a new
cli_world_io.{hpp,cpp} module. WOB / WHM / WOC are our open
replacements for proprietary WMO / ADT-heightmap / ADT-collision
data; these are the bridge that lets the open formats round-trip
through Blender, MeshLab, Three.js, and the rest of the standard
3D toolchain.

main.cpp shrinks by 858 lines (8,997 to 8,140). The single-mesh
--import-obj handler stays inline for now -- it shadow-mirrors
cli_wom_io's --import-stl semantics and will move there next.
2026-05-09 07:03:14 -07:00
Kelsi
61bc9dfb15 feat(editor): add --gen-mesh-table furniture primitive
40th procedural mesh: simple 5-box table — flat top slab on
4 vertical corner legs. Pairs with --gen-mesh-bench /
--gen-mesh-throne / --gen-mesh-bookshelf for taverns,
dining halls, libraries, and study set dressing.

Defaults to 1.6 × 1.0 base × 0.85 tall, 0.10-square legs,
0.06-thick top — sensible dining-table proportions.
Customizable per dimension so a single primitive covers
desks, end tables, and big banquet tables.
2026-05-09 06:58:38 -07:00
Kelsi
b59c310742 refactor(editor): extract WOM <-> OBJ/GLB/STL into cli_wom_io.cpp
Moves the four WOM interchange-format handlers (--export-obj,
--export-glb, --export-stl, --import-stl) out of main.cpp into
a new cli_wom_io.{hpp,cpp} module. WOM is our open M2
replacement; these are the bridge that lets it round-trip
through every external 3D tool — Blender, Three.js, slicers,
CAD packages — so the open format is actually useful.

main.cpp shrinks by 467 lines (9,464 to 8,997). The five WOB
and WHM exporters (--export-wob-glb, --export-whm-glb, etc.)
remain inline for a follow-up extraction.
2026-05-09 06:55:00 -07:00
Kelsi
c1f3d5aba4 feat(editor): add --gen-texture-herringbone chevron pattern
32nd procedural texture: classic V-shaped herringbone done as
horizontal strips of parallel slanted lines whose slant
direction flips every strip. Implementation is a per-pixel
shear: shifting x by the row's local-y collapses each diagonal
into a vertical band in shifted-x space, so a single modulo
picks line vs background.

Useful for parquet floors, brick patios, fabric weaves, fish
scale-style chain mail, anywhere needing a strong directional
pattern. Two-color, defaults to 32-px strips with 12-px line
spacing and 4-px line width.
2026-05-09 06:49:29 -07:00
Kelsi
9362623297 refactor(editor): extract GLB inspectors into cli_glb_inspect.cpp
Moves all 4 GLB introspection handlers (--validate-glb /
--info-glb shared, --info-glb-tree, --info-glb-bytes,
--check-glb-bounds) out of main.cpp into a new
cli_glb_inspect.{hpp,cpp} module. GLB is our open replacement
for proprietary M2/WMO bake outputs, so these belong with the
other open-format tooling.

main.cpp shrinks by 657 lines (10,121 to 9,464). Every
handler preserves its --json output mode for machine-readable
reports.
2026-05-09 06:46:02 -07:00
Kelsi
ecb97428aa feat(editor): add --gen-mesh-bookshelf cabinet primitive
39th procedural mesh: 5-panel cabinet (back / left / right /
top / bottom) divided into N bays by N-1 horizontal shelves,
with rows of pseudo-random book boxes on each level. Book
widths and heights vary per bay (seeded by bay index so
re-generating the same shelf gives the same layout) so the
result reads as a stocked library instead of a perfect grid.

Defaults to 1.5x2.0x0.4 with 4 shelves (~72 books). Useful
for studies, libraries, mage towers, anywhere that needs
filled-out furniture set dressing.
2026-05-09 06:39:39 -07:00
Kelsi
06a4fdb60f refactor(editor): extract interop --validate-* into cli_validate_interop.cpp
Moves the four structural validators for INTEROP file formats
(--validate-stl, --validate-png, --validate-blp, --validate-jsondbc)
out of main.cpp into a new cli_validate_interop.{hpp,cpp} module.
These check files coming in/out of wowee from third-party tools,
distinct from cli_format_validate.cpp which validates the native
open formats (WOM, WOB, WOC, WHM).

main.cpp shrinks by 524 lines (10,644 to 10,121). Each validator
preserves its --json output mode for machine-readable reports.
2026-05-09 06:36:02 -07:00
Kelsi
8cd6f46aa3 feat(editor): add --gen-texture-argyle sweater-knit pattern
31st procedural texture: classic argyle pattern done by working
in a 45-rotated coord system (u, v) = (x+y, x-y) so lozenges
become axis-aligned squares for the checkerboard step. Diagonal
stitch lines fall out of u%cell and v%cell crossing zero.

Three-color: A/B for the alternating diamond fill, third color
for the diagonal stitch overlay. Defaults to 64-pixel cells with
2-pixel stitches. Useful for sweater fabric, seat cushions,
heraldic banner overlays.
2026-05-09 06:29:16 -07:00
Kelsi
0d2312ec8d refactor(editor): extract single-file --convert-* into cli_convert_single.cpp
Moves the five single-file format converters (--convert-m2,
--convert-wmo, --convert-dbc-json, --convert-json-dbc,
--convert-blp-png) out of two dedicated post-loop blocks in
main.cpp into a new cli_convert_single.{hpp,cpp} module. The
batch wrappers in cli_convert.cpp keep working — they shell
out to wowee_editor with these flags.

main.cpp shrinks by ~335 lines (10,979 → 10,644). The two
trailing for-loops were dead code after wiring the dispatcher
into the main loop, so they're gone too.
2026-05-09 06:25:04 -07:00
Kelsi
2658e8297a feat(editor): add --gen-mesh-coffin hexagonal-prism primitive
38th procedural mesh: classic 6-sided coffin with the
narrow-head / wide-shoulder / tapered-foot top-down profile
that's instantly recognizable from any angle. Built as 6 side
quads + top lid fan + bottom panel fan, all with face-shared
normals so it shades cleanly under any lighting.

Pairs with --gen-mesh-grave for graveyard set dressing.
Defaults to 2.0×0.8×0.6 (length × shoulder-width × height).
2026-05-09 06:18:42 -07:00
Kelsi
f0bbc228ef refactor(editor): extract --migrate-* handlers into cli_migrate.cpp
Moves the four schema-migration handlers (--migrate-wom,
--migrate-zone, --migrate-project, --migrate-jsondbc) out of
main.cpp into a new cli_migrate.{hpp,cpp} module. Same
behavior — they're idempotent in-place upgraders for older
WOM revisions and JSON DBC sidecar schemas. main.cpp shrinks
by 282 lines (11,261 → 10,979).
2026-05-09 06:13:41 -07:00
Kelsi
8fd6df6113 feat(editor): add --gen-texture-tartan plaid pattern
3-color crossing-band pattern: 6-band repeat sequence (A A B
C C B) per axis, with the pixel color at any position being
the average of the horizontal-band and vertical-band colors.
That averaging at intersections produces the characteristic
diamond grid of Scottish tartans without explicit "weave"
math — the band overlap pattern just falls out.

Defaults: bandPx=32 (repeat=192px). Useful for clan banners,
kilts, blanket textures, fabric set dressing. Brings the
procedural texture pattern set to 33.
2026-05-09 06:02:13 -07:00
Kelsi
d03c2dad1f refactor(editor): extract zone/project mesh-bake handlers into cli_bake.cpp
Moves the 3D-export bake handlers out of main.cpp:
  --bake-zone-glb     --bake-zone-stl     --bake-zone-obj
  --bake-project-obj  --bake-project-stl  --bake-project-glb

The STL + GLB project bakes share a combined dispatcher (one
function with internal STL-vs-GLB branching) since they walk
the same per-zone asset list and only differ in the output
emission code.

main.cpp drops 12,119 → 11,261 lines (-858). The combined-OR
opener spanning multiple lines created a parse-error fragment
in the extraction; caught + manually fixed before commit
(same pattern as the WOM info attachments/particles/sequences
extraction).
2026-05-09 05:57:25 -07:00
Kelsi
b75924762e feat(editor): add --gen-mesh-throne regal-seat primitive
5-box composite: low pedestal slab + seat block + tall
vertical backrest at -Z + 2 small armrests on the +X/-X
sides. Pedestal is wider than the seat for a stable
foundation, seat thickness is 30% of total seat height.

Defaults: seatW=0.8, seatH=0.5, backH=1.5, pedSize=1.2.
Useful for throne rooms, hero seats, judgement halls,
royal court set dressing. Brings the procedural mesh
primitive set to 37.
2026-05-09 05:50:23 -07:00
Kelsi
a4d282b588 refactor(editor): extract 9 export handlers + sha256 helper into cli_export.cpp
Moves the report-export handlers (md / csv / html / sha256 /
graphviz) for zone & project audits out of main.cpp:
  --export-zone-summary-md       --export-zone-csv
  --export-zone-checksum         --export-project-checksum
  --validate-project-checksum    --export-zone-html
  --export-project-html          --export-project-md
  --export-quest-graph

Also moves the file-scope wowee_sha256 namespace (the SHA-256
implementation that the checksum exporters use) into the new
module's anonymous namespace — it had no other callers in
main.cpp so no cross-TU coupling needed.

main.cpp drops 13,120 → 12,119 lines (-1,001). Build error
during extraction (missing #include <unordered_set>) caught
and fixed.
2026-05-09 05:45:00 -07:00
Kelsi
e95dd7692b feat(editor): add --gen-texture-flame fire pattern
Vertical color gradient from dark (bottom) to hot (top), mixed
with multi-octave smooth noise so the flame boundary wavers
randomly rather than reading as a clean horizontal line.
Vertical position curve is squared so the dark stays dark
longer and the hot saturates faster — matches real-flame
appearance where most of the body is dark with a bright tip.

Useful for torches, braziers, magical effects, lava-zone set
dressing, fireplace texture details. Brings the procedural
texture pattern set to 32.
2026-05-09 05:38:18 -07:00
Kelsi
c9831b38ff refactor(editor): extract data-tree inspection into cli_extract_info.cpp
Moves the four extracted-Data-tree audit handlers out of main:
  --info-extract           (per-extension counts + bytes)
  --info-extract-tree      (per-directory rollup)
  --info-extract-budget    (proprietary share + open-format gap)
  --list-missing-sidecars  (find unconverted .m2/.wmo/.blp/.dbc)

All four operate on a Blizzard-format extracted Data tree —
they audit what's there and what's missing in the migration
from proprietary formats to open ones.

main.cpp drops 13,485 → 13,120 lines (-365). Behavior verified
by re-running --info-extract on a test zone (same output).
2026-05-09 05:32:27 -07:00
Kelsi
9973da07ab feat(editor): add --gen-mesh-cage prison-cell primitive
Square cage frame: top + bottom thin slabs + 4 corner posts
(thicker than bars) + N evenly-spaced bars per side. Bars on
each side span perpendicular to that side's plane so the
cage reads as enclosed from any viewing angle.

Defaults: width=1.5, height=2.0, barsPerSide=5, barR=0.04.
Useful for prison cells, animal pens, dungeon set dressing,
caged exhibits. Brings the procedural mesh primitive set to 36.
2026-05-09 05:25:39 -07:00
Kelsi
59ae675b78 refactor(editor): extract 5 item read-only handlers into cli_items.cpp
Moves the items.json read-only inspection handlers out of
main.cpp:
  --list-items            --info-item
  --validate-items        --validate-project-items
  --info-project-items

Item editing handlers (--add-item, --set-item, --remove-item,
--add-quest-reward-item) stay in main.cpp since they share
state with quest reward editing logic and would need a
broader extraction.

main.cpp drops 13,887 → 13,485 lines (-402). Behavior
verified by re-running --list-items on a non-items zone
(same error message).
2026-05-09 05:19:04 -07:00
Kelsi
b2cc1b7523 feat(editor): add --gen-texture-coral branching reef pattern
Water-color background with N branching coral structures
that grow from the bottom edge upward. Each branch walks a
curved path (random angle drift) drawing a thick stroke,
splitting into thinner sub-branches at random intervals so
the result reads as organic coral rather than straight lines.

Iterative stack-based growth (no recursion) with split cap
at 256 to bound runtime. Defaults: branchCount=12, seed=1.
Useful for underwater zones, ocean floor, mer-people set
dressing, swamp coral fungi. Brings the procedural texture
pattern set to 31.
2026-05-09 05:11:40 -07:00
Kelsi
83c7fd9bee refactor(editor): extract 8 spawn/snap handlers into cli_spawn_audit.cpp
Moves the NPC spawn / object placer audit + ground-snap
handlers out of main.cpp:
  --snap-zone-to-ground       --snap-project-to-ground
  --audit-zone-spawns         --audit-project-spawns
  --list-zone-spawns          --list-project-spawns
  --diff-zone-spawns          --info-spawn

All operate on creatures.json + objects.json sidecars and
the WHM terrain heightfield via WoweeTerrainLoader.

main.cpp drops 14,628 → 13,887 lines (-741). Behavior verified
by re-running --audit-zone-spawns on a test zone (PASSED with
0 issues, same as before).
2026-05-09 05:05:22 -07:00
Kelsi
47e78d4e08 feat(editor): add --gen-mesh-totem stacked carved totem primitive
Stack of N square blocks with alternating widths: even-indexed
blocks (0, 2, 4...) get full base width, odd blocks (1, 3, 5...)
get 70% — gives the carved-segment look characteristic of
totem poles.

Defaults: baseW=0.5, 5 segments, segH=0.5. Useful for tribal
zones, druid groves, fairgrounds, primitive village markers.
Brings the procedural mesh primitive set to 35.
2026-05-09 04:57:33 -07:00
Kelsi
a23eb420ef refactor(editor): move --info-quests and --info-objects into cli_content_info.cpp
Picks up two stragglers that should have been part of the
content-info family extraction in c519ee3 — they were earlier
in main.cpp (lines 1079, 1139) than the contiguous block I
extracted, so the prior pass missed them. Moving them now
puts the entire creature/object/quest inspection family in
one translation unit (18 handlers total).

main.cpp drops 14,732 → 14,628 lines (-104). Behavior
verified by re-running --info-quests on a non-zone path
(same error message).
2026-05-09 04:50:26 -07:00
Kelsi
3e3ba5012b feat(editor): add --gen-texture-circuit sci-fi PCB pattern
Solid PCB background plus N traces that walk the surface in
orthogonal Manhattan style — each trace alternates random
horizontal + vertical segments (3-6 segments per trace,
8-32 px each), with a 3×3 "via" dot at every corner so the
routing reads as intentional rather than random scribbles.

Defaults: traceCount=24, seed=1. Useful for sci-fi panels,
hacker zones, magitek/arcanocore set dressing, robot
texture details. Brings the procedural texture pattern set
to 30.
2026-05-09 04:42:31 -07:00
Kelsi
3967c8de57 refactor(editor): extract 10 diff handlers into cli_diff.cpp
Moves the file-comparison handlers out of main.cpp into their
own translation unit:
  --diff-wcp        --diff-zone
  --diff-glb        --diff-wom
  --diff-wob        --diff-whm
  --diff-woc        --diff-jsondbc
  --diff-extract    --diff-checksum

main.cpp drops 15,653 → 14,732 lines (-921). One build error
during extraction (missing #include for NpcSpawner /
ObjectPlacer / QuestEditor used by --diff-zone) caught by
build and fixed.
2026-05-09 04:35:08 -07:00
Kelsi
887dce647e feat(editor): add --gen-mesh-shrine canopy primitive
6-component composite: square base slab + 4 cylindrical
pillars (12-segment, inset by pillarR so they sit fully on
the base) + flat roof slab on top with 5% overhang past the
base footprint. Pillars + roof create an open canopy.

Defaults: size=1.5, pillarH=2, pillarR=0.1, roofT=0.15.
Useful for wayside shrines, gazebos, well covers, market
stalls, religious altars in temples. Brings the procedural
mesh primitive set to 34.

Milestone: kArgRequired entries reaches 300.
2026-05-09 04:25:52 -07:00
Kelsi
5f37221179 refactor(editor): extract data-tree audit/migration into cli_data_tree.cpp
Moves the seven proprietary-data-tree handlers out of main.cpp:
  --migrate-data-tree         --bench-migrate-data-tree
  --list-data-tree-largest    --export-data-tree-md
  --info-data-tree            --strip-data-tree
  --audit-data-tree

All operate on a Blizzard-format extracted Data tree (the .m2/
.skin/.wmo/.blp/.dbc files) — they audit, migrate, or strip
proprietary-format files in support of the open-format
migration story.

Original placement spanned two sub-blocks (12546-12892 and
13093-13417 in main.cpp) interrupted by --gen-texture and
--add-texture-to-zone in the middle. Extraction collapses
both sub-blocks into one cohesive translation unit.

main.cpp drops 16,321 → 15,653 lines (-668). Behavior verified
by re-running --info-data-tree against a missing directory.
2026-05-09 04:14:32 -07:00
Kelsi
4df8661017 feat(editor): add --gen-texture-rust oxidized-metal pattern
3-octave smooth noise field thresholded by `coverage` to make
rust blob regions, blended with the metal base color via a
0.12-wide smoothstep so patches feather into clean metal
rather than stepping. Per-pixel grain jitter on top so neither
material reads as flat.

Defaults: coverage=0.4 (~40% rust), seed=1. Useful for
weathered armor, abandoned machinery, ruined castle gates,
shipwreck debris. Brings the procedural texture pattern
set to 29.
2026-05-09 04:01:49 -07:00
Kelsi
67ede85f7f refactor(editor): extract zone/project metadata info into cli_zone_info.cpp
Moves the three zone & project metadata inspection handlers
out of main.cpp:
  --info-zone              (single zone.json print)
  --info-zone-overview     (high-level zone digest)
  --info-project-overview  (per-zone summary table for a project)

All three load zone.json via wowee::editor::ZoneManifest.

main.cpp drops 16,564 → 16,321 lines (-243). Behavior verified
by re-running --info-zone + --info-project-overview against
existing test zones.
2026-05-09 03:52:44 -07:00
Kelsi
0a5f508f4e feat(editor): add --gen-mesh-bench wooden bench primitive
Three-box composite: long thin seat plank on top + 2 leg
slabs at the ends (positioned at 90% along the bench length
to leave a small overhang on each side). Legs are vertical
Y-aligned slabs spanning the full height from floor to
bottom-of-seat, ~5% of bench length thick.

Defaults: length=1.5, seatY=0.5, seatT=0.06, seatW=0.4. Useful
for taverns, plazas, roadside rest stops, council halls.
Brings the procedural mesh primitive set to 33.
2026-05-09 03:43:11 -07:00
Kelsi
c519ee3e99 refactor(editor): extract creature/object/quest info into cli_content_info.cpp
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Moves 16 contiguous content-inspection handlers out of main.cpp:

  --info-creatures              --info-creatures-by-faction
  --info-creatures-by-level     --info-objects-by-path
  --info-objects-by-type        --info-quests-by-level
  --info-quests-by-xp           --list-creatures
  --list-objects                --list-quests
  --list-quest-objectives       --list-quest-rewards
  --info-quest-graph-stats      --info-creature
  --info-quest                  --info-object

All read JSON sidecars (creatures.json, objects.json, quests.json)
via wowee::editor::{NpcSpawner, ObjectPlacer, QuestEditor} loaders.

main.cpp drops 17,505 → 16,564 lines (-941). Behavior verified
by running --info-creatures (correctly fails with same parse-
error message on a non-zone path).
2026-05-09 03:33:40 -07:00
Kelsi
6b1b901bc5 feat(editor): add --gen-texture-mosaic 3-color tile pattern
Per-cell hash picks one of 3 colors for each square tile, with
1-pixel black grout on the top + left edges of every cell so
tiles read as physically separated. Exit log breaks down how
many tiles got each color so callers can verify the seed
distribution.

Defaults: tilePx=16, seed=1. Useful for cathedral floors,
stained-glass set dressing, ornate plaza paving. Brings the
procedural texture pattern set to 28.
2026-05-09 03:23:01 -07:00
Kelsi
f283ab2ce7 refactor(editor): extract WCP pack handlers into cli_pack.cpp
Moves the six WoWee Content Pack (.wcp) handlers out of
main.cpp:
  --list-wcp           --info-wcp
  --info-pack-budget   --info-pack-tree
  --pack-wcp           --unpack-wcp

All six defer to wowee::editor::ContentPacker for actual pack
I/O; the handlers just parse args and format output, so the
extraction has no behavioral impact on the pack format itself.

main.cpp drops 17,766 → 17,505 lines (-261). Behavior verified
by re-running --info-wcp on a missing file (same error message).
2026-05-09 03:12:09 -07:00
Kelsi
dab7705c0f feat(editor): add --gen-mesh-grave tombstone primitive
Two-box composite: a wider low base + a vertical tablet
centered on top. Base is deeper than tablet (1.5×) and base
height is 20% of tablet height — proportions that read as a
stable foundation supporting an upright stone.

Defaults: tablet 0.6×1.0×0.15, base width 0.8. Useful for
graveyards, undead zones, memorial set dressing, ruined
chapel courtyards. Brings the procedural mesh primitive set
to 32.
2026-05-09 03:00:19 -07:00
Kelsi
08e7d9c689 refactor(editor): extract format inspection handlers into cli_format_info.cpp
Moves the proprietary-format inspection commands out of main.cpp
into their own translation unit. Each reads a Blizzard-format
file and prints its structure:

  --info-png        --info-blp
  --info-m2         --info-wmo
  --info-adt        --info-jsondbc

main.cpp drops 18,198 → 17,766 lines (-432). Behavior verified
by re-running --info-png on a generated noise texture.
2026-05-09 02:48:58 -07:00
Kelsi
9890429e3c feat(editor): add --gen-texture-vines climbing-plant pattern
Solid wall background plus N vine paths that walk upward from
the bottom edge with a smooth cosine drift + tiny per-step
horizontal jitter. Each vine paints 2 pixels wide on every row
it visits so the trail reads as a thin band rather than a
single-pixel line.

Defaults: vineCount=8, seed=1. Useful for ruined castle walls,
overgrown ruins, jungle temple textures, ivy-covered facades.
Brings the procedural texture pattern set to 27.
2026-05-09 02:37:06 -07:00
Kelsi
98c7621e1d refactor(editor): extract batch convert handlers into cli_convert.cpp
Moves the four bulk format-conversion handlers out of main.cpp:
  --convert-m2-batch    (M2 → WOM)
  --convert-wmo-batch   (WMO → WOB)
  --convert-blp-batch   (BLP → PNG)
  --convert-dbc-batch   (DBC → JSON)

These all share the same pattern: walk srcDir recursively for
files of the input extension and fan out to the single-file
--convert-* counterpart via subprocess (preserving the existing
per-file logic as the source of truth, no duplication).

Single-file converters (--convert-m2, --convert-wmo, etc.) and
the --migrate-* meta-commands still live in main.cpp; they're
in dedicated argv-rescan loops that need a different extraction
approach.

main.cpp drops 18,396 → 18,198 lines (-198). Behavior verified
by re-running --convert-blp-batch with a missing directory and
confirming the same error message.
2026-05-09 02:25:05 -07:00
Kelsi
0c1f873029 feat(editor): add --gen-mesh-banner pole + flag primitive
Composite banner: 12-segment vertical pole cylinder with top
and bottom caps + a rectangular flag attached at the top of
the pole, draped along -Z. The flag is two-sided (front faces
+X, back faces -X) so it reads from both viewing angles
without needing backface-culling-disabled materials.

Defaults: poleH=3, poleR=0.05, flagW=0.8, flagH=1.2. Useful
for guild halls, faction territory markers, military camps,
parade dressing. Brings the procedural mesh primitive set
to 31.
2026-05-09 02:10:23 -07:00
Kelsi
b87ece2d5b refactor(editor): extract format validation into cli_format_validate.cpp
Moves the open-format validation + project-audit handlers out
of main.cpp:

  --validate                    --validate-wom
  --validate-wob                --validate-woc
  --validate-whm                --validate-all
  --validate-project            --validate-project-open-only
  --audit-project               --bench-audit-project
  --bench-validate-project

Also moves the four shared validate*Errors helpers (validateWom/
Wob/Woc/WhmErrors, ~365 lines) into the same module's anonymous
namespace — they were file-scope helpers in main.cpp used only
by these handlers, so co-locating eliminates the cross-TU
coupling.

main.cpp drops 19,446 → 18,396 lines (-1,050). Two build errors
caught during extraction (wrong include path for the WHM loader
header; missing #include for ContentPacker / std::set / std::map);
all fixed before commit.
2026-05-09 01:57:37 -07:00
Kelsi
2d81bc9f6b feat(editor): add --gen-texture-stars night-sky pattern
Solid background fill plus randomly placed stars at varied
brightness — most stars dim (30-65% blend toward star color),
occasional bright stars (85-100% blend) — so the sky reads
with depth rather than as uniform noise. Exit log breaks down
how many bright vs faint stars actually landed.

Defaults: density=0.005 (~0.5% of pixels become stars), seed=1.
Useful for skybox top-faces, distant night sky planes, magical
constellation set dressing. Brings the procedural texture
pattern set to 26.
2026-05-09 01:32:08 -07:00