OpenTTD Source 20241224-master-gf74b0cf984
|
Map accessors for roads. More...
#include "track_func.h"
#include "depot_type.h"
#include "rail_type.h"
#include "road_func.h"
#include "tile_map.h"
#include "road_type.h"
Go to the source code of this file.
Macros | |
#define | IsOnDesert IsOnSnow |
Check if a road tile has snow/desert. | |
#define | ToggleDesert ToggleSnow |
Toggle the snow/desert state of a road tile. | |
Enumerations | |
enum | RoadTileType { ROAD_TILE_NORMAL , ROAD_TILE_CROSSING , ROAD_TILE_DEPOT } |
The different types of road tiles. More... | |
enum | Roadside : uint8_t { ROADSIDE_BARREN = 0 , ROADSIDE_GRASS = 1 , ROADSIDE_PAVED = 2 , ROADSIDE_STREET_LIGHTS = 3 , ROADSIDE_TREES = 5 , ROADSIDE_GRASS_ROAD_WORKS = 6 , ROADSIDE_PAVED_ROAD_WORKS = 7 } |
The possible road side decorations. More... | |
Functions | |
bool | MayHaveRoad (Tile t) |
Test whether a tile can have road/tram types. | |
static debug_inline RoadTileType | GetRoadTileType (Tile t) |
Get the type of the road tile. | |
static debug_inline bool | IsNormalRoad (Tile t) |
Return whether a tile is a normal road. | |
static debug_inline bool | IsNormalRoadTile (Tile t) |
Return whether a tile is a normal road tile. | |
bool | IsLevelCrossing (Tile t) |
Return whether a tile is a level crossing. | |
bool | IsLevelCrossingTile (Tile t) |
Return whether a tile is a level crossing tile. | |
static debug_inline bool | IsRoadDepot (Tile t) |
Return whether a tile is a road depot. | |
static debug_inline bool | IsRoadDepotTile (Tile t) |
Return whether a tile is a road depot tile. | |
RoadBits | GetRoadBits (Tile t, RoadTramType rtt) |
Get the present road bits for a specific road type. | |
RoadBits | GetAllRoadBits (Tile tile) |
Get all set RoadBits on the given tile. | |
void | SetRoadBits (Tile t, RoadBits r, RoadTramType rtt) |
Set the present road bits for a specific road type. | |
RoadType | GetRoadTypeRoad (Tile t) |
RoadType | GetRoadTypeTram (Tile t) |
RoadType | GetRoadType (Tile t, RoadTramType rtt) |
RoadTypes | GetPresentRoadTypes (Tile t) |
Get the present road types of a tile. | |
bool | HasRoadTypeRoad (Tile t) |
bool | HasRoadTypeTram (Tile t) |
bool | HasTileRoadType (Tile t, RoadTramType rtt) |
Check if a tile has a road or a tram road type. | |
bool | HasTileAnyRoadType (Tile t, RoadTypes rts) |
Check if a tile has one of the specified road types. | |
Owner | GetRoadOwner (Tile t, RoadTramType rtt) |
Get the owner of a specific road type. | |
void | SetRoadOwner (Tile t, RoadTramType rtt, Owner o) |
Set the owner of a specific road type. | |
bool | IsRoadOwner (Tile t, RoadTramType rtt, Owner o) |
Check if a specific road type is owned by an owner. | |
bool | HasTownOwnedRoad (Tile t) |
Checks if given tile has town owned road. | |
bool | IsValidDisallowedRoadDirections (DisallowedRoadDirections drt) |
Checks if a DisallowedRoadDirections is valid. | |
DisallowedRoadDirections | GetDisallowedRoadDirections (Tile t) |
Gets the disallowed directions. | |
void | SetDisallowedRoadDirections (Tile t, DisallowedRoadDirections drd) |
Sets the disallowed directions. | |
Axis | GetCrossingRoadAxis (Tile t) |
Get the road axis of a level crossing. | |
Axis | GetCrossingRailAxis (Tile t) |
Get the rail axis of a level crossing. | |
RoadBits | GetCrossingRoadBits (Tile tile) |
Get the road bits of a level crossing. | |
Track | GetCrossingRailTrack (Tile tile) |
Get the rail track of a level crossing. | |
TrackBits | GetCrossingRailBits (Tile tile) |
Get the rail track bits of a level crossing. | |
bool | HasCrossingReservation (Tile t) |
Get the reservation state of the rail crossing. | |
void | SetCrossingReservation (Tile t, bool b) |
Set the reservation state of the rail crossing. | |
TrackBits | GetCrossingReservationTrackBits (Tile t) |
Get the reserved track bits for a rail crossing. | |
bool | IsCrossingBarred (Tile t) |
Check if the level crossing is barred. | |
void | SetCrossingBarred (Tile t, bool barred) |
Set the bar state of a level crossing. | |
void | UnbarCrossing (Tile t) |
Unbar a level crossing. | |
void | BarCrossing (Tile t) |
Bar a level crossing. | |
bool | IsOnSnow (Tile t) |
Check if a road tile has snow/desert. | |
void | ToggleSnow (Tile t) |
Toggle the snow/desert state of a road tile. | |
Roadside | GetRoadside (Tile tile) |
Get the decorations of a road. | |
void | SetRoadside (Tile tile, Roadside s) |
Set the decorations of a road. | |
bool | HasRoadWorks (Tile t) |
Check if a tile has road works. | |
bool | IncreaseRoadWorksCounter (Tile t) |
Increase the progress counter of road works. | |
void | StartRoadWorks (Tile t) |
Start road works on a tile. | |
void | TerminateRoadWorks (Tile t) |
Terminate road works on a tile. | |
DiagDirection | GetRoadDepotDirection (Tile t) |
Get the direction of the exit of a road depot. | |
RoadBits | GetAnyRoadBits (Tile tile, RoadTramType rtt, bool straight_tunnel_bridge_entrance=false) |
Returns the RoadBits on an arbitrary tile Special behaviour: | |
void | SetRoadTypeRoad (Tile t, RoadType rt) |
Set the road road type of a tile. | |
void | SetRoadTypeTram (Tile t, RoadType rt) |
Set the tram road type of a tile. | |
void | SetRoadType (Tile t, RoadTramType rtt, RoadType rt) |
Set the road type of a tile. | |
void | SetRoadTypes (Tile t, RoadType road_rt, RoadType tram_rt) |
Set the present road types of a tile. | |
void | MakeRoadNormal (Tile t, RoadBits bits, RoadType road_rt, RoadType tram_rt, TownID town, Owner road, Owner tram) |
Make a normal road tile. | |
void | MakeRoadCrossing (Tile t, Owner road, Owner tram, Owner rail, Axis roaddir, RailType rat, RoadType road_rt, RoadType tram_rt, uint town) |
Make a level crossing. | |
void | SetRoadDepotExitDirection (Tile tile, DiagDirection dir) |
Sets the exit direction of a road depot. | |
void | MakeRoadDepot (Tile tile, Owner owner, DepotID depot_id, DiagDirection dir, RoadType rt) |
Make a road depot. | |
Map accessors for roads.
Definition in file road_map.h.
#define IsOnDesert IsOnSnow |
Check if a road tile has snow/desert.
Definition at line 453 of file road_map.h.
#define ToggleDesert ToggleSnow |
Toggle the snow/desert state of a road tile.
Definition at line 465 of file road_map.h.
enum Roadside : uint8_t |
The possible road side decorations.
Definition at line 477 of file road_map.h.
enum RoadTileType |
The different types of road tiles.
Enumerator | |
---|---|
ROAD_TILE_NORMAL | Normal road. |
ROAD_TILE_CROSSING | Level crossing. |
ROAD_TILE_DEPOT | Depot (one entrance) |
Definition at line 22 of file road_map.h.
|
inline |
Bar a level crossing.
t | The tile to change. |
Definition at line 447 of file road_map.h.
References SetCrossingBarred().
Get all set RoadBits on the given tile.
tile | The tile from which we want to get the RoadBits |
Definition at line 141 of file road_map.h.
References GetRoadBits().
Referenced by CheckFlatLandRoadStop(), and GetAxisForNewRoadWaypoint().
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 |
straight_tunnel_bridge_entrance | whether to return straight road bits for tunnels/bridges. |
Definition at line 33 of file road_map.cpp.
References AxisToRoadBits(), DiagDirToAxis(), DiagDirToRoadBits(), GetBayRoadStopDir(), GetCrossingRoadBits(), GetDriveThroughStopAxis(), GetRoadBits(), GetRoadDepotDirection(), GetRoadTileType(), GetTileType(), GetTunnelBridgeDirection(), GetTunnelBridgeTransportType(), HasTileRoadType(), IsAnyRoadStopTile(), IsDriveThroughStopTile(), MayHaveRoad(), MP_ROAD, MP_STATION, MP_TUNNELBRIDGE, ReverseDiagDir(), ROAD_NONE, ROAD_TILE_CROSSING, ROAD_TILE_DEPOT, ROAD_TILE_NORMAL, and TRANSPORT_ROAD.
Referenced by CanConnectToRoad(), CanRemoveRoadWithStop(), CheckAllowRemoveRoad(), CleanUpRoadBits(), CmdBuildRoad(), CmdConvertRoad(), GetTownRoadBits(), and RoadFindPathToDest().
Get the rail axis of a level crossing.
t | The tile to query. |
Definition at line 337 of file road_map.h.
References GetCrossingRoadAxis(), IsLevelCrossing(), and OtherAxis().
Referenced by DrawRoadCatenary(), DrawTile_Road(), GetCrossingRailBits(), GetCrossingRailTrack(), and TrainApproachingCrossing().
Get the rail track bits of a level crossing.
tile | The tile to query. |
Definition at line 368 of file road_map.h.
References AxisToTrackBits(), and GetCrossingRailAxis().
Referenced by CmdBuildSingleRail(), CmdRemoveSingleRail(), GetCrossingReservationTrackBits(), GetRailTrackBitsUniversal(), and RemoveRoad().
Get the rail track of a level crossing.
tile | The tile to query. |
Definition at line 358 of file road_map.h.
References AxisToTrack(), and GetCrossingRailAxis().
Referenced by CmdConvertRail(), and RemoveRoad().
Get the reserved track bits for a rail crossing.
t | the tile |
Definition at line 405 of file road_map.h.
References GetCrossingRailBits(), HasCrossingReservation(), and TRACK_BIT_NONE.
Referenced by GetReservedTrackbits().
Get the road axis of a level crossing.
t | The tile to query. |
Definition at line 325 of file road_map.h.
References GB(), IsLevelCrossing(), and Tile::m5().
Referenced by CmdBuildRoad(), CmdBuildSingleRail(), CmdRemoveSingleRail(), DrawTile_Road(), ExploreSegment(), GetCrossingRailAxis(), GetCrossingRoadBits(), MarkDirtyAdjacentLevelCrossingTiles(), RemoveRoad(), TrainApproachingCrossingTile(), UpdateAdjacentLevelCrossingTilesOnLevelCrossingRemoval(), and UpdateLevelCrossing().
Get the road bits of a level crossing.
tile | The tile to query. |
Definition at line 348 of file road_map.h.
References AXIS_X, GetCrossingRoadAxis(), ROAD_X, and ROAD_Y.
Referenced by CmdBuildRoad(), CmdRemoveSingleRail(), FixOwnerOfRailTrack(), GetAnyRoadBits(), and RemoveRoad().
|
inline |
Gets the disallowed directions.
t | the tile to get the directions from |
Definition at line 301 of file road_map.h.
References GB(), IsNormalRoad(), and Tile::m5().
Referenced by CheckFlatLandRoadStop(), CmdBuildRoad(), CmdBuildSingleRail(), CmdTurnRoadVeh(), DrawRoadBits(), and GrowTownWithBridge().
Get the present road types of a tile.
t | The tile to query. |
Definition at line 185 of file road_map.h.
References INVALID_ROADTYPE, MayHaveRoad(), ROADTYPES_NONE, and SetBit().
Referenced by HasTileAnyRoadType().
Get the present road bits for a specific road type.
t | The tile to query. |
rt | Road type. |
Definition at line 128 of file road_map.h.
References GB(), IsNormalRoad(), Tile::m3(), and Tile::m5().
Referenced by CheckFlatLandRoadStop(), CmdBuildRoad(), CmdBuildRoadStop(), CmdBuildRoadWaypoint(), CmdBuildSingleRail(), ConnectRoadToStructure(), DrawRoadBits(), DrawRoadCatenary(), GetAllRoadBits(), GetAnyRoadBits(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSingleTramBit(), GetTrackdirBitsForRoad(), and RemoveRoad().
|
inline |
Get the direction of the exit of a road depot.
t | The tile to query. |
Definition at line 565 of file road_map.h.
References GB(), IsRoadDepot(), and Tile::m5().
Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), CanRoadContinueIntoNextTile(), CmdBuildRoadDepot(), CmdBuildRoadVehicle(), DrawTile_Road(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), GetAnyRoadBits(), RoadVehicle::GetVehicleTrackdir(), CYapfCostRoadT< Types >::PfCalcCost(), and RoadFindPathToDest().
Get the owner of a specific road type.
t | The tile to query. |
rtt | RoadTramType. |
Definition at line 234 of file road_map.h.
References GB(), IsNormalRoadTile(), Tile::m1(), Tile::m3(), Tile::m7(), MayHaveRoad(), OWNER_NONE, and OWNER_TOWN.
Referenced by AfterLoadGame(), CanRemoveRoadWithStop(), CheckAllowRemoveTunnelBridge(), CheckFlatLandRoadStop(), CmdBuildBridge(), CmdBuildRoad(), CmdBuildRoadStop(), CmdBuildRoadWaypoint(), CmdBuildSingleRail(), CmdConvertRoad(), CmdRemoveSingleRail(), DoClearBridge(), DoClearTunnel(), DrawRoadTypeCatenary(), FixOwnerOfRailTrack(), IsRoadOwner(), RemoveGenericRoadStop(), RemoveRoad(), RemoveRoadStop(), and RemoveRoadWaypointStop().
Get the decorations of a road.
tile | The tile to query. |
Definition at line 493 of file road_map.h.
References GB(), and Tile::m6().
Referenced by DoClearBridge(), DrawRoadBits(), DrawTile_Road(), HasRoadWorks(), StartRoadWorks(), and TerminateRoadWorks().
|
static |
Get the type of the road tile.
t | Tile to query. |
Definition at line 52 of file road_map.h.
References GB(), IsTileType(), Tile::m5(), and MP_ROAD.
Referenced by AfterLoadGame(), CmdBuildRoad(), DrawTile_Road(), GetAnyRoadBits(), IsLevelCrossing(), IsNormalRoad(), IsRoadDepot(), and RemoveRoad().
Definition at line 175 of file road_map.h.
Definition at line 163 of file road_map.h.
Definition at line 169 of file road_map.h.
|
inline |
Get the reservation state of the rail crossing.
t | the crossing tile |
Definition at line 380 of file road_map.h.
References HasBit(), IsLevelCrossingTile(), and Tile::m5().
Referenced by CheckLevelCrossing(), DrawTile_Road(), GetCrossingReservationTrackBits(), RemoveRoad(), TrainController(), and TryReserveRailTrack().
|
inline |
Definition at line 195 of file road_map.h.
|
inline |
Definition at line 200 of file road_map.h.
|
inline |
Check if a tile has road works.
t | The tile to check. |
Definition at line 513 of file road_map.h.
References GetRoadside(), and ROADSIDE_GRASS_ROAD_WORKS.
Referenced by CmdBuildRoad(), CmdBuildSingleRail(), DrawRoadBits(), RemoveRoad(), StartRoadWorks(), and TerminateRoadWorks().
Check if a tile has one of the specified road types.
t | The tile to check. |
rts | Allowed road types. |
Definition at line 222 of file road_map.h.
References GetPresentRoadTypes(), and MayHaveRoad().
Referenced by CheckRoadBlockedForOvertaking(), CmdBuildRoadVehicle(), RoadStop::GetNextRoadStop(), and GetVehicleCannotUseStationReason().
|
inline |
Check if a tile has a road or a tram road type.
t | The tile to check. |
tram | True to check tram, false to check road. |
Definition at line 211 of file road_map.h.
References INVALID_ROADTYPE.
Referenced by ClearTile_Station(), CmdBuildRoad(), GetAnyRoadBits(), GrowTownAtRoad(), HasTownOwnedRoad(), and IsRoadOwner().
|
inline |
Checks if given tile has town owned road.
t | tile to check |
Definition at line 280 of file road_map.h.
References HasTileRoadType(), IsRoadOwner(), and OWNER_TOWN.
Referenced by AfterLoadGame(), ClosestTownFromTile(), CmdDeleteTown(), UpdateNearestTownForRoadTiles(), and Town::~Town().
|
inline |
Increase the progress counter of road works.
t | The tile to modify. |
Definition at line 523 of file road_map.h.
References AB(), GB(), and Tile::m7().
|
inline |
Check if the level crossing is barred.
t | The tile to query. |
Definition at line 416 of file road_map.h.
References HasBit(), IsLevelCrossing(), and Tile::m5().
Referenced by DrawTile_Road(), RailTypeScopeResolver::GetVariable(), RoadTypeScopeResolver::GetVariable(), MaybeBarCrossingWithSound(), UpdateAdjacentLevelCrossingTilesOnLevelCrossingRemoval(), and UpdateLevelCrossingTile().
|
inline |
Return whether a tile is a level crossing.
t | Tile to query. |
Definition at line 85 of file road_map.h.
References GetRoadTileType(), and ROAD_TILE_CROSSING.
Referenced by AfterLoadGame(), CmdBuildSingleRail(), CmdConvertRail(), CmdConvertRoad(), CmdRemoveSingleRail(), ConvertRailTypes(), DrawRoadCatenary(), ExploreSegment(), GetCrossingRailAxis(), GetCrossingRoadAxis(), GetGrfSpecFeature(), GetRailTrackBitsUniversal(), GetReservedTrackbits(), GetTileRailType(), IsCrossingBarred(), IsLevelCrossingTile(), CYapfCostRailT< Types >::OneTileCost(), CYapfCostRoadT< Types >::OneTileCost(), SetCrossingBarred(), TryReserveRailTrack(), and UnreserveRailTrack().
|
inline |
Return whether a tile is a level crossing tile.
t | Tile to query. |
Definition at line 95 of file road_map.h.
References IsLevelCrossing(), IsTileType(), and MP_ROAD.
Referenced by AfterLoadGame(), ChangeOwnershipOfCompanyItems(), CmdConvertRail(), DeleteLastWagon(), DrawTile_Road(), FixOwnerOfRailTrack(), RailTypeScopeResolver::GetVariable(), RoadTypeScopeResolver::GetVariable(), HasCrossingReservation(), MarkDirtyAdjacentLevelCrossingTiles(), SetCrossingReservation(), SetDefaultRailGui(), TrainApproachingCrossing(), TrainApproachingCrossingTile(), TrainCheckIfLineEnds(), TrainController(), TrainOnCrossing(), UpdateAdjacentLevelCrossingTilesOnLevelCrossingRemoval(), UpdateLevelCrossing(), and UpdateLevelCrossingTile().
|
static |
Return whether a tile is a normal road.
t | Tile to query. |
Definition at line 64 of file road_map.h.
References GetRoadTileType(), and ROAD_TILE_NORMAL.
Referenced by CmdBuildRoad(), CmdBuildSingleRail(), DrawRoadCatenary(), GetDisallowedRoadDirections(), GetRoadBits(), IsNormalRoadTile(), SetDisallowedRoadDirections(), and SetRoadBits().
|
static |
Return whether a tile is a normal road tile.
t | Tile to query. |
Definition at line 74 of file road_map.h.
References IsNormalRoad(), IsTileType(), and MP_ROAD.
Referenced by CheckFlatLandRoadStop(), CleanUpRoadBits(), CmdBuildRoad(), CmdBuildRoadStop(), CmdBuildRoadWaypoint(), CmdTurnRoadVeh(), ConnectRoadToStructure(), DoClearBridge(), GetAxisForNewRoadWaypoint(), GetRoadOwner(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSingleTramBit(), GetTrackdirBitsForRoad(), GrowTownWithBridge(), and SetRoadOwner().
|
inline |
Check if a road tile has snow/desert.
t | The tile to query. |
Definition at line 459 of file road_map.h.
References HasBit(), and Tile::m7().
Referenced by DrawRoadBits(), DrawTile_Road(), and GetTerrainType().
|
static |
Return whether a tile is a road depot.
t | Tile to query. |
Definition at line 106 of file road_map.h.
References GetRoadTileType(), and ROAD_TILE_DEPOT.
Referenced by AfterLoadGame(), CanRoadContinueIntoNextTile(), ClosestTownFromTile(), CmdBuildBridge(), CmdConvertRoad(), GetRoadDepotDirection(), GetTownIndex(), GrowTownAtRoad(), IsRoadDepotTile(), RoadFindPathToDest(), SetTownIndex(), and UpdateNearestTownForRoadTiles().
|
static |
Return whether a tile is a road depot tile.
t | Tile to query. |
Definition at line 116 of file road_map.h.
References IsRoadDepot(), IsTileType(), and MP_ROAD.
Referenced by CmdBuildRoadDepot(), CmdConvertRoad(), CmdInsertOrder(), GetDepotIndex(), GetTownRoadBits(), RoadTypeScopeResolver::GetVariable(), IsDepotTile(), IsDepotTypeTile(), CYapfCostRoadT< Types >::PfCalcCost(), CYapfDestinationAnyDepotRoadT< Types >::PfDetectDestination(), and SetRoadDepotExitDirection().
Check if a specific road type is owned by an owner.
t | The tile to query. |
tram | True to check tram, false to check road. |
o | Owner to compare with. |
Definition at line 268 of file road_map.h.
References GetRoadOwner(), and HasTileRoadType().
Referenced by GrowTownAtRoad(), HasTownOwnedRoad(), and RemoveRoad().
|
inline |
Checks if a DisallowedRoadDirections is valid.
wc | The value to check |
Definition at line 291 of file road_map.h.
References DRD_END.
Referenced by CmdBuildLongRoad(), and CmdBuildRoad().
|
inline |
Make a level crossing.
t | Tile to make a level crossing. |
road | New owner of road. |
tram | New owner of tram tracks. |
rail | New owner of the rail track. |
roaddir | Axis of the road. |
rat | New rail type. |
road_rt | The road roadtype to set for the tile. |
tram_rt | The tram roadtype to set for the tile. |
town | Town ID if the road is a town-owned road. |
Definition at line 660 of file road_map.h.
References INVALID_ROADTYPE, Tile::m2(), Tile::m3(), Tile::m4(), Tile::m5(), Tile::m6(), Tile::m7(), Tile::m8(), MP_ROAD, ROAD_TILE_CROSSING, SB(), SetRoadOwner(), SetRoadTypes(), SetTileOwner(), and SetTileType().
Referenced by CmdBuildRoad(), and CmdBuildSingleRail().
|
inline |
Make a road depot.
tile | Tile to make a depot on. |
owner | New owner of the depot. |
depot_id | New depot ID. |
dir | Direction of the depot exit. |
rt | Road type of the depot. |
Definition at line 694 of file road_map.h.
References INVALID_ROADTYPE, Tile::m2(), Tile::m3(), Tile::m4(), Tile::m5(), Tile::m6(), Tile::m7(), Tile::m8(), MP_ROAD, ROAD_TILE_DEPOT, SB(), SetRoadOwner(), SetRoadType(), SetTileOwner(), and SetTileType().
Referenced by CmdBuildRoadDepot().
|
inline |
Make a normal road tile.
t | Tile to make a normal road. |
bits | Road bits to set for all present road types. |
road_rt | The road roadtype to set for the tile. |
tram_rt | The tram roadtype to set for the tile. |
town | Town ID if the road is a town-owned road. |
road | New owner of road. |
tram | New owner of tram tracks. |
Definition at line 635 of file road_map.h.
References INVALID_ROADTYPE, Tile::m2(), Tile::m3(), Tile::m5(), Tile::m6(), Tile::m7(), MP_ROAD, ROAD_TILE_NORMAL, SB(), SetRoadOwner(), SetRoadTypes(), SetTileOwner(), and SetTileType().
Referenced by CmdBuildRoad(), CmdRemoveSingleRail(), and RemoveGenericRoadStop().
|
inline |
Test whether a tile can have road/tram types.
t | Tile to query. |
Definition at line 33 of file road_map.h.
References GetTileType(), MP_ROAD, MP_STATION, and MP_TUNNELBRIDGE.
Referenced by CanConnectToRoad(), CmdBuildRoadStop(), CmdBuildRoadWaypoint(), CmdConvertRoad(), DrawRoadTypeCatenary(), GetAnyRoadBits(), GetPresentRoadTypes(), GetRoadOwner(), HasTileAnyRoadType(), RemoveRoad(), SetRoadTypeRoad(), and SetRoadTypeTram().
|
inline |
Set the bar state of a level crossing.
t | The tile to modify. |
barred | True if the crossing should be barred, false otherwise. |
Definition at line 428 of file road_map.h.
References AssignBit(), IsLevelCrossing(), and Tile::m5().
Referenced by BarCrossing(), UnbarCrossing(), UpdateAdjacentLevelCrossingTilesOnLevelCrossingRemoval(), and UpdateLevelCrossingTile().
|
inline |
Set the reservation state of the rail crossing.
t | the crossing tile |
b | the reservation state |
Definition at line 393 of file road_map.h.
References AssignBit(), IsLevelCrossingTile(), and Tile::m5().
Referenced by AfterLoadGame(), CmdBuildRoad(), MaybeBarCrossingWithSound(), TryReserveRailTrack(), and UnreserveRailTrack().
|
inline |
Sets the disallowed directions.
t | the tile to set the directions for |
drd | the disallowed directions |
Definition at line 312 of file road_map.h.
References DRD_END, IsNormalRoad(), Tile::m5(), and SB().
Referenced by CmdBuildRoad(), and RemoveRoad().
Set the present road bits for a specific road type.
t | The tile to change. |
r | The new road bits. |
rt | Road type. |
Definition at line 153 of file road_map.h.
References IsNormalRoad(), Tile::m3(), Tile::m5(), and SB().
Referenced by CmdBuildRoad(), and RemoveRoad().
|
inline |
Sets the exit direction of a road depot.
tile | Tile of the depot. |
dir | Direction of the depot exit. |
Definition at line 680 of file road_map.h.
References IsRoadDepotTile(), Tile::m5(), and SB().
Referenced by CmdBuildRoadDepot().
Set the owner of a specific road type.
t | The tile to change. |
rtt | RoadTramType. |
o | New owner of the given road type. |
Definition at line 251 of file road_map.h.
References IsNormalRoadTile(), Tile::m1(), Tile::m3(), Tile::m7(), OWNER_NONE, OWNER_TOWN, and SB().
Referenced by AfterLoadGame(), CmdBuildRoad(), ConvertRoadTypeOwner(), FixOwnerOfRailTrack(), GrowTownAtRoad(), MakeDriveThroughRoadStop(), MakeRoadBridgeRamp(), MakeRoadCrossing(), MakeRoadDepot(), MakeRoadNormal(), MakeRoadStop(), and MakeRoadTunnel().
Set the decorations of a road.
tile | The tile to change. |
s | The new road decoration of the tile. |
Definition at line 503 of file road_map.h.
References Tile::m6(), and SB().
Referenced by DoClearBridge(), StartRoadWorks(), and TerminateRoadWorks().
Set the road type of a tile.
t | The tile to change. |
rtt | Set road or tram type. |
rt | The road type to set. |
Definition at line 604 of file road_map.h.
References SetRoadTypeRoad(), and SetRoadTypeTram().
Referenced by CmdBuildRoad(), CmdConvertRoad(), MakeRoadDepot(), and RemoveRoad().
Set the road road type of a tile.
t | The tile to change. |
rt | The road type to set. |
Definition at line 579 of file road_map.h.
References INVALID_ROADTYPE, Tile::m4(), MayHaveRoad(), and SB().
Referenced by ConvertRoadTypes(), SetRoadType(), and SetRoadTypes().
Set the present road types of a tile.
t | The tile to change. |
road_rt | The road roadtype to set for the tile. |
tram_rt | The tram roadtype to set for the tile. |
Definition at line 619 of file road_map.h.
References SetRoadTypeRoad(), and SetRoadTypeTram().
Referenced by AfterLoadGame(), MakeDriveThroughRoadStop(), MakeRailTunnel(), MakeRoadBridgeRamp(), MakeRoadCrossing(), MakeRoadNormal(), MakeRoadStop(), and MakeRoadTunnel().
Set the tram road type of a tile.
t | The tile to change. |
rt | The road type to set. |
Definition at line 591 of file road_map.h.
References INVALID_ROADTYPE, Tile::m8(), MayHaveRoad(), and SB().
Referenced by ConvertRoadTypes(), SetRoadType(), and SetRoadTypes().
|
inline |
Start road works on a tile.
t | The tile to start the work on. |
Definition at line 535 of file road_map.h.
References GetRoadside(), HasRoadWorks(), ROADSIDE_BARREN, ROADSIDE_GRASS, ROADSIDE_GRASS_ROAD_WORKS, ROADSIDE_PAVED_ROAD_WORKS, and SetRoadside().
|
inline |
Terminate road works on a tile.
t | Tile to stop the road works on. |
Definition at line 551 of file road_map.h.
References GetRoadside(), HasRoadWorks(), Tile::m7(), ROADSIDE_GRASS, ROADSIDE_GRASS_ROAD_WORKS, SB(), and SetRoadside().
|
inline |
Toggle the snow/desert state of a road tile.
t | The tile to change. |
Definition at line 470 of file road_map.h.
References Tile::m7(), and ToggleBit().
|
inline |
Unbar a level crossing.
t | The tile to change. |
Definition at line 438 of file road_map.h.
References SetCrossingBarred().