1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

* Added comments to map.h * Refactoring(renamed attributes, some steps towards coding guidelines, ..)

This commit is contained in:
beegee1
2012-10-26 17:51:05 +00:00
parent 8604234f8d
commit 720deba838
16 changed files with 1364 additions and 804 deletions

View File

@ -430,9 +430,9 @@ bool CGameInfoCallback::verifyPath(CPath * path, bool blockSea) const
continue;
const TerrainTile *prev = getTile(path->nodes[i-1].coord); //tile of previous node on the path
if (( t->tertype == TerrainTile::water && prev->tertype != TerrainTile::water)
|| (t->tertype != TerrainTile::water && prev->tertype == TerrainTile::water)
|| prev->tertype == TerrainTile::rock
if (( t->tertype == ETerrainType::WATER && prev->tertype != ETerrainType::WATER)
|| (t->tertype != ETerrainType::WATER && prev->tertype == ETerrainType::WATER)
|| prev->tertype == ETerrainType::ROCK
)
return false;
}
@ -594,7 +594,7 @@ int CGameInfoCallback::canBuildStructure( const CGTownInstance *t, int ID )
{
const TerrainTile *tile = getTile(t->bestLocation(), false);
if(!tile || tile->tertype != TerrainTile::water )
if(!tile || tile->tertype != ETerrainType::WATER)
return EBuildingState::NO_WATER; //lack of water
}