diff options
author | tron <tron@openttd.org> | 2005-01-16 14:50:01 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-16 14:50:01 +0000 |
commit | 022b8cea37b1ae1a3a1745c5373d202a7f267a2d (patch) | |
tree | 187e8c5437b91c17d0f652b2f0d01e30fbd131b4 /map.h | |
parent | 8e404a26f65b8851b3dcf067fddf62f188005ee9 (diff) | |
download | openttd-022b8cea37b1ae1a3a1745c5373d202a7f267a2d.tar.xz |
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
Replace some direct references to _map_type_and_height with TileHeight()/IsTileType()
Diffstat (limited to 'map.h')
-rw-r--r-- | map.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -73,10 +73,15 @@ static inline TileIndexDiff TileOffsByDir(uint dir) } -static inline uint TilePixelHeight(TileIndex tile) +static inline uint TileHeight(TileIndex tile) { assert(tile < MapSize()); - return (_map_type_and_height[tile] & 0xf) * 8; + return _map_type_and_height[tile] & 0xf; +} + +static inline uint TilePixelHeight(TileIndex tile) +{ + return TileHeight(tile) * 8; } static inline int TileType(TileIndex tile) |