(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
This commit is contained in:
celestar
2005-07-16 23:47:37 +00:00
parent 64f6839816
commit 9ca761b065
11 changed files with 87 additions and 19 deletions

5
tile.h
View File

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