OpenTTD/tunnel_map.h
tron 22df8a8d6b (svn r5369) -Backport: 5363, 5364, 5365
-Fix: It was possible to dig into a tunnel if certain rail combinations were ontop of it
2006-06-26 15:59:58 +00:00

27 lines
376 B
C

/* $Id$ */
#ifndef TUNNEL_MAP_H
#define TUNNEL_MAP_H
#include "macros.h"
#include "map.h"
static inline bool IsTunnel(TileIndex t)
{
assert(IsTileType(t, MP_TUNNELBRIDGE));
return !HASBIT(_m[t].m5, 7);
}
static inline uint GetTunnelDirection(TileIndex t)
{
assert(IsTunnelTile(t));
return (uint)GB(_m[t].m5, 0, 2);
}
bool IsTunnelInWay(TileIndex, uint z);
#endif