mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
Map Extractor - ont a fix, but additional information shown
This commit is contained in:
parent
77308f0b33
commit
5dc36dea6d
1 changed files with 11 additions and 7 deletions
|
|
@ -106,7 +106,7 @@ float CONF_flat_liquid_delta_limit = 0.001f; // If max - min less this value - l
|
|||
|
||||
#define MIN_SUPPORTED_BUILD 18273 // code expect mpq files and mpq content files structure for this build or later
|
||||
#define EXPANSION_COUNT 4
|
||||
#define WORLD_COUNT 1
|
||||
#define WORLD_COUNT 2
|
||||
|
||||
|
||||
bool FileExists(const char* FileName)
|
||||
|
|
@ -1204,13 +1204,15 @@ void ExtractMapsFromMpq(uint32 build, const int locale)
|
|||
printf("\n Converting map files\n");
|
||||
for (uint32 z = 0; z < map_count; ++z)
|
||||
{
|
||||
printf(" Extract %s (%d/%d) \n", map_ids[z].name, z + 1, map_count);
|
||||
printf(" Extract MapId: %04u Name: %s (%d/%d) \n", map_ids[z].id, map_ids[z].name, z + 1, map_count);
|
||||
// Loadup map grid data
|
||||
sprintf(mpq_map_name, "World\\Maps\\%s\\%s.wdt", map_ids[z].name, map_ids[z].name);
|
||||
//printf("World\\Maps\\%s\\%s.wdt from %s\n", map_ids[z].name, map_ids[z].name,mpq_filename);
|
||||
WDT_file wdt;
|
||||
if (!wdt.loadFile(mpq_map_name, false))
|
||||
continue;
|
||||
|
||||
//printf("Building Map: %s (%04u) ", map_ids[z].name, map_ids[z].id);
|
||||
for (uint32 y = 0; y < WDT_MAP_SIZE; ++y)
|
||||
{
|
||||
for (uint32 x = 0; x < WDT_MAP_SIZE; ++x)
|
||||
|
|
@ -1220,12 +1222,14 @@ void ExtractMapsFromMpq(uint32 build, const int locale)
|
|||
continue;
|
||||
}
|
||||
sprintf(mpq_filename, "World\\Maps\\%s\\%s_%u_%u.adt", map_ids[z].name, map_ids[z].name, x, y);
|
||||
sprintf(output_filename, "%s/maps/%03u%02u%02u.map", output_path, map_ids[z].id, y, x);
|
||||
//printf("World\\Maps\\%s\\%s_%u_%u.adt from %s\n", map_ids[z].name, map_ids[z].name, x, y,mpq_filename);
|
||||
sprintf(output_filename, "%s/maps/%04u%02u%02u.map", output_path, map_ids[z].id, y, x);
|
||||
ConvertADT(mpq_filename, output_filename, y, x, build);
|
||||
}
|
||||
// draw progress bar
|
||||
printf(" Processing........................%d%%\r", (100 * (y + 1)) / WDT_MAP_SIZE);
|
||||
}
|
||||
//printf(".... Finished\n");
|
||||
}
|
||||
delete [] areas;
|
||||
delete [] map_ids;
|
||||
|
|
@ -1431,7 +1435,7 @@ void LoadBaseMPQFiles()
|
|||
printf("Loaded MPQ files for map extraction:\n");
|
||||
for (int i = 1; i <= WORLD_COUNT; i++)
|
||||
{
|
||||
sprintf(filename, "%s/Data/World%s.MPQ", input_path, (i == 2 ? "2" : ""));
|
||||
sprintf(filename, "%s/Data/World.MPQ", input_path);
|
||||
printf("%s\n", filename);
|
||||
|
||||
if (!OpenArchive(filename, &worldMpqHandle))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue