#include "stdafx.h"
#include "openttd.h"
#include "bridge_map.h"
#include "bridge.h"
#include "variables.h"
#include "landscape.h"
#include "tunnelbridge_map.h"
Go to the source code of this file.
Functions | |
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. | |
uint | GetBridgeHeight (TileIndex t) |
Get the height ('z') of a bridge in pixels. |
Definition in file bridge_map.cpp.
TileIndex GetBridgeEnd | ( | TileIndex | t, | |
DiagDirection | d | |||
) |
Finds the end of a bridge in the specified direction starting at a middle tile.
t | the bridge tile to find the bridge ramp for | |
d | the direction to search in |
Definition at line 14 of file bridge_map.cpp.
References GetTunnelBridgeDirection(), IsBridgeTile(), ReverseDiagDir(), and TileOffsByDiagDir().
Referenced by GetNorthernBridgeEnd(), GetOtherBridgeEnd(), and GetSouthernBridgeEnd().
uint GetBridgeHeight | ( | TileIndex | tile | ) |
Get the height ('z') of a bridge in pixels.
tile | the bridge ramp tile to get the bridge height from |
Definition at line 45 of file bridge_map.cpp.
References DiagDirToAxis(), GetTunnelBridgeDirection(), and TILE_HEIGHT.
Referenced by CmdBuildBridge(), CmdTerraformLand(), DrawCatenaryRailway(), DrawRoadBits(), DrawTramCatenary(), and FloodVehicles().
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 27 of file bridge_map.cpp.
References AxisToDiagDir(), GetBridgeAxis(), GetBridgeEnd(), and ReverseDiagDir().
Referenced by CmdBuildBridge(), DrawCatenary(), DrawCatenaryRailway(), DrawRoadBits(), and DrawTramCatenary().
Starting at one bridge end finds the other bridge end.
t | the bridge ramp tile to find the other bridge ramp for |
Definition at line 39 of file bridge_map.cpp.
References GetBridgeEnd(), GetTunnelBridgeDirection(), and IsBridgeTile().
Referenced by CmdBuildBridge(), FloodVehicles(), CFollowTrackT< Ttr_type_, T90deg_turns_allowed_ >::FollowTileExit(), GetOtherTunnelBridgeEnd(), and GetRailTrackBitsUniversal().
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 33 of file bridge_map.cpp.
References AxisToDiagDir(), GetBridgeAxis(), and GetBridgeEnd().
Referenced by CmdTerraformLand().