Commit graph

20 commits

Author SHA1 Message Date
Kelsi
60c26a17aa Fix audio playback not stopping when Stop button clicked
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
Use spawn context for clean subprocess isolation and add kill() fallback
after terminate() to ensure the audio process is reliably stopped.
2026-02-23 22:26:17 -08:00
Kelsi
55faacef96 Add M2/WMO 3D viewer with textured rendering, animation, and audio playback
- New tools/m2_viewer.py: Pygame/OpenGL viewer for M2 models (textured
  rendering, skeletal animation, orbit camera) and WMO buildings
- M2 viewer: per-batch texture mapping, CPU vertex skinning, animation
  playback with play/pause/speed controls, wireframe overlay toggle
- WMO viewer: root+group file parsing (MOTX/MOMT/MOVT/MOVI/MONR/MOTV/MOBA),
  per-batch material rendering with BLP textures
- Asset browser: "Open 3D Viewer" buttons for M2 and WMO previews,
  audio Play/Stop buttons using pygame.mixer in subprocess
- Handles both WotLK (v264) and Vanilla (v256) M2 formats
2026-02-23 22:22:39 -08:00
Kelsi
edf0a40759 Fix asset browser BLP errors, M2 wireframes, and add anim filter
- BLP: blp_convert takes one arg, not two; was passing an output path
  that caused conversion failures
- M2: vertex header offsets were wrong (used 80/100 instead of 60/68),
  producing garbage vertex counts that failed the sanity check
- Add "Hide .anim/.skin" checkbox (on by default) to filter ~30k
  companion files from the directory tree
2026-02-23 20:51:33 -08:00
Kelsi
6e2d51b325 Fix asset browser hanging on launch with large manifests
Manifest keys use backslashes but tree splitting used forward slashes,
causing all 241k entries to land at root level. Combined with O(N)
any(startswith) checks per entry, this produced an O(N^2) hang. Re-key
manifest by the forward-slash 'p' field and build a directory index in
a single O(N) pass so tree operations are O(1) lookups.
2026-02-23 20:45:19 -08:00
Kelsi
739ae5b569 Add Asset Browser tab to pipeline GUI with inline previews
New tab lets users explore extracted assets visually: BLP textures
rendered via blp_convert+Pillow, M2/WMO wireframes with mouse-drag
rotation and zoom, DBC/CSV tables with named columns from
dbc_layouts.json, ADT heightmap grids, text file viewer, audio
metadata, and hex dumps. Directory tree lazy-loads from manifest.json
with search and file-type filtering.
2026-02-23 20:35:32 -08:00
Kelsi
f95770720f Fix security, bugs, and UX in asset pipeline GUI
- Fix zip slip vulnerability: validate extracted paths stay within target
- Fix redundant mkdir before rmtree in rebuild_override()
- Add build/asset_extract and Windows .ps1 fallback to extractor search
- Preserve pack list selection across refreshes
- Add Cancel Extraction button with process.terminate()
- Run override rebuild in background thread to avoid UI freeze
- Fix locale combobox state to readonly
- Add asset_pipeline/ to .gitignore
- Make script executable
2026-02-23 20:06:41 -08:00
Kelsi
20dd5ed63b Add cross-platform Python asset pipeline GUI 2026-02-23 20:03:07 -08:00
Kelsi
f66b9eb154 Fix macOS build process and make shell scripts cross-platform
- Add vulkan-loader, vulkan-headers, shaderc to macOS CI brew install
- Add vulkan-loader and shaderc to macOS PKG_CONFIG_PATH
- Replace Linux-only `nproc` with portable fallback in build.sh,
  rebuild.sh, extract_assets.sh, and tools/backup_assets.sh
- Replace `ldconfig` StormLib check with portable detection
  (ldconfig, pkg-config, brew lib) in extract_assets.sh
- Update BUILD_INSTRUCTIONS.md macOS section with vulkan/shaderc
  packages and MoltenVK explanation
- Add macOS prerequisites to README.md
2026-02-23 18:35:53 -08:00
Kelsi
610ed71922 Opcode registry: move to generated canonical+alias pipeline
Introduce data-driven opcode registry with canonical and alias sources:

- Added Data/opcodes/canonical.json as the single canonical LogicalOpcode set.

- Added Data/opcodes/aliases.json for cross-core naming aliases (CMaNGOS/AzerothCore/local legacy).

Added generator and generated include fragments:

- tools/gen_opcode_registry.py emits include/game/opcode_enum_generated.inc, include/game/opcode_names_generated.inc, and include/game/opcode_aliases_generated.inc.

- include/game/opcode_table.hpp now consumes generated enum entries.

- src/game/opcode_table.cpp now consumes generated name and alias tables.

Loader canonicalization behavior:

- OpcodeTable::nameToLogical canonicalizes incoming JSON opcode names via alias table before enum lookup, so implementation code stays stable while expansion maps can use different core spellings.

Validation and build integration:

- Added tools/validate_opcode_maps.py to validate canonical contract across expansions.

- Added CMake targets opcodes-generate and opcodes-validate.

- wowee target now depends on opcodes-generate so generated headers stay current.

Validation/build run:

- cmake -S . -B build

- cmake --build build --target opcodes-generate opcodes-validate

- cmake --build build -j32
2026-02-20 03:02:31 -08:00
Kelsi
9fc41d6f30 Add asset backup script with zstd/pigz/gzip fallback 2026-02-15 04:25:56 -08:00
Kelsi
d7e2b26af7 Unify asset system: one asset set, always high-res
Remove HDPackManager, expansion overlay manifests, and BLP size-comparison
logic. Assets now resolve through a single manifest with a simple override
directory (Data/override/) for future HD upgrades.
2026-02-15 04:18:34 -08:00
Kelsi
a67dca5787 Add overlay extraction for multi-expansion asset deduplication
Extracts each expansion's assets as a CRC-compared overlay against a
base manifest, storing only files that differ. Auto-detects overlay mode
when a base manifest already exists. Adds --as-overlay, --full-base
flags and manifest merge for partial extractions.
2026-02-14 03:09:17 -08:00
Kelsi
03013e751a Cache WoW.exe during asset extraction for Warden MEM_CHECK 2026-02-14 02:17:50 -08:00
Kelsi
886f4daf2e Add per-expansion asset overlay system and fix CharSections DBC layout
Expansion overlays allow each expansion to supplement the base asset data
via an assetManifest field in expansion.json, loaded at priority 50 (below
HD packs). The asset extractor gains --reference-manifest for delta-only
extraction. Also fixes CharSections field indices (VariationIndex=4,
ColorIndex=5, Texture1=6) across all DBC layout references.
2026-02-14 00:00:26 -08:00
Kelsi
492703be36 Auth: include CRC in legacy proof; extend Turtle integrity set 2026-02-13 01:41:59 -08:00
Kelsi
5435796a98 Add integrity hash support and SRP tuning options 2026-02-13 01:32:15 -08:00
Kelsi
6a44f02e0c Add authenticator opcode support + auth_probe tool 2026-02-13 00:55:36 -08:00
Kelsi
f247d53309 Add expansion DBC CSVs, Turtle support, and server-specific login 2026-02-13 00:10:01 -08:00
Kelsi
7092844b5e Add multi-expansion support with data-driven protocol layer
Replace hardcoded WotLK protocol constants with a data-driven architecture
supporting Classic 1.12.1, TBC 2.4.3, and WotLK 3.3.5a. Each expansion
has JSON profiles for opcodes, update fields, and DBC layouts, plus C++
polymorphic packet parsers for binary format differences (movement flags,
speed fields, transport data, spline format, char enum layout).

Key components:
- ExpansionRegistry: scans Data/expansions/*/expansion.json at startup
- OpcodeTable: logical enum <-> wire values loaded from JSON
- UpdateFieldTable: field indices loaded from JSON per expansion
- DBCLayout: schema-driven DBC field lookups replacing magic numbers
- PacketParsers: WotLK/TBC/Classic parsers with correct flag positions
- Multi-manifest AssetManager: layered manifests with priority ordering
- HDPackManager: overlay texture packs with expansion compatibility
- Auth screen expansion picker replacing hardcoded version dropdown
2026-02-12 22:56:36 -08:00
Kelsi
aa16a687c2 Replace MPQ runtime with loose file asset system
Extract assets from MPQ archives into organized loose files indexed by
manifest.json, enabling fully parallel reads without StormLib serialization.
Add asset_extract and blp_convert tools, PNG texture override support.
2026-02-12 20:32:14 -08:00