diff options
author | celestar <celestar@openttd.org> | 2005-07-16 23:47:37 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-07-16 23:47:37 +0000 |
commit | 9ca761b06534ed191b0624a6c7049db296997a73 (patch) | |
tree | b32b3e56573203f32982f2fc2b3966529a6d1857 /tile.h | |
parent | 64f6839816221873b9a5327fe038533a7d3b8a98 (diff) | |
download | openttd-9ca761b06534ed191b0624a6c7049db296997a73.tar.xz |
(svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is steep
(i.e. spans two height levels) and use it throughout the code.
-Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to
build a depot on it. Wraps some bitmagic which seems quite unreadable at
first glance
Diffstat (limited to 'tile.h')
-rw-r--r-- | tile.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -61,6 +61,11 @@ static inline uint TileHeight(TileIndex tile) return GB(_m[tile].type_height, 0, 4); } +static inline bool IsSteepTileh(uint tileh) +{ + return (tileh & 0x10); +} + static inline void SetTileHeight(TileIndex tile, uint height) { assert(tile < MapSize()); |