mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): BLP→PNG texture export for open format zones
- TextureExporter: converts Blizzard BLP textures to standard PNG for fully open redistribution of custom zones - collectUsedTextures(): finds all texture paths referenced by terrain - exportTexturesAsPng(): loads BLP via asset manager, writes RGBA PNG using stb_image_write to output/MapName/textures/ - Zone export now automatically converts all used textures to PNG - Client's PNG override system already loads these automatically (checks for .png alongside .blp before loading) Format replacement progress: - DONE: ADT→WOT/WHM (terrain) - DONE: WDT→zone.json (map definition) - DONE: BLP→PNG (textures — auto-exported on zone save) - TODO: DBC→JSON, M2→open model, WMO→open building
This commit is contained in:
parent
5adb6cb364
commit
cb3de59b5c
4 changed files with 100 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "zone_manifest.hpp"
|
||||
#include "content_pack.hpp"
|
||||
#include "wowee_terrain.hpp"
|
||||
#include "texture_exporter.hpp"
|
||||
#include "core/coordinates.hpp"
|
||||
#include "rendering/vk_context.hpp"
|
||||
#include "pipeline/adt_loader.hpp"
|
||||
|
|
@ -731,6 +732,14 @@ void EditorApp::exportZone(const std::string& outputDir) {
|
|||
objectPlacer_.saveToFile(objPath);
|
||||
}
|
||||
|
||||
// Export used textures as PNG (open format replacement for BLP)
|
||||
auto usedTextures = TextureExporter::collectUsedTextures(terrain_);
|
||||
if (!usedTextures.empty()) {
|
||||
int exported = TextureExporter::exportTexturesAsPng(
|
||||
assetManager_.get(), usedTextures, base + "/textures");
|
||||
LOG_INFO("Exported ", exported, " textures as PNG");
|
||||
}
|
||||
|
||||
// Export open terrain format alongside ADT
|
||||
std::string openBase = base + "/" + loadedMap_ + "_" +
|
||||
std::to_string(loadedTileX_) + "_" + std::to_string(loadedTileY_);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue