Mercurial > hg > openttd
changeset 3444:9c64b4ed986c draft
(svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
author | celestar <celestar@openttd.org> |
---|---|
date | Tue, 04 Apr 2006 11:51:16 +0000 |
parents | 32d5a01e3738 |
children | 9b4665a3a8d8 |
files | station_map.h |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/station_map.h +++ b/station_map.h @@ -76,15 +76,6 @@ 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 @@ 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) {