From 78083f0da7b7c94eccea15eec397e2afe96da1d5 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 12 Mar 2006 15:04:03 +0000 Subject: (svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does --- tunnel_map.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tunnel_map.c') diff --git a/tunnel_map.c b/tunnel_map.c index 8752d8107..435d62f20 100644 --- a/tunnel_map.c +++ b/tunnel_map.c @@ -15,8 +15,7 @@ TileIndex GetOtherTunnelEnd(TileIndex tile) do { tile += delta; } while ( - !IsTileType(tile, MP_TUNNELBRIDGE) || - GB(_m[tile].m5, 4, 4) != 0 || + !IsTunnelTile(tile) || GetTunnelDirection(tile) != dir || GetTileZ(tile) != z ); @@ -37,8 +36,7 @@ static bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir) return z == height && - IsTileType(tile, MP_TUNNELBRIDGE) && - GB(_m[tile].m5, 4, 4) == 0 && + IsTunnelTile(tile) && GetTunnelDirection(tile) == dir; } -- cgit v1.2.3-54-g00ecf