mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Replaced most of usages of CRandomGenerator with vstd::RNG in library
This commit is contained in:
@@ -37,21 +37,21 @@ void MapProxy::removeObject(CGObjectInstance * obj)
|
||||
map.getEditManager()->removeObject(obj);
|
||||
}
|
||||
|
||||
void MapProxy::drawTerrain(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain)
|
||||
void MapProxy::drawTerrain(vstd::RNG & generator, std::vector<int3> & tiles, TerrainId terrain)
|
||||
{
|
||||
Lock lock(mx);
|
||||
map.getEditManager()->getTerrainSelection().setSelection(tiles);
|
||||
map.getEditManager()->drawTerrain(terrain, map.getDecorationsPercentage(), &generator);
|
||||
}
|
||||
|
||||
void MapProxy::drawRivers(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain)
|
||||
void MapProxy::drawRivers(vstd::RNG & generator, std::vector<int3> & tiles, TerrainId terrain)
|
||||
{
|
||||
Lock lock(mx);
|
||||
map.getEditManager()->getTerrainSelection().setSelection(tiles);
|
||||
map.getEditManager()->drawRiver(VLC->terrainTypeHandler->getById(terrain)->river, &generator);
|
||||
}
|
||||
|
||||
void MapProxy::drawRoads(CRandomGenerator & generator, std::vector<int3> & tiles, RoadId roadType)
|
||||
void MapProxy::drawRoads(vstd::RNG & generator, std::vector<int3> & tiles, RoadId roadType)
|
||||
{
|
||||
Lock lock(mx);
|
||||
map.getEditManager()->getTerrainSelection().setSelection(tiles);
|
||||
|
||||
@@ -28,9 +28,9 @@ public:
|
||||
void insertObjects(std::set<CGObjectInstance*>& objects);
|
||||
void removeObject(CGObjectInstance* obj);
|
||||
|
||||
void drawTerrain(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain);
|
||||
void drawRivers(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain);
|
||||
void drawRoads(CRandomGenerator & generator, std::vector<int3> & tiles, RoadId roadType);
|
||||
void drawTerrain(vstd::RNG & generator, std::vector<int3> & tiles, TerrainId terrain);
|
||||
void drawRivers(vstd::RNG & generator, std::vector<int3> & tiles, TerrainId terrain);
|
||||
void drawRoads(vstd::RNG & generator, std::vector<int3> & tiles, RoadId roadType);
|
||||
|
||||
private:
|
||||
mutable boost::shared_mutex mx;
|
||||
|
||||
Reference in New Issue
Block a user