1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Converted terrainTypeHandler into proper handler class

This commit is contained in:
Ivan Savenko
2022-12-20 16:14:06 +02:00
parent 01811317f9
commit 1468f6aded
43 changed files with 410 additions and 590 deletions

View File

@@ -338,12 +338,12 @@ std::string CDrawRiversOperation::getLabel() const
void CDrawRoadsOperation::executeTile(TerrainTile & tile)
{
tile.roadType = const_cast<RoadType*>(&VLC->terrainTypeHandler->roads()[roadType]);
tile.roadType = const_cast<RoadType*>(VLC->roadTypeHandler->getByIndex(roadType));
}
void CDrawRiversOperation::executeTile(TerrainTile & tile)
{
tile.riverType = const_cast<RiverType*>(&VLC->terrainTypeHandler->rivers()[riverType]);
tile.riverType = const_cast<RiverType*>(VLC->riverTypeHandler->getByIndex(riverType));
}
bool CDrawRoadsOperation::canApplyPattern(const LinePattern & pattern) const