--- a/tile.h Tue Jul 19 07:20:48 2005 +0000
+++ b/tile.h Tue Jul 19 11:42:40 2005 +0000
@@ -15,7 +15,7 @@
MP_VOID, // invisible tiles at the SW and SE border
MP_INDUSTRY,
MP_TUNNELBRIDGE,
- MP_UNMOVABLE
+ MP_UNMOVABLE,
} TileType;
/* Direction as commonly used in v->direction, 8 way. */
@@ -95,6 +95,11 @@
return GetTileType(tile) == type;
}
+static inline bool IsTunnelTile(TileIndex tile)
+{
+ return IsTileType(tile, MP_TUNNELBRIDGE) && (_m[tile].m5 & 0xF0) == 0;
+}
+
static inline Owner GetTileOwner(TileIndex tile)
{
assert(tile < MapSize());