equal
deleted
inserted
replaced
14 #include "depot.h" |
14 #include "depot.h" |
15 |
15 |
16 |
16 |
17 RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt) |
17 RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt) |
18 { |
18 { |
19 if (!HASBIT(GetRoadTypes(tile), rt)) return ROAD_NONE; |
19 if (!HasBit(GetRoadTypes(tile), rt)) return ROAD_NONE; |
20 |
20 |
21 switch (GetTileType(tile)) { |
21 switch (GetTileType(tile)) { |
22 case MP_ROAD: |
22 case MP_ROAD: |
23 switch (GetRoadTileType(tile)) { |
23 switch (GetRoadTileType(tile)) { |
24 default: |
24 default: |
49 TrackBits GetAnyRoadTrackBits(TileIndex tile, RoadType rt) |
49 TrackBits GetAnyRoadTrackBits(TileIndex tile, RoadType rt) |
50 { |
50 { |
51 uint32 r; |
51 uint32 r; |
52 |
52 |
53 /* Don't allow local authorities to build roads through road depots or road stops. */ |
53 /* Don't allow local authorities to build roads through road depots or road stops. */ |
54 if ((IsTileType(tile, MP_ROAD) && IsTileDepotType(tile, TRANSPORT_ROAD)) || (IsTileType(tile, MP_STATION) && !IsDriveThroughStopTile(tile)) || !HASBIT(GetRoadTypes(tile), rt)) { |
54 if ((IsTileType(tile, MP_ROAD) && IsTileDepotType(tile, TRANSPORT_ROAD)) || (IsTileType(tile, MP_STATION) && !IsDriveThroughStopTile(tile)) || !HasBit(GetRoadTypes(tile), rt)) { |
55 return TRACK_BIT_NONE; |
55 return TRACK_BIT_NONE; |
56 } |
56 } |
57 |
57 |
58 r = GetTileTrackStatus(tile, TRANSPORT_ROAD, RoadTypeToRoadTypes(rt)); |
58 r = GetTileTrackStatus(tile, TRANSPORT_ROAD, RoadTypeToRoadTypes(rt)); |
59 |
59 |