1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
vcmi/lib/rmg/threadpool/MapProxy.h

43 lines
1018 B
C++
Raw Normal View History

/*
* MapProxy.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "StdInc.h"
#include "../../mapping/CMap.h"
#include "../RmgMap.h"
#include "../../mapping/CMapEditManager.h"
VCMI_LIB_NAMESPACE_BEGIN
class RmgMap;
class MapProxy
{
public:
2023-12-22 23:22:33 +02:00
MapProxy(RmgMap & map);
2023-12-22 23:22:33 +02:00
void insertObject(CGObjectInstance * obj);
void insertObjects(std::set<CGObjectInstance*>& objects);
void removeObject(CGObjectInstance* obj);
void drawTerrain(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain);
2023-12-22 23:22:33 +02:00
void drawRivers(CRandomGenerator & generator, std::vector<int3> & tiles, TerrainId terrain);
void drawRoads(CRandomGenerator & generator, std::vector<int3> & tiles, RoadId roadType);
private:
2023-12-22 23:22:33 +02:00
mutable boost::shared_mutex mx;
using Lock = boost::unique_lock<boost::shared_mutex>;
2023-12-22 23:22:33 +02:00
RmgMap & map;
};
VCMI_LIB_NAMESPACE_END