mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
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
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#include "editor_app.hpp"
|
|
#include "core/logger.hpp"
|
|
#include <string>
|
|
#include <cstring>
|
|
|
|
static void printUsage(const char* argv0) {
|
|
LOG_INFO("Usage: ", argv0, " --data <path> [--adt <map> <x> <y>]");
|
|
LOG_INFO(" --data <path> Path to extracted WoW data (contains manifest.json)");
|
|
LOG_INFO(" --adt <map> <x> <y> Load an ADT tile on startup");
|
|
}
|
|
|
|
int main(int argc, char* argv[]) {
|
|
std::string dataPath;
|
|
std::string adtMap;
|
|
int adtX = -1, adtY = -1;
|
|
|
|
for (int i = 1; i < argc; i++) {
|
|
if (std::strcmp(argv[i], "--data") == 0 && i + 1 < argc) {
|
|
dataPath = argv[++i];
|
|
} else if (std::strcmp(argv[i], "--adt") == 0 && i + 3 < argc) {
|
|
adtMap = argv[++i];
|
|
adtX = std::atoi(argv[++i]);
|
|
adtY = std::atoi(argv[++i]);
|
|
} else if (std::strcmp(argv[i], "--help") == 0 || std::strcmp(argv[i], "-h") == 0) {
|
|
printUsage(argv[0]);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
if (dataPath.empty()) {
|
|
dataPath = "Data";
|
|
LOG_INFO("No --data path specified, using default: ", dataPath);
|
|
}
|
|
|
|
wowee::editor::EditorApp app;
|
|
if (!app.initialize(dataPath)) {
|
|
LOG_ERROR("Failed to initialize editor");
|
|
return 1;
|
|
}
|
|
|
|
if (!adtMap.empty()) {
|
|
app.loadADT(adtMap, adtX, adtY);
|
|
}
|
|
|
|
app.run();
|
|
app.shutdown();
|
|
|
|
return 0;
|
|
}
|