tunnel_map.h
author Darkvater
Sat, 12 Aug 2006 12:11:54 +0000
branch0.4
changeset 10072 e9bd7b46e732
parent 10050 53795ed4cdaf
permissions -rw-r--r--
(svn r5857) - Backport from trunk (r5800):
When directories were changed in 'Play Scenario', pressing 'New Game' showed
scenarios from that directory, not the default one.
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