tunnel_map.h
author bjarni
Sat, 01 Jul 2006 10:44:32 +0000
branch0.4
changeset 10056 66c950df8d2f
parent 10050 53795ed4cdaf
permissions -rw-r--r--
(svn r5439) -Backport [OSX] rev 5438 -Code cleanup [OSX] removed UNIVERSAL_BINARY as a phony target since the target is long gone. Also corrected BUILD_OSX_BUNDLE as phony target
also corrected two $(BUILD_OSX_BUNDLE) to BUILD_OSX_BUNDLE, so the bundle will always build
10032
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     1
/* $Id$ */
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     2
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     3
#ifndef TUNNEL_MAP_H
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     4
#define TUNNEL_MAP_H
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     5
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     6
#include "macros.h"
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     7
#include "map.h"
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     8
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
     9
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    10
static inline bool IsTunnel(TileIndex t)
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    11
{
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    12
	assert(IsTileType(t, MP_TUNNELBRIDGE));
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    13
	return !HASBIT(_m[t].m5, 7);
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    14
}
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    15
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    16
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    17
static inline uint GetTunnelDirection(TileIndex t)
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    18
{
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    19
	assert(IsTunnelTile(t));
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    20
	return (uint)GB(_m[t].m5, 0, 2);
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    21
}
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    22
10050
53795ed4cdaf (svn r5369) -Backport: 5363, 5364, 5365
tron
parents: 10032
diff changeset
    23
53795ed4cdaf (svn r5369) -Backport: 5363, 5364, 5365
tron
parents: 10032
diff changeset
    24
bool IsTunnelInWay(TileIndex, uint z);
53795ed4cdaf (svn r5369) -Backport: 5363, 5364, 5365
tron
parents: 10032
diff changeset
    25
10032
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    26
#endif