summaryrefslogtreecommitdiff
path: root/tunnel_map.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-30 09:29:01 +0000
committertron <tron@openttd.org>2006-03-30 09:29:01 +0000
commitbbf4f982a09d7fdcfab9633260dcce4ec8bfae4c (patch)
tree21b00e82b5c9850aa9567dba92d59ebb57aa50ba /tunnel_map.h
parent5476fd4b961ab4fce8a3417c0f2c517aa28e6219 (diff)
downloadopenttd-bbf4f982a09d7fdcfab9633260dcce4ec8bfae4c.tar.xz
(svn r4166) Sprinkle several map accessors with assert()s
Diffstat (limited to 'tunnel_map.h')
-rw-r--r--tunnel_map.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tunnel_map.h b/tunnel_map.h
index 6ac6cb44b..67c1fa94f 100644
--- a/tunnel_map.h
+++ b/tunnel_map.h
@@ -11,6 +11,7 @@
static inline bool IsTunnel(TileIndex t)
{
+ assert(IsTileType(t, MP_TUNNELBRIDGE));
return !HASBIT(_m[t].m5, 7);
}
@@ -23,12 +24,14 @@ static inline bool IsTunnelTile(TileIndex t)
static inline DiagDirection GetTunnelDirection(TileIndex t)
{
+ assert(IsTunnelTile(t));
return (DiagDirection)GB(_m[t].m5, 0, 2);
}
static inline TransportType GetTunnelTransportType(TileIndex t)
{
+ assert(IsTunnelTile(t));
return (TransportType)GB(_m[t].m5, 2, 2);
}