summaryrefslogtreecommitdiff
path: root/src/road_map.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-02-14 15:59:16 +0000
committerfrosch <frosch@openttd.org>2008-02-14 15:59:16 +0000
commit43c0f7ea8efdd6915b5ca1d311fa1186175b2e52 (patch)
treea43464406df621d20a7dd83755ef86ae3474e9ea /src/road_map.cpp
parent739b118c6b79ca85be89aed3653abf046b1640f0 (diff)
downloadopenttd-43c0f7ea8efdd6915b5ca1d311fa1186175b2e52.tar.xz
(svn r12141) -Codechange: Introduce IsNormalRoad[Tile](), IsRoadDepot[Tile]() and HasTileRoadType(); and use them.
Diffstat (limited to 'src/road_map.cpp')
-rw-r--r--src/road_map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/road_map.cpp b/src/road_map.cpp
index 51723fa14..c86c3d1b3 100644
--- a/src/road_map.cpp
+++ b/src/road_map.cpp
@@ -16,7 +16,7 @@
RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt)
{
- if (!HasBit(GetRoadTypes(tile), rt)) return ROAD_NONE;
+ if (!HasTileRoadType(tile, rt)) return ROAD_NONE;
switch (GetTileType(tile)) {
case MP_ROAD:
@@ -46,7 +46,7 @@ TrackBits GetAnyRoadTrackBits(TileIndex tile, RoadType rt)
uint32 r;
/* Don't allow local authorities to build roads through road depots or road stops. */
- if ((IsTileType(tile, MP_ROAD) && IsTileDepotType(tile, TRANSPORT_ROAD)) || (IsTileType(tile, MP_STATION) && !IsDriveThroughStopTile(tile)) || !HasBit(GetRoadTypes(tile), rt)) {
+ if (IsRoadDepotTile(tile) || (IsTileType(tile, MP_STATION) && !IsDriveThroughStopTile(tile)) || !HasTileRoadType(tile, rt)) {
return TRACK_BIT_NONE;
}