(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:
9
map.h
9
map.h
@@ -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)
|
||||
|
Reference in New Issue
Block a user