1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +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

@@ -305,11 +305,11 @@
// if heroes are invitable in tavern // if heroes are invitable in tavern
"tavernInvite" : false, "tavernInvite" : false,
// minimal primary skills for heroes // minimal primary skills for heroes
"minimalPrimarySkills": [ 0, 0, 1, 1] "minimalPrimarySkills": [ 0, 0, 1, 1],
/// movement points hero can get on start of the turn when on land, depending on speed of slowest creature (0-based list) /// movement points hero can get on start of the turn when on land, depending on speed of slowest creature (0-based list)
"movementPointsLand" : [ 1500, 1500, 1500, 1500, 1560, 1630, 1700, 1760, 1830, 1900, 1960, 2000 ], "movementPointsLand" : [ 1500, 1500, 1500, 1500, 1560, 1630, 1700, 1760, 1830, 1900, 1960, 2000 ],
/// movement points hero can get on start of the turn when on sea, depending on speed of slowest creature (0-based list) /// movement points hero can get on start of the turn when on sea, depending on speed of slowest creature (0-based list)
"movementPointsSea" : [ 1500 ], "movementPointsSea" : [ 1500 ]
}, },
"towns": "towns":

View File

@@ -83,14 +83,13 @@ public:
TerrainType() = default; TerrainType() = default;
bool isLand() const; inline bool isLand() const;
bool isWater() const; inline bool isWater() const;
bool isRock() const; inline bool isRock() const;
inline bool isPassable() const;
inline bool isSurface() const;
inline bool isUnderground() const;
bool isPassable() const;
bool isSurface() const;
bool isUnderground() const;
bool isTransitionRequired() const; bool isTransitionRequired() const;
}; };

View File

@@ -86,10 +86,10 @@ public:
void initTerrain(); void initTerrain();
CMapEditManager * getEditManager(); CMapEditManager * getEditManager();
TerrainTile & getTile(const int3 & tile); inline TerrainTile & getTile(const int3 & tile);
const TerrainTile & getTile(const int3 & tile) const; inline const TerrainTile & getTile(const int3 & tile) const;
bool isCoastalTile(const int3 & pos) const; bool isCoastalTile(const int3 & pos) const;
bool isInTheMap(const int3 & pos) const; inline bool isInTheMap(const int3 & pos) const;
bool canMoveBetween(const int3 &src, const int3 &dst) const; bool canMoveBetween(const int3 &src, const int3 &dst) const;
bool checkForVisitableDir(const int3 & src, const TerrainTile * pom, const int3 & dst) const; bool checkForVisitableDir(const int3 & src, const TerrainTile * pom, const int3 & dst) const;

View File

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