1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

Moved path rendering to new map renderer

This commit is contained in:
Ivan Savenko
2023-02-15 14:09:27 +02:00
parent 600054e001
commit 21a48e4f0d
5 changed files with 138 additions and 7 deletions

View File

@ -13,6 +13,7 @@
#include "MapRenderer.h"
#include "mapHandler.h"
#include "CAdvMapInt.h"
#include "../CGameInfo.h"
#include "../CMusicHandler.h"
@ -266,9 +267,17 @@ bool MapRendererContext::isVisible(const int3 & coordinates) const
return LOCPLINT->cb->isVisible(coordinates) || settings["session"]["spectate"].Bool();
}
MapRendererContext::VisibilityMap MapRendererContext::getVisibilityMap() const
const CGPath * MapRendererContext::currentPath() const
{
return LOCPLINT->cb->getVisibilityMap();
const auto * hero = adventureInt->curHero();
if(!hero)
return nullptr;
if(!LOCPLINT->paths.hasPath(hero))
return nullptr;
return &LOCPLINT->paths.getPath(hero);
}
uint32_t MapRendererContext::getAnimationPeriod() const