|
OpenTTD Source 20260711-master-g3fb3006dff
|
Complex road accessors. More...
Go to the source code of this file.
Functions | |
| bool | MayHaveRoad (Tile t) |
| Test whether a tile can have road/tram types. | |
| RoadBits | GetAnyRoadBits (Tile tile, RoadTramType rtt, bool straight_tunnel_bridge_entrance) |
| Returns the RoadBits on an arbitrary tile Special behaviour: | |
Complex road accessors.
Definition in file road_map.cpp.
| RoadBits GetAnyRoadBits | ( | Tile | tile, |
| RoadTramType | rtt, | ||
| bool | straight_tunnel_bridge_entrance ) |
Returns the RoadBits on an arbitrary tile Special behaviour:
If straight_tunnel_bridge_entrance is set a ROAD_X or ROAD_Y for bridge ramps and tunnel entrances is returned depending on the orientation of the tunnel or bridge.
| tile | the tile to get the road bits for |
| rtt | the road type to get the road bits form |
| straight_tunnel_bridge_entrance | whether to return straight road bits for tunnels/bridges. |
Definition at line 54 of file road_map.cpp.
References AxisToRoadBits(), Crossing, Depot, DiagDirToAxis(), DiagDirToRoadBits(), GetBayRoadStopDir(), GetCrossingRoadBits(), GetDriveThroughStopAxis(), GetRoadBits(), GetRoadDepotDirection(), GetRoadTileType(), GetTileType(), GetTunnelBridgeDirection(), GetTunnelBridgeTransportType(), HasTileRoadType(), IsAnyRoadStopTile(), IsDriveThroughStopTile(), MayHaveRoad(), Normal, ReverseDiagDir(), Road, Station, and TunnelBridge.
Referenced by CanConnectToRoad(), CanRemoveRoadWithStop(), CheckAllowRemoveRoad(), CleanUpRoadBits(), CmdBuildRoad(), CmdConvertRoad(), GetTownRoadBits(), RoadFindPathToDest(), and TileLoop_Road().
| bool MayHaveRoad | ( | Tile | t | ) |
Test whether a tile can have road/tram types.
| t | Tile to query. |
Definition at line 21 of file road_map.cpp.
References GetTileType(), GetTunnelBridgeTransportType(), IsAnyRoadStop(), Road, Station, and TunnelBridge.
Referenced by CanConnectToRoad(), ClearTile_Road(), CmdBuildRoadStop(), CmdBuildRoadWaypoint(), CmdConvertRoad(), DrawRoadTypeCatenary(), GetAnyRoadBits(), GetPresentRoadTypes(), GetRoadOwner(), GetRoadTypeRoad(), GetRoadTypeTram(), GetTrackTypes(), HasTileAnyRoadType(), RemoveRoad(), SetRoadTypeRoad(), and SetRoadTypeTram().