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 /tunnelbridge_cmd.c | |
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 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 836e2b20d..d2d4a67e0 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -88,7 +88,7 @@ enum { */ static uint32 CheckBridgeSlope(uint direction, uint tileh, bool is_start_tile) { - if (!(tileh & 0x10)) { // disable building on very steep slopes + if (!IsSteepTileh(tileh)) { // disable building on very steep slopes if (is_start_tile) { /* check slope at start tile @@ -981,7 +981,7 @@ static void DrawBridgePillars(TileInfo *ti, int x, int y, int z) p = _tileh_bits[(image & 1) * 2 + (ti->map5&0x01)]; front_height = ti->z + ((ti->tileh & p[0])?8:0); back_height = ti->z + ((ti->tileh & p[1])?8:0); - if (ti->tileh & 0x10) { + if (IsSteepTileh(ti->tileh)) { if (!(ti->tileh & p[2])) front_height += 8; if (!(ti->tileh & p[3])) back_height += 8; } |