* Return if the tile is a valid tile for a crossing. * * @param tile the current tile * @param ax the axis of the road over the rail * @return true if it is a valid tile */
| 43 | * @return true if it is a valid tile |
| 44 | */ |
| 45 | static bool IsPossibleCrossing(const TileIndex tile, Axis ax) |
| 46 | { |
| 47 | return (IsTileType(tile, MP_RAILWAY) && |
| 48 | GetRailTileType(tile) == RailTileType::Normal && |
| 49 | GetTrackBits(tile) == (ax == AXIS_X ? TRACK_BIT_Y : TRACK_BIT_X) && |
| 50 | std::get<0>(GetFoundationSlope(tile)) == SLOPE_FLAT); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Clean up unnecessary RoadBits of a planned tile. |
no test coverage detected