(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
This commit is contained in:
12
tunnel_map.h
12
tunnel_map.h
@@ -9,6 +9,18 @@
|
||||
#include "rail.h"
|
||||
|
||||
|
||||
static inline bool IsTunnel(TileIndex t)
|
||||
{
|
||||
return !HASBIT(_m[t].m5, 7);
|
||||
}
|
||||
|
||||
|
||||
static inline bool IsTunnelTile(TileIndex t)
|
||||
{
|
||||
return IsTileType(t, MP_TUNNELBRIDGE) && IsTunnel(t);
|
||||
}
|
||||
|
||||
|
||||
static inline DiagDirection GetTunnelDirection(TileIndex t)
|
||||
{
|
||||
return (DiagDirection)GB(_m[t].m5, 0, 2);
|
||||
|
||||
Reference in New Issue
Block a user