diff options
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/map_extractor/System.cpp | 18 | ||||
| -rw-r--r-- | src/tools/vmap4_extractor/vmapexport.cpp | 6 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 6b83a7d046d..b92f0d1668a 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -171,7 +171,7 @@ void HandleArgs(int argc, char * arg[]) uint32 ReadBuild(int locale) { // include build info file also - std::string filename = Trinity::StringFormat("component.wow-%s.txt", langs[locale]); + std::string filename = Trinity::StringFormat("component.wow-{}.txt", langs[locale]); //printf("Read %s file... ", filename.c_str()); MPQFile m(filename.c_str()); @@ -940,7 +940,7 @@ void ExtractMapsFromMpq(uint32 build) printf("Extract %s (%d/%u) \n", map_ids[z].name, z+1, map_count); // Loadup map grid data - mpqMapName = Trinity::StringFormat("World\\Maps\\%s\\%s.wdt", map_ids[z].name, map_ids[z].name); + mpqMapName = Trinity::StringFormat("World\\Maps\\{}\\{}.wdt", map_ids[z].name, map_ids[z].name); WDT_file wdt; if (!wdt.loadFile(mpqMapName, false)) { @@ -955,8 +955,8 @@ void ExtractMapsFromMpq(uint32 build) if (!wdt.main->adt_list[y][x].exist) continue; - mpqFileName = Trinity::StringFormat("World\\Maps\\%s\\%s_%u_%u.adt", map_ids[z].name, map_ids[z].name, x, y); - outputFileName = Trinity::StringFormat("%s/maps/%03u%02u%02u.map", output_path, map_ids[z].id, y, x); + mpqFileName = Trinity::StringFormat("World\\Maps\\{}\\{}_{}_{}.adt", map_ids[z].name, map_ids[z].name, x, y); + outputFileName = Trinity::StringFormat("{}/maps/{:03}{:02}{:02}.map", output_path, map_ids[z].id, y, x); ConvertADT(mpqFileName, outputFileName, y, x, build); } // draw progress bar @@ -1084,7 +1084,7 @@ void ExtractCameraFiles(int locale, bool basicLocale) void LoadLocaleMPQFiles(int const locale) { - std::string fileName = Trinity::StringFormat("%s/Data/%s/locale-%s.MPQ", input_path, langs[locale], langs[locale]); + std::string fileName = Trinity::StringFormat("{}/Data/{}/locale-{}.MPQ", input_path, langs[locale], langs[locale]); new MPQArchive(fileName.c_str()); @@ -1092,9 +1092,9 @@ void LoadLocaleMPQFiles(int const locale) { std::string ext; if (i > 1) - ext = Trinity::StringFormat("-%i", i); + ext = Trinity::StringFormat("-{}", i); - fileName = Trinity::StringFormat("%s/Data/%s/patch-%s%s.MPQ", input_path, langs[locale], langs[locale], ext.c_str()); + fileName = Trinity::StringFormat("{}/Data/{}/patch-{}{}.MPQ", input_path, langs[locale], langs[locale], ext); if (boost::filesystem::exists(fileName)) new MPQArchive(fileName.c_str()); } @@ -1106,7 +1106,7 @@ void LoadCommonMPQFiles() int count = sizeof(CONF_mpq_list)/sizeof(char*); for(int i = 0; i < count; ++i) { - fileName = Trinity::StringFormat("%s/Data/%s", input_path, CONF_mpq_list[i]); + fileName = Trinity::StringFormat("{}/Data/{}", input_path, CONF_mpq_list[i]); if (boost::filesystem::exists(fileName)) new MPQArchive(fileName.c_str()); } @@ -1129,7 +1129,7 @@ int main(int argc, char * arg[]) for (int i = 0; i < LANG_COUNT; i++) { - std::string filename = Trinity::StringFormat("%s/Data/%s/locale-%s.MPQ", input_path, langs[i], langs[i]); + std::string filename = Trinity::StringFormat("{}/Data/{}/locale-{}.MPQ", input_path, langs[i], langs[i]); if (boost::filesystem::exists(filename)) { printf("Detected locale: %s\n", langs[i]); diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp index 933a81425f8..f82553e29cc 100644 --- a/src/tools/vmap4_extractor/vmapexport.cpp +++ b/src/tools/vmap4_extractor/vmapexport.cpp @@ -154,7 +154,7 @@ bool ExtractSingleWmo(std::string& fname) strncpy(temp, fname.c_str(), 1024); temp[fname.length()-4] = 0; - WMOGroup fgroup(Trinity::StringFormat("%s_%03u.wmo", temp, i)); + WMOGroup fgroup(Trinity::StringFormat("{}_{:03}.wmo", temp, i)); if (!fgroup.open(&froot)) { printf("Could not open all Group file for: %s\n", plain_name); @@ -316,7 +316,7 @@ bool fillArchiveNameVector(std::vector<std::string>& pArchiveNames) // now, scan for the patch levels in the core dir printf("Scanning patch levels from data directory.\n"); - if (!scan_patches(Trinity::StringFormat("%spatch", input_path).c_str(), pArchiveNames)) + if (!scan_patches(Trinity::StringFormat("{}patch", input_path).c_str(), pArchiveNames)) return(false); // now, scan for the patch levels in locale dirs @@ -325,7 +325,7 @@ bool fillArchiveNameVector(std::vector<std::string>& pArchiveNames) for (std::string const& locale : locales) { printf("Locale: %s\n", locale.c_str()); - if(scan_patches(Trinity::StringFormat("%s%s/patch-%s", input_path, locale.c_str(), locale.c_str()).c_str(), pArchiveNames)) + if(scan_patches(Trinity::StringFormat("{}{}/patch-{}", input_path, locale, locale).c_str(), pArchiveNames)) foundOne = true; } |
