diff options
author | rubidium <rubidium@openttd.org> | 2008-03-22 10:56:08 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-03-22 10:56:08 +0000 |
commit | f0538b4b622a80a93d27e7dc9f1cb05620eebb90 (patch) | |
tree | c70cc515d076c09e820b06aa4af1dbdb1fe37307 /src/road_func.h | |
parent | 5d747802f28d6fd6ad2527aa04f418ce09c00f6c (diff) | |
download | openttd-f0538b4b622a80a93d27e7dc9f1cb05620eebb90.tar.xz |
(svn r12390) -Fix [FS#1851]: trams failing to turn on bridge heads/tunnel entrances.
Diffstat (limited to 'src/road_func.h')
-rw-r--r-- | src/road_func.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/road_func.h b/src/road_func.h index 3139ea022..46269f29d 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -115,6 +115,20 @@ static inline RoadBits DiagDirToRoadBits(DiagDirection d) } /** + * Create the road-part which belongs to the given Axis + * + * This function returns a RoadBits value which belongs to + * the given Axis. + * + * @param a The Axis + * @return The result RoadBits which the selected road-part set + */ +static inline RoadBits AxisToRoadBits(Axis a) +{ + return a == AXIS_X ? ROAD_X : ROAD_Y; +} + +/** * Finds out, whether given player has all given RoadTypes available * @param PlayerID ID of player * @param rts RoadTypes to test |