1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

spaces -> tabs

This commit is contained in:
Ivan Savenko 2023-12-22 23:22:33 +02:00
parent 8916ae7bcd
commit bbbf676d38
2 changed files with 20 additions and 20 deletions

View File

@ -14,46 +14,46 @@
VCMI_LIB_NAMESPACE_BEGIN
MapProxy::MapProxy(RmgMap & map):
map(map)
map(map)
{
}
void MapProxy::insertObject(CGObjectInstance * obj)
{
Lock lock(mx);
map.getEditManager()->insertObject(obj);
Lock lock(mx);
map.getEditManager()->insertObject(obj);
}
void MapProxy::insertObjects(std::set<CGObjectInstance*>& objects)
{
Lock lock(mx);
map.getEditManager()->insertObjects(objects);
Lock lock(mx);
map.getEditManager()->insertObjects(objects);
}
void MapProxy::removeObject(CGObjectInstance * obj)
{
Lock lock(mx);
map.getEditManager()->removeObject(obj);
Lock lock(mx);
map.getEditManager()->removeObject(obj);
}
void MapProxy::drawTerrain(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain)
{
Lock lock(mx);
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)
{
Lock lock(mx);
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)
{
Lock lock(mx);
map.getEditManager()->getTerrainSelection().setSelection(tiles);
Lock lock(mx);
map.getEditManager()->getTerrainSelection().setSelection(tiles);
map.getEditManager()->drawRoad(roadType, &generator);
}

View File

@ -22,21 +22,21 @@ class RmgMap;
class MapProxy
{
public:
MapProxy(RmgMap & map);
MapProxy(RmgMap & map);
void insertObject(CGObjectInstance * obj);
void insertObjects(std::set<CGObjectInstance*>& objects);
void removeObject(CGObjectInstance* obj);
void insertObject(CGObjectInstance * obj);
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 drawRivers(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain);
void drawRoads(CRandomGenerator & generator, std::vector<int3> & tiles, RoadId roadType);
private:
mutable boost::shared_mutex mx;
using Lock = boost::unique_lock<boost::shared_mutex>;
mutable boost::shared_mutex mx;
using Lock = boost::unique_lock<boost::shared_mutex>;
RmgMap & map;
RmgMap & map;
};
VCMI_LIB_NAMESPACE_END