(svn r4166) Sprinkle several map accessors with assert()s

This commit is contained in:
tron
2006-03-30 09:29:01 +00:00
parent 5476fd4b96
commit bbf4f982a0
9 changed files with 230 additions and 53 deletions

View File

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