1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

describe roads placement in log

This commit is contained in:
AlexVinS 2015-03-12 06:08:48 +03:00
parent 76193c4c5c
commit 27c46c83d6
2 changed files with 10 additions and 6 deletions

View File

@ -1488,6 +1488,8 @@ void CRmgTemplateZone::drawRoads(CMapGenerator* gen)
};
logGlobal->debug("Started building roads");
while(!roadNodes.empty())
{
int3 node = *roadNodes.begin();
@ -1496,15 +1498,17 @@ void CRmgTemplateZone::drawRoads(CMapGenerator* gen)
{
//start road network
roads.insert(node);
logGlobal->debugStream() << "First node of road network: " << node;
}
else
{
int3 cross = *RandomGeneratorUtil::nextItem(roads, gen->rand);
crunchRoad(gen, node, cross, &freePaths);
}
logGlobal->debugStream() << "Building road from " << node << " to " << cross;
crunchRoad(gen, node, cross, &freePaths);
}
}
logGlobal->debug("Finished building roads");
}
void CRmgTemplateZone::buildRoads(CMapGenerator* gen)

View File

@ -223,8 +223,8 @@ private:
std::set<int3> roadNodes; //tiles to be connected with roads
std::set<int3> roads; //all tiles with roads
void drawRoads(CMapGenerator* gen); //fills "roads" according to "roadNodes"
void buildRoads(CMapGenerator* gen); //actually updates tiles
void drawRoads(CMapGenerator * gen); //fills "roads" according to "roadNodes"
void buildRoads(CMapGenerator * gen); //actually updates tiles
bool pointIsIn(int x, int y);
void addAllPossibleObjects (CMapGenerator* gen); //add objects, including zone-specific, to possibleObjects