summaryrefslogtreecommitdiff
path: root/station_map.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-04-04 11:51:16 +0000
committercelestar <celestar@openttd.org>2006-04-04 11:51:16 +0000
commita281b0ebd393b5053f14e8707c07f650e63add0c (patch)
tree4c446cc400548cc7255c4b57359fde759c5bde13 /station_map.h
parent3ff5b879d09e1ef5be16dfca23b83bb8490b94be (diff)
downloadopenttd-a281b0ebd393b5053f14e8707c07f650e63add0c.tar.xz
(svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
Diffstat (limited to 'station_map.h')
-rw-r--r--station_map.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/station_map.h b/station_map.h
index b91b00109..9ebf7803f 100644
--- a/station_map.h
+++ b/station_map.h
@@ -76,15 +76,6 @@ static inline bool IsRailwayStationTile(TileIndex t)
return IsTileType(t, MP_STATION) && IsRailwayStation(t);
}
-static inline bool IsCompatibleTrainStationTile(TileIndex t1, TileIndex t2)
-{
- assert(IsRailwayStationTile(t2));
- return
- IsRailwayStationTile(t1) &&
- IsCompatibleRail(GetRailType(t1), GetRailType(t2)) &&
- GB(_m[t1].m5, 0, 1) == GB(_m[t2].m5, 0, 1); // same direction?
-}
-
static inline bool IsHangar(TileIndex t)
{
assert(IsTileType(t, MP_STATION));
@@ -175,6 +166,15 @@ static inline Track GetRailStationTrack(TileIndex t)
return GetRailStationAxis(t) == AXIS_X ? TRACK_X : TRACK_Y;
}
+static inline bool IsCompatibleTrainStationTile(TileIndex t1, TileIndex t2)
+{
+ assert(IsRailwayStationTile(t2));
+ return
+ IsRailwayStationTile(t1) &&
+ IsCompatibleRail(GetRailType(t1), GetRailType(t2)) &&
+ GetRailStationAxis(t1) == GetRailStationAxis(t2);
+}
+
static inline DiagDirection GetDockDirection(TileIndex t)
{