1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix build

This commit is contained in:
Ivan Savenko
2024-12-28 21:11:50 +00:00
parent 78fc6d0e41
commit dfe8a95f8c
4 changed files with 32 additions and 27 deletions

View File

@@ -104,31 +104,32 @@ struct DLL_LINKAGE TerrainTile
TerrainTile();
/// Gets true if the terrain is not a rock. If from is water/land, same type is also required.
bool entrableTerrain(const TerrainTile * from = nullptr) const;
bool entrableTerrain(bool allowLand, bool allowSea) const;
inline bool entrableTerrain() const;
inline bool entrableTerrain(const TerrainTile * from) const;
inline bool entrableTerrain(bool allowLand, bool allowSea) const;
/// Checks for blocking objects and terraint type (water / land).
bool isClear(const TerrainTile * from = nullptr) const;
/// Gets the ID of the top visitable object or -1 if there is none.
Obj topVisitableId(bool excludeTop = false) const;
CGObjectInstance * topVisitableObj(bool excludeTop = false) const;
bool isWater() const;
bool isLand() const;
inline bool isWater() const;
inline bool isLand() const;
EDiggingStatus getDiggingStatus(bool excludeTop = true) const;
bool hasFavorableWinds() const;
inline bool hasFavorableWinds() const;
bool visitable() const;
bool blocked() const;
inline bool visitable() const;
inline bool blocked() const;
const TerrainType * getTerrain() const;
const RiverType * getRiver() const;
const RoadType * getRoad() const;
inline const TerrainType * getTerrain() const;
inline const RiverType * getRiver() const;
inline const RoadType * getRoad() const;
TerrainId getTerrainID() const;
RiverId getRiverID() const;
RoadId getRoadID() const;
inline TerrainId getTerrainID() const;
inline RiverId getRiverID() const;
inline RoadId getRoadID() const;
bool hasRiver() const;
bool hasRoad() const;
inline bool hasRiver() const;
inline bool hasRoad() const;
TerrainId terrainType;
RiverId riverType;
@@ -259,6 +260,11 @@ inline RoadId TerrainTile::getRoadID() const
return roadType;
}
inline bool TerrainTile::entrableTerrain() const
{
return entrableTerrain(true, true);
}
inline bool TerrainTile::entrableTerrain(const TerrainTile * from) const
{
const TerrainType * terrainFrom = from->getTerrain();