1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +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

@@ -78,17 +78,17 @@ void MapHandler::initTerrainGraphics()
std::map<std::string, std::string> terrainFiles;
std::map<std::string, std::string> roadFiles;
std::map<std::string, std::string> riverFiles;
for(const auto & terrain : VLC->terrainTypeHandler->terrains())
for(const auto & terrain : VLC->terrainTypeHandler->objects)
{
terrainFiles[terrain.name] = terrain.tilesFilename;
terrainFiles[terrain->name] = terrain->tilesFilename;
}
for(const auto & river : VLC->terrainTypeHandler->rivers())
for(const auto & river : VLC->riverTypeHandler->objects)
{
riverFiles[river.fileName] = river.fileName;
riverFiles[river->fileName] = river->fileName;
}
for(const auto & road : VLC->terrainTypeHandler->roads())
for(const auto & road : VLC->roadTypeHandler->objects)
{
roadFiles[road.fileName] = road.fileName;
roadFiles[road->fileName] = road->fileName;
}
loadFlipped(terrainAnimations, terrainImages, terrainFiles);