tunnel_map.h
author tron
Thu, 15 Jun 2006 16:47:13 +0000
branch0.4
changeset 10038 946b26c14e3a
parent 10032 fcf09abbde96
child 10050 53795ed4cdaf
permissions -rw-r--r--
(svn r5284) -Backport: r5264
-Fix: The wrong IP could get unbanned, e.g. 'unban 1.2.3.42' could result in unbanning 1.2.3.4
/* $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);
}

#endif