(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)

Replace some direct references to _map_type_and_height with TileHeight()/IsTileType()
This commit is contained in:
tron
2005-01-16 14:50:01 +00:00
parent 07647737d5
commit 27057ae4b0
6 changed files with 26 additions and 22 deletions

9
map.h
View File

@@ -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)