#include "stdafx.h"
#include "openttd.h"
#include "bridge_map.h"
#include "tile_cmd.h"
#include "road_map.h"
#include "station.h"
#include "tunnel_map.h"
#include "station_map.h"
#include "depot.h"
#include "tunnelbridge_map.h"
Go to the source code of this file.
Functions | |
RoadBits | GetAnyRoadBits (TileIndex tile, RoadType rt, bool straight_tunnel_bridge_entrance) |
Returns the RoadBits on an arbitrary tile Special behaviour:
| |
TrackBits | GetAnyRoadTrackBits (TileIndex tile, RoadType rt) |
Get the accessible track bits for the given tile. |
Definition in file road_map.cpp.
RoadBits GetAnyRoadBits | ( | TileIndex | tile, | |
RoadType | rt, | |||
bool | straight_tunnel_bridge_entrance = false | |||
) |
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 | |
rt | the road type to get the road bits form | |
stbe | whether to return straight road bits for tunnels/bridges. |
Definition at line 17 of file road_map.cpp.
References AxisToRoadBits(), DIAGDIR_NE, DiagDirToAxis(), DiagDirToRoadBits(), GetRoadStopDir(), GetTileType(), GetTunnelBridgeDirection(), GetTunnelBridgeTransportType(), MP_ROAD, MP_STATION, MP_TUNNELBRIDGE, ReverseDiagDir(), ROAD_NONE, ROAD_X, and ROAD_Y.
Referenced by CanRemoveRoadWithStop(), CheckAllowRemoveRoad(), and CleanUpRoadBits().
Get the accessible track bits for the given tile.
Special behaviour:
tile | the tile to get the track bits for |
Definition at line 46 of file road_map.cpp.
References IsTileType(), MP_STATION, RoadTypeToRoadTypes(), TRACK_BIT_NONE, and TrackStatusToTrackBits().
Referenced by GetTownRoadBits().