mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-05 16:43:52 +00:00
feat(editor): open terrain format integrated into export workflow
- File > Export Open Format (.wot/.whm) menu item for standalone export - Every zone export (Ctrl+S, Export Zone) now also writes .wot/.whm alongside the ADT/WDT — dual format output - Export package now contains: ADT + WDT + WOT + WHM + JSON files - Both Blizzard-compatible (for existing servers) and open format (for wowee-native loading and redistribution)
This commit is contained in:
parent
7177463df1
commit
c28d3f8a99
3 changed files with 19 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "adt_writer.hpp"
|
||||
#include "zone_manifest.hpp"
|
||||
#include "content_pack.hpp"
|
||||
#include "wowee_terrain.hpp"
|
||||
#include "core/coordinates.hpp"
|
||||
#include "rendering/vk_context.hpp"
|
||||
#include "pipeline/adt_loader.hpp"
|
||||
|
|
@ -730,6 +731,11 @@ void EditorApp::exportZone(const std::string& outputDir) {
|
|||
objectPlacer_.saveToFile(objPath);
|
||||
}
|
||||
|
||||
// Export open terrain format alongside ADT
|
||||
std::string openBase = base + "/" + loadedMap_ + "_" +
|
||||
std::to_string(loadedTileX_) + "_" + std::to_string(loadedTileY_);
|
||||
WoweeTerrain::exportOpen(terrain_, openBase, loadedTileX_, loadedTileY_);
|
||||
|
||||
// Write zone info README
|
||||
{
|
||||
std::ofstream readme(base + "/README.txt");
|
||||
|
|
@ -780,6 +786,16 @@ void EditorApp::exportContentPack(const std::string& destPath) {
|
|||
showToast("Failed to create content pack");
|
||||
}
|
||||
|
||||
void EditorApp::exportOpenFormat(const std::string& basePath) {
|
||||
if (!terrain_.isLoaded()) return;
|
||||
std::string base = basePath + "/" + loadedMap_ + "/" + loadedMap_ + "_" +
|
||||
std::to_string(loadedTileX_) + "_" + std::to_string(loadedTileY_);
|
||||
if (WoweeTerrain::exportOpen(terrain_, base, loadedTileX_, loadedTileY_))
|
||||
showToast("Open format exported (.wot + .whm)");
|
||||
else
|
||||
showToast("Open format export failed");
|
||||
}
|
||||
|
||||
void EditorApp::quickSave() {
|
||||
if (!terrain_.isLoaded()) return;
|
||||
std::string dir = lastSavePath_.empty() ? "output" : lastSavePath_;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ public:
|
|||
void exportZone(const std::string& outputDir);
|
||||
void quickSave();
|
||||
void exportContentPack(const std::string& destPath);
|
||||
void exportOpenFormat(const std::string& basePath);
|
||||
|
||||
void requestQuit();
|
||||
void resetCamera();
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ void EditorUI::renderMenuBar(EditorApp& app) {
|
|||
app.quickSave();
|
||||
if (ImGui::MenuItem("Export Zone...", nullptr, false, app.hasTerrainLoaded()))
|
||||
showSaveDialog_ = true;
|
||||
if (ImGui::MenuItem("Export Open Format (.wot/.whm)", nullptr, false, app.hasTerrainLoaded()))
|
||||
app.exportOpenFormat("output");
|
||||
if (ImGui::MenuItem("Export Content Pack (.wcp)", nullptr, false, app.hasTerrainLoaded())) {
|
||||
std::string wcpPath = "output/" + app.getLoadedMap() + ".wcp";
|
||||
app.exportContentPack(wcpPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue