feat(editor): map browser for loading existing WoW zones

- Load Map Tile dialog now shows a searchable list of all available
  maps from the manifest (Azeroth, Kalimdor, Outland, dungeons, etc.)
- Click a map name to select it, then pick tile X/Y coordinates
- Helpful tile range hints shown below coordinates
- Maps indexed from WDT files in the manifest on startup
- Foundation for loading and modifying sections of existing WoW maps
This commit is contained in:
Kelsi 2026-05-05 06:01:42 -07:00
parent 5ccc61f144
commit a6b8cd75f6
3 changed files with 42 additions and 4 deletions

View file

@ -75,6 +75,20 @@ void AssetBrowser::initialize(pipeline::AssetManager* am) {
}
}
// Scan for available maps (WDT files)
std::set<std::string> mapSet;
for (const auto& [path, entry] : entries) {
if (path.starts_with("world\\maps\\") && path.ends_with(".wdt")) {
auto firstSlash = path.find('\\', 11); // after "world\\maps\\"
if (firstSlash != std::string::npos) {
std::string mapName = path.substr(11, firstSlash - 11);
mapSet.insert(mapName);
}
}
}
mapNames_.assign(mapSet.begin(), mapSet.end());
std::sort(mapNames_.begin(), mapNames_.end());
std::sort(textures_.begin(), textures_.end(),
[](const AssetEntry& a, const AssetEntry& b) { return a.wowPath < b.wowPath; });
std::sort(m2Models_.begin(), m2Models_.end(),