feat(Tools/MMapsGenerator): percentage progress (#10948)

* cherry-pick commit (TrinityCore/TrinityCore@b9f276f)
* cherry-pick commit (TrinityCore/TrinityCore@29937aa)
This commit is contained in:
IntelligentQuantum
2022-04-17 06:21:55 +04:30
committed by GitHub
parent 659775548f
commit 7cb9a73ef9
3 changed files with 18 additions and 29 deletions

View File

@@ -82,6 +82,7 @@ namespace MMAP
bool skipBattlegrounds = false,
bool debugOutput = false,
bool bigBaseUnit = false,
int mapid = -1,
const char* offMeshFilePath = nullptr);
~MapBuilder();
@@ -124,7 +125,7 @@ namespace MMAP
bool shouldSkipMap(uint32 mapID);
bool isTransportMap(uint32 mapID);
bool shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY);
// percentageDone - method to calculate percentage
uint32 percentageDone(uint32 totalTiles, uint32 totalTilesDone);
TerrainBuilder* m_terrainBuilder{nullptr};
@@ -139,9 +140,10 @@ namespace MMAP
float m_maxWalkableAngle;
bool m_bigBaseUnit;
// percentageDone - variables to calculate percentage
int32 m_mapid;
std::atomic<uint32> m_totalTiles;
std::atomic<uint32> m_totalTilesBuilt;
std::atomic<uint32> m_totalTilesProcessed;
// build performance - not really used for now
rcContext* m_rcContext{nullptr};