mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat: integrate Wowee Open Terrain loader into client terrain pipeline
The wowee client can now load custom zones exported from the editor
using the novel WOT/WHM format — no Blizzard files needed.
Loading priority in TerrainManager::prepareTile():
1. Check custom_zones/{mapName}/{mapName}_{x}_{y}.wot/.whm
2. Check output/{mapName}/{mapName}_{x}_{y}.wot/.whm (editor output)
3. Fall back to World\Maps\...\*.adt (standard extracted data)
Pipeline:
- WoweeTerrainLoader in src/pipeline/ (shared between client + editor)
- Loads .whm binary heightmap (WHM1 magic, 256 chunks × 145 floats)
- Loads .wot JSON metadata (textures, layers, holes, water)
- Populates the same ADTTerrain struct the mesh generator uses
- obj0 merge only runs for ADT-loaded tiles (custom zones have no obj0)
To use: export zone from editor → files appear in output/ → client
loads them automatically on next terrain request for that map name.
This commit is contained in:
parent
94e6d5276e
commit
954894460e
4 changed files with 282 additions and 15 deletions
28
include/pipeline/wowee_terrain_loader.hpp
Normal file
28
include/pipeline/wowee_terrain_loader.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include "pipeline/adt_loader.hpp"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
namespace pipeline {
|
||||
|
||||
// Loader for the Wowee Open Terrain format (.wot/.whm)
|
||||
// Novel format — no Blizzard structures, fully portable
|
||||
class WoweeTerrainLoader {
|
||||
public:
|
||||
// Load terrain from .whm binary heightmap file
|
||||
static bool loadHeightmap(const std::string& whmPath, ADTTerrain& terrain);
|
||||
|
||||
// Load terrain metadata from .wot JSON file
|
||||
static bool loadMetadata(const std::string& wotPath, ADTTerrain& terrain);
|
||||
|
||||
// Full load: .wot metadata + .whm heightmap
|
||||
static bool load(const std::string& basePath, ADTTerrain& terrain);
|
||||
|
||||
// Check if a wowee open terrain exists at the given base path
|
||||
static bool exists(const std::string& basePath);
|
||||
};
|
||||
|
||||
} // namespace pipeline
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue