1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Define public interface of CDrawRoadsOperation

This commit is contained in:
AlexVinS
2015-01-03 02:29:42 +03:00
parent e42ca15a0d
commit 877634b3a3
6 changed files with 85 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
#include "../mapObjects/CObjectClassesHandler.h"
#include "../mapObjects/CGHeroInstance.h"
#include "../VCMI_Lib.h"
#include "CDrawRoadsOperation.h"
MapRect::MapRect() : x(0), y(0), z(0), width(0), height(0)
{
@@ -226,6 +227,13 @@ void CMapEditManager::drawTerrain(ETerrainType terType, CRandomGenerator * gen/*
terrainSel.clearSelection();
}
void CMapEditManager::drawRoad(ERoadType::ERoadType roadType, CRandomGenerator* gen)
{
execute(make_unique<CDrawRoadsOperation>(map, terrainSel, roadType, gen ? gen : &(this->gen)));
terrainSel.clearSelection();
}
void CMapEditManager::insertObject(CGObjectInstance * obj, const int3 & pos)
{
execute(make_unique<CInsertObjectOperation>(map, obj, pos));