diff options
author | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
commit | f35ed4bbc2b05f1b83476b60948d64375f77f1b4 (patch) | |
tree | 1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/road_map.cpp | |
parent | a332d10fd938f345fff18e5f4a662a58f692f734 (diff) | |
download | openttd-f35ed4bbc2b05f1b83476b60948d64375f77f1b4.tar.xz |
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/road_map.cpp')
-rw-r--r-- | src/road_map.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/road_map.cpp b/src/road_map.cpp index cccd2e76a..ccbf7b614 100644 --- a/src/road_map.cpp +++ b/src/road_map.cpp @@ -23,19 +23,19 @@ RoadBits GetAnyRoadBits(TileIndex tile) } case MP_STATION: - if (!IsRoadStopTile(tile)) return 0; + if (!IsRoadStopTile(tile)) return ROAD_NONE; return DiagDirToRoadBits(GetRoadStopDir(tile)); case MP_TUNNELBRIDGE: if (IsTunnel(tile)) { - if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return 0; + if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE; return DiagDirToRoadBits(ReverseDiagDir(GetTunnelDirection(tile))); } else { - if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return 0; + if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE; return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile))); } - default: return 0; + default: return ROAD_NONE; } } @@ -46,9 +46,9 @@ TrackBits GetAnyRoadTrackBits(TileIndex tile) // Don't allow local authorities to build roads through road depots or road stops. if ((IsTileType(tile, MP_STREET) && IsTileDepotType(tile, TRANSPORT_ROAD)) || IsTileType(tile, MP_STATION)) { - return 0; + return TRACK_BIT_NONE; } r = GetTileTrackStatus(tile, TRANSPORT_ROAD); - return (byte)(r | (r >> 8)); + return (TrackBits)(byte)(r | (r >> 8)); } |