mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 11:03:47 +00:00
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk into dir-restructure
This commit is contained in:
@@ -9,7 +9,9 @@
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
#include "TerrainBuilder.h"
|
||||
#include "IntermediateValues.h"
|
||||
@@ -27,7 +29,24 @@ using namespace VMAP;
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
typedef std::map<uint32, std::set<uint32>*> TileList;
|
||||
struct MapTiles
|
||||
{
|
||||
MapTiles() : m_mapId(uint32(-1)), m_tiles(NULL) {}
|
||||
|
||||
MapTiles(uint32 id, std::set<uint32>* tiles) : m_mapId(id), m_tiles(tiles) {}
|
||||
~MapTiles() {}
|
||||
|
||||
uint32 m_mapId;
|
||||
std::set<uint32>* m_tiles;
|
||||
|
||||
bool operator==(uint32 id)
|
||||
{
|
||||
return m_mapId == id;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::list<MapTiles> TileList;
|
||||
|
||||
struct Tile
|
||||
{
|
||||
Tile() : chf(NULL), solid(NULL), cset(NULL), pmesh(NULL), dmesh(NULL) {}
|
||||
@@ -49,7 +68,7 @@ namespace MMAP
|
||||
class MapBuilder
|
||||
{
|
||||
public:
|
||||
MapBuilder(float maxWalkableAngle = 55.f,
|
||||
MapBuilder(float maxWalkableAngle = 70.f,
|
||||
bool skipLiquid = false,
|
||||
bool skipContinents = false,
|
||||
bool skipJunkMaps = true,
|
||||
@@ -91,11 +110,13 @@ namespace MMAP
|
||||
void getTileBounds(uint32 tileX, uint32 tileY,
|
||||
float* verts, int vertCount,
|
||||
float* bmin, float* bmax);
|
||||
void getGridBounds(uint32 mapID, uint32 &minX, uint32 &minY, uint32 &maxX, uint32 &maxY);
|
||||
void getGridBounds(uint32 mapID, uint32 &minX, uint32 &minY, uint32 &maxX, uint32 &maxY) const;
|
||||
|
||||
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;
|
||||
TileList m_tiles;
|
||||
@@ -109,6 +130,9 @@ namespace MMAP
|
||||
|
||||
float m_maxWalkableAngle;
|
||||
bool m_bigBaseUnit;
|
||||
// percentageDone - variables to calculate percentage
|
||||
uint32 m_totalTiles;
|
||||
std::atomic<uint32> m_totalTilesBuilt;
|
||||
|
||||
// build performance - not really used for now
|
||||
rcContext* m_rcContext;
|
||||
|
||||
Reference in New Issue
Block a user