tunnel_map.h
author tron
Thu, 15 Jun 2006 14:16:57 +0000
branch0.4
changeset 10033 cce7f27e214d
parent 10032 fcf09abbde96
child 10050 53795ed4cdaf
permissions -rw-r--r--
(svn r5279) -Backport: r4116
-Fix: The AI should send a plane into a hangar if it's not in a hangar _or_ not stopped, not when it's not in a hangar _and_ not stopped
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
fcf09abbde96 (svn r5115) Move helper functions to where they belong
tron
parents:
diff changeset
    23
#endif