feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "editor_camera.hpp"
|
|
|
|
|
#include "editor_viewport.hpp"
|
|
|
|
|
#include "editor_ui.hpp"
|
|
|
|
|
#include "terrain_editor.hpp"
|
|
|
|
|
#include "texture_painter.hpp"
|
|
|
|
|
#include "object_placer.hpp"
|
|
|
|
|
#include "npc_spawner.hpp"
|
|
|
|
|
#include "npc_presets.hpp"
|
|
|
|
|
#include "asset_browser.hpp"
|
|
|
|
|
#include "core/window.hpp"
|
|
|
|
|
#include "pipeline/asset_manager.hpp"
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
namespace wowee {
|
|
|
|
|
namespace editor {
|
|
|
|
|
|
|
|
|
|
enum class EditorMode { Sculpt, Paint, PlaceObject, Water, NPC };
|
|
|
|
|
|
|
|
|
|
class EditorApp {
|
|
|
|
|
public:
|
|
|
|
|
EditorApp();
|
|
|
|
|
~EditorApp();
|
|
|
|
|
|
|
|
|
|
bool initialize(const std::string& dataPath);
|
|
|
|
|
void run();
|
|
|
|
|
void shutdown();
|
|
|
|
|
|
|
|
|
|
void loadADT(const std::string& mapName, int tileX, int tileY);
|
|
|
|
|
void createNewTerrain(const std::string& mapName, int tileX, int tileY, float baseHeight, Biome biome);
|
|
|
|
|
void saveADT(const std::string& path);
|
|
|
|
|
void saveWDT(const std::string& path);
|
2026-05-05 04:06:19 -07:00
|
|
|
void exportZone(const std::string& outputDir);
|
|
|
|
|
void quickSave();
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
|
|
|
|
|
void requestQuit();
|
|
|
|
|
void resetCamera();
|
|
|
|
|
void setWireframe(bool enabled);
|
|
|
|
|
bool isWireframe() const;
|
|
|
|
|
|
|
|
|
|
EditorCamera& getEditorCamera() { return camera_; }
|
|
|
|
|
TerrainEditor& getTerrainEditor() { return terrainEditor_; }
|
|
|
|
|
TexturePainter& getTexturePainter() { return texturePainter_; }
|
|
|
|
|
ObjectPlacer& getObjectPlacer() { return objectPlacer_; }
|
|
|
|
|
NpcSpawner& getNpcSpawner() { return npcSpawner_; }
|
|
|
|
|
NpcPresets& getNpcPresets() { return npcPresets_; }
|
|
|
|
|
AssetBrowser& getAssetBrowser() { return assetBrowser_; }
|
|
|
|
|
rendering::TerrainRenderer* getTerrainRenderer();
|
|
|
|
|
pipeline::AssetManager* getAssetManager() { return assetManager_.get(); }
|
|
|
|
|
|
|
|
|
|
const std::string& getLoadedMap() const { return loadedMap_; }
|
|
|
|
|
int getLoadedTileX() const { return loadedTileX_; }
|
|
|
|
|
int getLoadedTileY() const { return loadedTileY_; }
|
|
|
|
|
bool hasTerrainLoaded() const { return terrain_.isLoaded(); }
|
|
|
|
|
|
|
|
|
|
core::Window* getWindow() { return window_.get(); }
|
|
|
|
|
|
|
|
|
|
EditorMode getMode() const { return mode_; }
|
2026-05-05 04:24:20 -07:00
|
|
|
void setMode(EditorMode m) {
|
|
|
|
|
if (m != mode_) {
|
|
|
|
|
viewport_.clearGhostPreview();
|
|
|
|
|
viewport_.setBrushIndicator({}, 0, false);
|
|
|
|
|
}
|
|
|
|
|
mode_ = m;
|
|
|
|
|
}
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
void markObjectsDirty() { objectsDirty_ = true; }
|
|
|
|
|
|
|
|
|
|
void startGizmoMode(TransformMode mode);
|
|
|
|
|
void setGizmoAxis(TransformAxis axis);
|
feat(editor): procedural noise generator, sky presets, viewport lighting
- Noise Generator in Sculpt panel: applies procedural value noise
with configurable frequency, amplitude, octaves, and seed
to create hills/valleys across entire tile instantly
- Sky/Lighting presets: View > Sky menu with Day (blue sky, high sun),
Dusk (orange, low sun), Night (dark blue, moonlight)
- Viewport clear color and light direction now configurable at runtime
- Noise uses smoothstep interpolation with octave fractal layering
2026-05-05 04:40:37 -07:00
|
|
|
void setSkyPreset(int preset); // 0=day, 1=dusk, 2=night
|
2026-05-05 04:01:06 -07:00
|
|
|
void snapSelectedToGround();
|
2026-05-05 04:14:29 -07:00
|
|
|
|
|
|
|
|
// Multi-tile support
|
|
|
|
|
void addAdjacentTile(int offsetX, int offsetY);
|
2026-05-05 04:20:26 -07:00
|
|
|
|
|
|
|
|
// Camera bookmarks
|
|
|
|
|
struct CameraBookmark { glm::vec3 pos; float yaw; float pitch; std::string name; };
|
|
|
|
|
void saveBookmark(const std::string& name);
|
|
|
|
|
void loadBookmark(int index);
|
|
|
|
|
const std::vector<CameraBookmark>& getBookmarks() const { return bookmarks_; }
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
TransformGizmo& getGizmo() { return viewport_.getGizmo(); }
|
2026-05-05 03:55:53 -07:00
|
|
|
bool shouldOpenContextMenu() const { return openContextMenu_; }
|
|
|
|
|
void clearContextMenuFlag() { openContextMenu_ = false; }
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
|
|
|
|
|
float getWaterHeight() const { return waterHeight_; }
|
|
|
|
|
void setWaterHeight(float h) { waterHeight_ = h; }
|
|
|
|
|
uint16_t getWaterType() const { return waterType_; }
|
|
|
|
|
void setWaterType(uint16_t t) { waterType_ = t; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void processEvents();
|
|
|
|
|
void updateTerrainEditing(float dt);
|
|
|
|
|
void refreshDirtyChunks();
|
|
|
|
|
void initImGui();
|
|
|
|
|
void shutdownImGui();
|
|
|
|
|
|
|
|
|
|
std::unique_ptr<core::Window> window_;
|
|
|
|
|
std::unique_ptr<pipeline::AssetManager> assetManager_;
|
|
|
|
|
EditorCamera camera_;
|
|
|
|
|
EditorViewport viewport_;
|
|
|
|
|
EditorUI ui_;
|
|
|
|
|
TerrainEditor terrainEditor_;
|
|
|
|
|
TexturePainter texturePainter_;
|
|
|
|
|
ObjectPlacer objectPlacer_;
|
|
|
|
|
NpcSpawner npcSpawner_;
|
|
|
|
|
NpcPresets npcPresets_;
|
|
|
|
|
AssetBrowser assetBrowser_;
|
|
|
|
|
|
|
|
|
|
pipeline::ADTTerrain terrain_;
|
|
|
|
|
|
|
|
|
|
bool imguiInitialized_ = false;
|
|
|
|
|
bool painting_ = false;
|
|
|
|
|
bool objectsDirty_ = false;
|
2026-05-05 03:55:53 -07:00
|
|
|
bool openContextMenu_ = false;
|
2026-05-05 04:06:19 -07:00
|
|
|
std::string lastSavePath_;
|
2026-05-05 04:20:26 -07:00
|
|
|
std::vector<CameraBookmark> bookmarks_;
|
2026-05-05 04:44:54 -07:00
|
|
|
float autoSaveTimer_ = 0.0f;
|
|
|
|
|
float autoSaveInterval_ = 300.0f; // 5 minutes
|
|
|
|
|
bool autoSaveEnabled_ = true;
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
size_t lastObjectCount_ = 0;
|
|
|
|
|
EditorMode mode_ = EditorMode::Sculpt;
|
|
|
|
|
float waterHeight_ = 100.0f;
|
|
|
|
|
uint16_t waterType_ = 0;
|
|
|
|
|
std::string dataPath_;
|
|
|
|
|
|
|
|
|
|
std::string loadedMap_;
|
|
|
|
|
int loadedTileX_ = -1;
|
|
|
|
|
int loadedTileY_ = -1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace editor
|
|
|
|
|
} // namespace wowee
|