1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

map objects hierarchy now uses IGameInfoCallback

This commit is contained in:
Ivan Savenko
2025-05-14 15:50:13 +03:00
parent 6f20235d07
commit 4d4da0454f
111 changed files with 485 additions and 507 deletions

View File

@@ -230,7 +230,7 @@ bool ObstacleProxy::isProhibited(const rmg::Area& objArea) const
return false;
};
int ObstacleProxy::getWeightedObjects(const int3 & tile, vstd::RNG & rand, CGameInfoCallback * cb, std::list<rmg::Object> & allObjects, std::vector<std::pair<rmg::Object*, int3>> & weightedObjects)
int ObstacleProxy::getWeightedObjects(const int3 & tile, vstd::RNG & rand, IGameInfoCallback * cb, std::list<rmg::Object> & allObjects, std::vector<std::pair<rmg::Object*, int3>> & weightedObjects)
{
int maxWeight = std::numeric_limits<int>::min();
for(auto & possibleObstacle : possibleObstacles)
@@ -311,7 +311,7 @@ int ObstacleProxy::getWeightedObjects(const int3 & tile, vstd::RNG & rand, CGame
return maxWeight;
}
std::set<std::shared_ptr<CGObjectInstance>> ObstacleProxy::createObstacles(vstd::RNG & rand, CGameInfoCallback * cb)
std::set<std::shared_ptr<CGObjectInstance>> ObstacleProxy::createObstacles(vstd::RNG & rand, IGameInfoCallback * cb)
{
//reverse order, since obstacles begin in bottom-right corner, while the map coordinates begin in top-left
auto blockedTiles = blockedArea.getTilesVector();