mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
- 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
26 lines
755 B
C++
26 lines
755 B
C++
#pragma once
|
|
|
|
#include "pipeline/adt_loader.hpp"
|
|
#include <string>
|
|
#include <vector>
|
|
#include <unordered_set>
|
|
|
|
namespace wowee {
|
|
namespace pipeline { class AssetManager; }
|
|
|
|
namespace editor {
|
|
|
|
class TextureExporter {
|
|
public:
|
|
// Collect all texture paths referenced by the terrain
|
|
static std::vector<std::string> collectUsedTextures(const pipeline::ADTTerrain& terrain);
|
|
|
|
// Export all used textures as PNG to an output directory
|
|
// Returns count of successfully exported textures
|
|
static int exportTexturesAsPng(pipeline::AssetManager* am,
|
|
const std::vector<std::string>& texturePaths,
|
|
const std::string& outputDir);
|
|
};
|
|
|
|
} // namespace editor
|
|
} // namespace wowee
|