From 7ec704564a35940442d5ad52b39c850465685f31 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 22 Jul 2006 08:59:52 +0000 Subject: (svn r5582) Add and use AxisToTrack{Bits,}() --- rail_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rail_cmd.c') diff --git a/rail_cmd.c b/rail_cmd.c index f5805dc9d..8dc73c063 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -234,7 +234,7 @@ int32 CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) case MP_TUNNELBRIDGE: if (!IsBridge(tile) || !IsBridgeMiddle(tile) || - (GetBridgeAxis(tile) == AXIS_X ? TRACK_BIT_Y : TRACK_BIT_X) != trackbit) { + AxisToTrackBits(OtherAxis(GetBridgeAxis(tile))) != trackbit) { // Get detailed error message return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); } @@ -1918,7 +1918,7 @@ static uint32 GetTileTrackStatus_Track(TileIndex tile, TransportType mode) return ret; } else { if (GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) { - return (DiagDirToAxis(GetRailDepotDirection(tile)) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y) * 0x101; + return AxisToTrackBits(DiagDirToAxis(GetRailDepotDirection(tile))) * 0x101; } else { return GetRailWaypointBits(tile) * 0x101; } -- cgit v1.2.3-54-g00ecf