OpenTTD Source 20241224-master-gf74b0cf984
|
Map accessor functions for bridges. More...
Go to the source code of this file.
Functions | |
static TileIndex | GetBridgeEnd (TileIndex tile, DiagDirection dir) |
Finds the end of a bridge in the specified direction starting at a middle tile. | |
TileIndex | GetNorthernBridgeEnd (TileIndex t) |
Finds the northern end of a bridge starting at a middle tile. | |
TileIndex | GetSouthernBridgeEnd (TileIndex t) |
Finds the southern end of a bridge starting at a middle tile. | |
TileIndex | GetOtherBridgeEnd (TileIndex tile) |
Starting at one bridge end finds the other bridge end. | |
int | GetBridgeHeight (TileIndex t) |
Get the height ('z') of a bridge. | |
Map accessor functions for bridges.
Definition in file bridge_map.cpp.
|
static |
Finds the end of a bridge in the specified direction starting at a middle tile.
tile | the bridge tile to find the bridge ramp for |
dir | the direction to search in |
Definition at line 22 of file bridge_map.cpp.
References GetTunnelBridgeDirection(), IsBridgeTile(), ReverseDiagDir(), and TileOffsByDiagDir().
Referenced by GetNorthernBridgeEnd(), GetOtherBridgeEnd(), and GetSouthernBridgeEnd().
int GetBridgeHeight | ( | TileIndex | t | ) |
Get the height ('z') of a bridge.
t | the bridge ramp tile to get the bridge height from |
Definition at line 70 of file bridge_map.cpp.
References ApplyFoundationToSlope(), DiagDirToAxis(), GetBridgeFoundation(), GetTileSlopeZ(), and GetTunnelBridgeDirection().
Referenced by CmdBuildBridge(), CmdBuildObject(), CmdTerraformLand(), DoClearBridge(), DrawRailCatenaryRailway(), DrawRoadBits(), DrawRoadTypeCatenary(), GetBridgePixelHeight(), GetTerrainType(), and MarkBridgeDirty().
Finds the northern end of a bridge starting at a middle tile.
t | the bridge tile to find the bridge ramp for |
Definition at line 39 of file bridge_map.cpp.
References AxisToDiagDir(), GetBridgeAxis(), GetBridgeEnd(), and ReverseDiagDir().
Referenced by AfterLoadGame(), CmdBuildBridge(), DrawBridgeMiddle(), DrawRailCatenaryRailway(), DrawRoadBits(), DrawRoadTypeCatenary(), and ViewportAddLandscape().
Starting at one bridge end finds the other bridge end.
tile | the bridge ramp tile to find the other bridge ramp for |
Definition at line 59 of file bridge_map.cpp.
References GetBridgeEnd(), GetTunnelBridgeDirection(), and IsBridgeTile().
Referenced by CmdBuildBridge(), DoClearBridge(), DrawRailCatenaryOnBridge(), FloodVehicles(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), GetOtherTunnelBridgeEnd(), GetRailTrackBitsUniversal(), and VisitWaterRegionPatchNeighbors().
Finds the southern end of a bridge starting at a middle tile.
t | the bridge tile to find the bridge ramp for |
Definition at line 49 of file bridge_map.cpp.
References AxisToDiagDir(), GetBridgeAxis(), and GetBridgeEnd().
Referenced by CmdBuildObject(), CmdTerraformLand(), DrawBridgeMiddle(), and DrawRailCatenaryOnBridge().