diff options
Diffstat (limited to 'src/slope.h')
-rw-r--r-- | src/slope.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/slope.h b/src/slope.h index 0ed1c452c..dd04c24be 100644 --- a/src/slope.h +++ b/src/slope.h @@ -90,6 +90,19 @@ static inline byte GetHighestSlopeCorner(Slope s) } } +/** + * Returns the height of the highest corner of a slope relative to TileZ (= minimal height) + * + * @param s The #Slope. + * @return Relative height of highest corner. + */ +static inline uint GetSlopeMaxZ(Slope s) +{ + if (s == SLOPE_FLAT) return 0; + if (IsSteepSlope(s)) return 2 * TILE_HEIGHT; + return TILE_HEIGHT; +} + /** * Enumeration for Foundations. |