|
|
/* $Id$ */
|
|
|
|
|
|
/** @file tunnelbridge_map.h Functions that have tunnels and bridges in common */
|
|
|
|
|
|
#ifndef TUNNELBRIDGE_MAP_H
|
|
|
#define TUNNELBRIDGE_MAP_H
|
|
|
|
|
|
#include "direction_func.h"
|
|
|
#include "core/bitmath_func.hpp" /* GB, HasBit, SB */
|
|
|
#include "map.h" /* Tile, TileIndex */
|
|
|
#include "tile.h" /* TileType, IsTileType */
|
|
|
#include "tile_map.h" /* TileType, IsTileType */
|
|
|
#include "openttd.h" /* TransportType */
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Tunnel: Get the direction facing out of the tunnel
|
|
|
* Bridge: Get the direction pointing onto the bridge
|
|
|
* @param t The tile to analyze
|
|
|
* @pre IsTileType(t, MP_TUNNELBRIDGE)
|
|
|
* @return the above mentionned direction
|
|
|
*/
|
|
|
static inline DiagDirection GetTunnelBridgeDirection(TileIndex t)
|
|
|
{
|