1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Initial implementation of VIEW_AIR & VIEW_EARTH

This commit is contained in:
AlexVinS
2015-02-02 15:02:27 +03:00
parent 1333f8e410
commit f6e83685e7
8 changed files with 145 additions and 24 deletions

View File

@ -310,7 +310,7 @@ void CTerrainRect::showAll(SDL_Surface * to)
MapDrawingInfo info(adventureInt->position, &LOCPLINT->cb->getVisibilityMap(), &pos, adventureInt->worldViewIconsDef);
info.scaled = true;
info.scale = adventureInt->worldViewScale;
adventureInt->worldViewOptions.adjustDrawingInfo(info);
CGI->mh->drawTerrainRectNew(to, &info);
}
}
@ -1783,6 +1783,9 @@ void CAdvMapInt::changeMode(EAdvMapMode newMode, float newScale /* = 0.4f */)
townList.activate();
heroList.activate();
infoBar.activate();
worldViewOptions.clear();
break;
case EAdvMapMode::WORLD_VIEW:
panelMain->deactivate();
@ -1843,3 +1846,24 @@ void CAdventureOptions::showScenarioInfo()
GH.pushInt(new CScenarioInfo(LOCPLINT->cb->getMapHeader(), LOCPLINT->cb->getStartInfo()));
}
}
CAdvMapInt::WorldViewOptions::WorldViewOptions()
{
clear();
}
void CAdvMapInt::WorldViewOptions::clear()
{
showAllArtifacts = showAllHeroes = showAllTowns = showAllResources = showAllMines = showAllTerrain = false;
}
void CAdvMapInt::WorldViewOptions::adjustDrawingInfo(MapDrawingInfo& info)
{
info.showAllArtifacts = showAllArtifacts;
info.showAllHeroes = showAllHeroes;
info.showAllTowns = showAllTowns;
info.showAllResources = showAllResources;
info.showAllMines = showAllMines;
info.showAllTerrain = showAllTerrain;
}