# HG changeset patch # User celestar # Date 1144151476 0 # Node ID d7f55b5e44b9fc50fe1558ee07f6638ec1bb8edd # Parent c695f86550b799cbd61bc2a5335a4799a788af94 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible diff -r c695f86550b7 -r d7f55b5e44b9 station_map.h --- a/station_map.h Tue Apr 04 11:45:54 2006 +0000 +++ b/station_map.h Tue Apr 04 11:51:16 2006 +0000 @@ -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) {