OpenTTD Source: src/station_map.h File Reference

OpenTTD Source 15.0-RC2

Typedefs | Functions | Variables
station_map.h File Reference

Maps accessors for stations. More...

`#include "rail_map.h"`
`#include "road_map.h"`
`#include "water_map.h"`
`#include "station_func.h"`
`#include "rail.h"`
`#include "road.h"`

Go to the source code of this file.

## Typedefs
typedef uint8_t | StationGfx
| Index of station graphics.

## Functions
StationID | GetStationIndex (Tile t)
| Get StationID from a tile.
StationType | GetStationType (Tile t)
| Get the station type of this tile.
RoadStopType | GetRoadStopType (Tile t)
| Get the road stop type of this tile.
StationGfx | GetStationGfx (Tile t)
| Get the station graphics of this tile.
void | SetStationGfx (Tile t, StationGfx gfx)
| Set the station graphics of this tile.
bool | IsRailStation (Tile t)
| Is this station tile a rail station?
bool | IsRailStationTile (Tile t)
| Is this tile a station tile and a rail station?
bool | IsRailWaypoint (Tile t)
| Is this station tile a rail waypoint?
bool | IsRailWaypointTile (Tile t)
| Is this tile a station tile and a rail waypoint?
bool | HasStationRail (Tile t)
| Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint?
bool | HasStationTileRail (Tile t)
| Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint?
bool | IsAirport (Tile t)
| Is this station tile an airport?
bool | IsAirportTile (Tile t)
| Is this tile a station tile and an airport tile?
bool | IsHangar (Tile t)
| Check whether the given tile is a hangar.
bool | IsTruckStop (Tile t)
| Is the station at t a truck stop?
bool | IsBusStop (Tile t)
| Is the station at t a bus stop?
bool | IsRoadWaypoint (Tile t)
| Is the station at t a road waypoint?
bool | IsRoadWaypointTile (Tile t)
| Is this tile a station tile and a road waypoint?
bool | IsStationRoadStop (Tile t)
| Is the station at t a road station?
bool | IsStationRoadStopTile (Tile t)
| Is tile t a road stop station?
bool | IsAnyRoadStop (Tile t)
| Is the station at t a road station?
bool | IsAnyRoadStopTile (Tile t)
| Is tile t a road stop station?
bool | IsBayRoadStopTile (Tile t)
| Is tile t a bay (non-drive through) road stop station?
bool | IsDriveThroughStopTile (Tile t)
| Is tile t a drive through road stop station or waypoint?
StationGfx | GetTranslatedAirportTileID (StationGfx gfx)
| Do airporttile gfx ID translation for NewGRFs.
static Roadside | GetRoadWaypointRoadside (Tile tile)
| Get the decorations of a road waypoint.
static void | SetRoadWaypointRoadside (Tile tile, Roadside s)
| Set the decorations of a road waypoint.
static bool | IsRoadWaypointOnSnowOrDesert (Tile t)
| Check if a road waypoint tile has snow/desert.
static void | ToggleRoadWaypointOnSnowOrDesert (Tile t)
| Toggle the snow/desert state of a road waypoint tile.
StationGfx | GetAirportGfx (Tile t)
| Get the station graphics of this airport tile.
DiagDirection | GetBayRoadStopDir (Tile t)
| Gets the direction the bay road stop entrance points towards.
Axis | GetDriveThroughStopAxis (Tile t)
| Gets the axis of the drive through stop.
bool | IsOilRig (Tile t)
| Is tile t part of an oilrig?
bool | IsDock (Tile t)
| Is tile t a dock tile?
bool | IsDockTile (Tile t)
| Is tile t a dock tile?
bool | IsBuoy (Tile t)
| Is tile t a buoy tile?
bool | IsBuoyTile (Tile t)
| Is tile t a buoy tile?
bool | IsHangarTile (Tile t)
| Is tile t an hangar tile?
bool | IsStationTileBlocked (Tile t)
| Is tile t a blocked tile?
void | SetStationTileBlocked (Tile t, bool b)
| Set the blocked state of the rail station.
bool | CanStationTileHaveWires (Tile t)
| Can tile t have catenary wires?
void | SetStationTileHaveWires (Tile t, bool b)
| Set the catenary wires state of the rail station.
bool | CanStationTileHavePylons (Tile t)
| Can tile t have catenary pylons?
void | SetStationTileHavePylons (Tile t, bool b)
| Set the catenary pylon state of the rail station.
Axis | GetRailStationAxis (Tile t)
| Get the rail direction of a rail station.
Track | GetRailStationTrack (Tile t)
| Get the rail track of a rail station tile.
TrackBits | GetRailStationTrackBits (Tile t)
| Get the trackbits of a rail station tile.
bool | IsCompatibleTrainStationTile (Tile test_tile, Tile station_tile)
| Check if a tile is a valid continuation to a railstation tile.
bool | HasStationReservation (Tile t)
| Get the reservation state of the rail station.
void | SetRailStationReservation (Tile t, bool b)
| Set the reservation state of the rail station.
TrackBits | GetStationReservationTrackBits (Tile t)
| Get the reserved track bits for a waypoint.
DiagDirection | GetDockDirection (Tile t)
| Get the direction of a dock.
bool | IsDockWaterPart (Tile t)
| Check whether a dock tile is the tile on water.
bool | IsCustomStationSpecIndex (Tile t)
| Is there a custom rail station spec on this tile?
void | SetCustomStationSpecIndex (Tile t, uint8_t specindex)
| Set the custom station spec for this tile.
uint | GetCustomStationSpecIndex (Tile t)
| Get the custom station spec for this tile.
bool | IsCustomRoadStopSpecIndex (Tile t)
| Is there a custom road stop spec on this tile?
void | SetCustomRoadStopSpecIndex (Tile t, uint8_t specindex)
| Set the custom road stop spec for this tile.
uint | GetCustomRoadStopSpecIndex (Tile t)
| Get the custom road stop spec for this tile.
void | SetStationTileRandomBits (Tile t, uint8_t random_bits)
| Set the random bits for a station tile.
uint8_t | GetStationTileRandomBits (Tile t)
| Get the random bits of a station tile.
void | MakeStation (Tile t, Owner o, StationID sid, StationType st, uint8_t section, WaterClass wc=WaterClass::Invalid)
| Make the given tile a station tile.
void | MakeRailStation (Tile t, Owner o, StationID sid, Axis a, uint8_t section, RailType rt)
| Make the given tile a rail station tile.
void | MakeRailWaypoint (Tile t, Owner o, StationID sid, Axis a, uint8_t section, RailType rt)
| Make the given tile a rail waypoint tile.
void | MakeRoadStop (Tile t, Owner o, StationID sid, RoadStopType rst, RoadType road_rt, RoadType tram_rt, DiagDirection d)
| Make the given tile a roadstop tile.
void | MakeDriveThroughRoadStop (Tile t, Owner station, Owner road, Owner tram, StationID sid, StationType rst, RoadType road_rt, RoadType tram_rt, Axis a)
| Make the given tile a drivethrough roadstop tile.
void | MakeAirport (Tile t, Owner o, StationID sid, uint8_t section, WaterClass wc)
| Make the given tile an airport tile.
void | MakeBuoy (Tile t, StationID sid, WaterClass wc)
| Make the given tile a buoy tile.
void | MakeDock (Tile t, Owner o, StationID sid, DiagDirection d, WaterClass wc)
| Make the given tile a dock tile.
void | MakeOilrig (Tile t, StationID sid, WaterClass wc)
| Make the given tile an oilrig tile.

## Variables
static const int | GFX_DOCK_BASE_WATER_PART = 4
| The offset for the water parts.
static const int | GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET = 4
| The offset for the drive through parts.

## Detailed Description

Maps accessors for stations.

Definition in file station_map.h.

## Typedef Documentation

## ◆ StationGfx

typedef uint8_t StationGfx

Index of station graphics.

See also
  _station_display_datas

Definition at line 20 of file station_map.h.

## Function Documentation

## ◆ CanStationTileHavePylons()

bool CanStationTileHavePylons | ( | Tile | t | ) |
| inline

Can tile t have catenary pylons?

Precondition
  HasStationRail(t)

Parameters

  t | Tile to check

Returns
  `true` if the tile can have catenary pylons

Definition at line 479 of file station_map.h.

References HasBit(), HasStationRail(), and Tile::m3().

Referenced by DrawRailCatenaryRailway().

## ◆ CanStationTileHaveWires()

bool CanStationTileHaveWires | ( | Tile | t | ) |
| inline

Can tile t have catenary wires?

Precondition
  HasStationRail(t)

Parameters

  t | Tile to check

Returns
  `true` if the tile can have catenary wires

Definition at line 455 of file station_map.h.

References HasBit(), HasStationRail(), and Tile::m3().

Referenced by DrawRailCatenaryRailway(), and MaskWireBits().

## ◆ GetAirportGfx()

StationGfx GetAirportGfx | ( | Tile | t | ) |
| inline

Get the station graphics of this airport tile.

Parameters

  t | the tile to query

Precondition
  IsAirport(t)

Returns
  the station graphics

Definition at line 332 of file station_map.h.

References GetStationGfx(), GetTranslatedAirportTileID(), and IsAirport().

Referenced by GetAirportTileIDAtOffset(), NIHAirportTile::GetBadges(), AirportTileSpec::GetByTile(), NIHAirportTile::GetGRFID(), NIHAirportTile::GetSpec(), and NIHAirportTile::IsInspectable().

## ◆ GetBayRoadStopDir()

DiagDirection GetBayRoadStopDir | ( | Tile | t | ) |
| inline

Gets the direction the bay road stop entrance points towards.

Parameters

  t | the tile of the road stop

Precondition
  IsBayRoadStopTile(t)

Returns
  the direction of the entrance

Definition at line 344 of file station_map.h.

References GetStationGfx(), and IsBayRoadStopTile().

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(), DrawRoadCatenary(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), GetAnyRoadBits(), RoadVehicle::GetVehicleTrackdir(), and RoadFindPathToDest().

## ◆ GetCustomRoadStopSpecIndex()

uint GetCustomRoadStopSpecIndex | ( | Tile | t | ) |
| inline

Get the custom road stop spec for this tile.

Parameters

  t | Tile to query

Precondition
  IsAnyRoadStopTile(t)

Returns
  The custom station spec of this tile.

Definition at line 678 of file station_map.h.

References GB(), IsAnyRoadStopTile(), and Tile::m8().

Referenced by DeallocateSpecFromRoadStop(), RoadStopScopeResolver::GetVariable(), RemoveRoadStop(), and RemoveRoadWaypointStop().

## ◆ GetCustomStationSpecIndex()

uint GetCustomStationSpecIndex | ( | Tile | t | ) |
| inline

Get the custom station spec for this tile.

Parameters

  t | Tile to query

Precondition
  HasStationTileRail(t)

Returns
  The custom station spec of this tile.

Definition at line 642 of file station_map.h.

References HasStationTileRail(), and Tile::m4().

Referenced by CmdBuildRailStation(), CmdBuildRailWaypoint(), DeallocateSpecFromStation(), FindRailStationEnd(), StationScopeResolver::GetVariable(), RemoveFromRailBaseStation(), and StationUsesDefaultType().

## ◆ GetDockDirection()

DiagDirection GetDockDirection | ( | Tile | t | ) |
| inline

Get the direction of a dock.

Parameters

  t | Tile to query

Precondition
  IsDock(t)
  t is the land part of the dock

Returns
  The direction of the dock on tile t.

Definition at line 595 of file station_map.h.

References GetStationGfx(), GFX_DOCK_BASE_WATER_PART, and IsDock().

Referenced by FindDockLandPart(), and RemoveDock().

## ◆ GetDriveThroughStopAxis()

Axis GetDriveThroughStopAxis | ( | Tile | t | ) |
| inline

Gets the axis of the drive through stop.

Parameters

  t | the tile of the road stop

Precondition
  IsDriveThroughStopTile(t)

Returns
  the axis the drive through is in

Definition at line 356 of file station_map.h.

References GetStationGfx(), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET, and IsDriveThroughStopTile().

Referenced by CanRoadContinueIntoNextTile(), CheckFlatLandRoadStop(), RoadStop::Entry::CheckIntegrity(), RoadStop::ClearDriveThrough(), CmdBuildRoad(), DrawRoadCatenary(), GetAnyRoadBits(), GetAxisForNewRoadWaypoint(), RoadStop::IsDriveThroughRoadStopContinuation(), RoadStop::MakeDriveThrough(), RoadStop::Entry::Rebuild(), and RemoveGenericRoadStop().

## ◆ GetRailStationAxis()

Axis GetRailStationAxis | ( | Tile | t | ) |
| inline

Get the rail direction of a rail station.

Parameters

  t | Tile to query

Precondition
  HasStationRail(t)

Returns
  The direction of the rails on tile t.

Definition at line 503 of file station_map.h.

References AXIS_X, AXIS_Y, GetStationGfx(), HasBit(), and HasStationRail().

Referenced by CalculateRailStationCost(), CmdBuildRailStation(), DeleteLastWagon(), ExploreSegment(), FindRailStationEnd(), GetAxisForNewRailWaypoint(), GetNearbyTile(), Station::GetPlatformLength(), GetRailStationTrack(), GetRailStationTrackBits(), GetRailTileArea(), StationScopeResolver::GetVariable(), IsCompatibleTrainStationTile(), MaskWireBits(), and SetRailStationPlatformReservation().

## ◆ GetRailStationTrack()

Track GetRailStationTrack | ( | Tile | t | ) |
| inline

Get the rail track of a rail station tile.

Parameters

  t | Tile to query

Precondition
  HasStationRail(t)

Returns
  The rail track of the rails on tile t.

Definition at line 515 of file station_map.h.

References AxisToTrack(), and GetRailStationAxis().

Referenced by CmdConvertRail(), GetRailTrackBitsUniversal(), CYapfDestinationTileOrStationRailT< Types >::PfDetectDestination(), and RemoveFromRailBaseStation().

## ◆ GetRailStationTrackBits()

TrackBits GetRailStationTrackBits | ( | Tile | t | ) |
| inline

Get the trackbits of a rail station tile.

Parameters

  t | Tile to query

Precondition
  HasStationRail(t)

Returns
  The trackbits of the rails on tile t.

Definition at line 526 of file station_map.h.

References AxisToTrackBits(), and GetRailStationAxis().

Referenced by GetStationReservationTrackBits().

## ◆ GetRoadStopType()

RoadStopType GetRoadStopType | ( | Tile | t | ) |
| inline

Get the road stop type of this tile.

Parameters

  t | the tile to query

Precondition
  GetStationType(t) == StationType::Truck || GetStationType(t) == StationType::Bus

Returns
  the road stop type

Definition at line 56 of file station_map.h.

References Bus, GetStationType(), and Truck.

Referenced by RoadStop::ClearDriveThrough(), RoadVehicle::Crash(), DeleteLastRoadVeh(), RoadStop::MakeDriveThrough(), CYapfCostRoadT< Types >::OneTileCost(), Vehicle::PreDestructor(), and RoadFindPathToDest().

## ◆ GetRoadWaypointRoadside()

static Roadside GetRoadWaypointRoadside | ( | Tile | tile | ) |
| inlinestatic

Get the decorations of a road waypoint.

Parameters

  tile | The tile to query.

Returns
  The road decoration of the tile.

Definition at line 288 of file station_map.h.

References GB(), IsRoadWaypointTile(), and Tile::m3().

## ◆ GetStationGfx()

StationGfx GetStationGfx | ( | Tile | t | ) |
| inline

Get the station graphics of this tile.

Parameters

  t | the tile to query

Precondition
  IsTileType(t, MP_STATION)

Returns
  the station graphics

Definition at line 68 of file station_map.h.

References IsTileType(), Tile::m5(), and MP_STATION.

Referenced by AfterLoadGame(), CmdBuildRailStation(), FindDockLandPart(), GetAirportGfx(), GetBayRoadStopDir(), GetDockDirection(), GetDriveThroughStopAxis(), GetRailStationAxis(), RoadStopScopeResolver::GetVariable(), StationScopeResolver::GetVariable(), IsBayRoadStopTile(), IsDockWaterPart(), IsDriveThroughStopTile(), SetRailStationTileFlags(), and TriggerRoadStopRandomisation().

## ◆ GetStationIndex()

StationID GetStationIndex | ( | Tile | t | ) |
| inline

Get StationID from a tile.

Parameters

  t | Tile to query station ID from

Precondition
  IsTileType(t, MP_STATION)

Returns
  Station ID of the station at t

Definition at line 28 of file station_map.h.

References IsTileType(), Tile::m2(), and MP_STATION.

Referenced by AddNearbyStation(), CheckFlatLandRailStation(), CheckFlatLandRoadStop(), CheckNextTrainTile(), CmdBuildAircraft(), CmdReverseTrainDirection(), DisasterTick_Zeppeliner(), FindRailStationEnd(), ForAllStationsAroundTiles(), FreeTrainTrackReservation(), BaseStation::GetByTile(), SpecializedStation< T, Tis_waypoint >::GetByTile(), Train::GetCurrentMaxSpeed(), GetDepotDestinationIndex(), NIHStation::GetName(), NIHAirportTile::GetName(), NIHRoadStop::GetName(), GetNearbyAirportTileInformation(), GetOrderCmdFromTile(), NIHAirportTile::GetParent(), GetStationAround(), GetTileHighlightType(), RoadStopScopeResolver::GetVariable(), IsCompatibleTrainStationTile(), RoadStop::IsDriveThroughRoadStopContinuation(), IsShipDestinationTile(), IsValidTileForWaypoint(), LoadUnloadVehicle(), MoveBuoysToWaypoints(), CYapfCostRailT< Types >::PfCalcCost(), CYapfDestinationTileOrStationRailT< Types >::PfDetectDestination(), ProcessOrders(), Station::RecomputeCatchment(), StationRect::ScanForStationTiles(), Vehicle::ShowVisualEffect(), Station::TileBelongsToRailStation(), Waypoint::TileBelongsToRailStation(), TrainController(), and VehicleEnterDepot().

## ◆ GetStationReservationTrackBits()

TrackBits GetStationReservationTrackBits | ( | Tile | t | ) |
| inline

Get the reserved track bits for a waypoint.

Precondition
  HasStationRail(t)

Parameters

  t | the tile

Returns
  reserved track bits

Definition at line 583 of file station_map.h.

References GetRailStationTrackBits(), HasStationReservation(), and TRACK_BIT_NONE.

Referenced by GetReservedTrackbits().

## ◆ GetStationTileRandomBits()

uint8_t GetStationTileRandomBits | ( | Tile | t | ) |
| inline

Get the random bits of a station tile.

Parameters

  t | Tile to query

Precondition
  IsTileType(t, MP_STATION)

Returns
  The random bits for this station tile.

Definition at line 702 of file station_map.h.

References GB(), IsTileType(), Tile::m3(), and MP_STATION.

Referenced by AirportTileScopeResolver::GetRandomBits(), StationScopeResolver::GetRandomBits(), and TriggerStationRandomisation().

## ◆ GetStationType()

StationType GetStationType | ( | Tile | t | ) |
| inline

Get the station type of this tile.

Parameters

  t | the tile to query

Precondition
  IsTileType(t, MP_STATION)

Returns
  the station type

Definition at line 44 of file station_map.h.

References GB(), IsTileType(), Tile::m6(), and MP_STATION.

Referenced by AfterLoadGame(), CheckFlatLandRoadStop(), ClearTile_Station(), GetGrfSpecFeature(), GetRoadStopType(), GetSmallMapRoutesPixels(), GetTileCatchmentRadius(), RoadStopScopeResolver::GetVariable(), IsAirport(), IsBuoy(), IsBusStop(), IsDock(), IsDockTile(), RoadStop::IsDriveThroughRoadStopContinuation(), IsOilRig(), IsRailStation(), IsRailWaypoint(), IsRoadWaypoint(), IsTruckStop(), and TriggerRoadStopRandomisation().

## ◆ GetTranslatedAirportTileID()

StationGfx GetTranslatedAirportTileID | ( | StationGfx | gfx | ) |

Do airporttile gfx ID translation for NewGRFs.

Parameters

  gfx | the type to get the override for.

Returns
  the gfx to actually work with.

Definition at line 98 of file newgrf_airporttiles.cpp.

References AirportTileSpec::Get(), AirportTileSpec::grf_prop, INVALID_AIRPORTTILE, and SubstituteGRFFileProps::override_id.

Referenced by CmdBuildAirport(), and GetAirportGfx().

## ◆ HasStationRail()

bool HasStationRail | ( | Tile | t | ) |
| inline

Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint?

Parameters

  t | the tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  true if and only if the tile has rail

Definition at line 135 of file station_map.h.

References IsRailStation(), and IsRailWaypoint().

Referenced by AfterLoadGame(), CanStationTileHavePylons(), CanStationTileHaveWires(), CmdConvertRail(), ConvertRailTypes(), ExploreSegment(), FindRailStationEnd(), GetRailStationAxis(), GetRailTrackBitsUniversal(), GetReservedTrackbits(), GetTileRailType(), HasStationReservation(), HasStationTileRail(), IsStationTileBlocked(), SetRailStationReservation(), SetStationTileBlocked(), SetStationTileHavePylons(), SetStationTileHaveWires(), StationUsesDefaultType(), TryReserveRailTrack(), and UnreserveRailTrack().

## ◆ HasStationReservation()

bool HasStationReservation | ( | Tile | t | ) |
| inline

Get the reservation state of the rail station.

Precondition
  HasStationRail(t)

Parameters

  t | the station tile

Returns
  reservation state

Definition at line 559 of file station_map.h.

References HasBit(), HasStationRail(), and Tile::m6().

Referenced by CmdBuildRailStation(), CmdBuildRailWaypoint(), FollowReservation(), GetStationReservationTrackBits(), StationScopeResolver::GetVariable(), CYapfCostRailT< Types >::IsAnyStationTileReserved(), RemoveFromRailBaseStation(), CYapfReserveTrack< Types >::ReserveRailStationPlatform(), and TryReserveRailTrack().

## ◆ HasStationTileRail()

bool HasStationTileRail | ( | Tile | t | ) |
| inline

Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint?

Parameters

  t | the tile to check

Returns
  true if and only if the tile is a station tile and has rail

Definition at line 146 of file station_map.h.

References HasStationRail(), IsTileType(), and MP_STATION.

Referenced by AfterLoadGame(), CmdBuildRailStation(), CmdBuildRailWaypoint(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), GetCustomStationSpecIndex(), GetNearbyTile(), StationScopeResolver::GetVariable(), IsCustomStationSpecIndex(), MaskWireBits(), CYapfDestinationTileOrStationRailT< Types >::PfDetectDestination(), RemoveFromRailBaseStation(), SetCustomStationSpecIndex(), and SetDefaultRailGui().

## ◆ IsAirport()

bool IsAirport | ( | Tile | t | ) |
| inline

Is this station tile an airport?

Parameters

  t | the tile to get the information from

Precondition
  IsTileType(t, MP_STATION)

Returns
  true if and only if the tile is an airport

Definition at line 157 of file station_map.h.

References GetStationType().

Referenced by GetAirportGfx(), GetNearbyAirportTileInformation(), IsAirportTile(), and IsHangar().

## ◆ IsAirportTile()

bool IsAirportTile | ( | Tile | t | ) |
| inline

Is this tile a station tile and an airport tile?

Parameters

  t | the tile to get the information from

Returns
  true if and only if the tile is an airport

Definition at line 167 of file station_map.h.

References IsAirport(), IsTileType(), and MP_STATION.

Referenced by AfterLoadGame(), DisasterTick_Zeppeliner(), FloodVehicleProc(), and FloodVehicles().

## ◆ IsAnyRoadStop()

bool IsAnyRoadStop | ( | Tile | t | ) |
| inline

Is the station at t a road station?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if station at the tile is a bus stop, truck stop or road waypoint, `false` otherwise

Definition at line 245 of file station_map.h.

References IsBusStop(), IsRoadWaypoint(), IsTileType(), IsTruckStop(), and MP_STATION.

Referenced by AfterLoadGame(), CalculateRoadStopCost(), CheckFlatLandRoadStop(), CmdConvertRoad(), ConvertRoadTypes(), DrawRoadCatenary(), IsAnyRoadStopTile(), MayHaveRoad(), and RemoveGenericRoadStop().

## ◆ IsAnyRoadStopTile()

bool IsAnyRoadStopTile | ( | Tile | t | ) |
| inline

Is tile t a road stop station?

Parameters

  t | Tile to check

Returns
  `true` if the tile is a station tile and any road stop type (bus stop, truck stop or road waypoint)

Definition at line 256 of file station_map.h.

References IsAnyRoadStop(), IsTileType(), and MP_STATION.

Referenced by GetAnyRoadBits(), GetCustomRoadStopSpecIndex(), RoadStopScopeResolver::GetVariable(), IsCustomRoadStopSpecIndex(), IsDriveThroughStopTile(), RoadTypesAllowHouseHere(), and SetCustomRoadStopSpecIndex().

## ◆ IsBayRoadStopTile()

bool IsBayRoadStopTile | ( | Tile | t | ) |
| inline

Is tile t a bay (non-drive through) road stop station?

Parameters

  t | Tile to check

Returns
  `true` if the tile is a station tile and a bay road stop

Definition at line 266 of file station_map.h.

References GetStationGfx(), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET, and IsStationRoadStopTile().

Referenced by AfterLoadGame(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), CanRoadContinueIntoNextTile(), CheckCaches(), CmdConvertRoad(), RoadStop::Enter(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), GetBayRoadStopDir(), RoadStop::GetNextRoadStop(), GetTownRoadBits(), GetVehicleCannotUseStationReason(), RoadVehicle::GetVehicleTrackdir(), RoadStop::Leave(), and RoadFindPathToDest().

## ◆ IsBuoy()

bool IsBuoy | ( | Tile | t | ) |
| inline

Is tile t a buoy tile?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if the tile is a buoy

Definition at line 400 of file station_map.h.

References GetStationType().

Referenced by AfterLoadGame(), IsBuoyTile(), IsWateredTile(), and TileLoop_Water().

## ◆ IsBuoyTile()

bool IsBuoyTile | ( | Tile | t | ) |
| inline

Is tile t a buoy tile?

Parameters

  t | Tile to check

Returns
  `true` if the tile is a buoy

Definition at line 410 of file station_map.h.

References IsBuoy(), IsTileType(), and MP_STATION.

Referenced by AfterLoadGame(), GetOrderCmdFromTile(), MoveBuoysToWaypoints(), and ResetLandscapeConfirmationCallback().

## ◆ IsBusStop()

bool IsBusStop | ( | Tile | t | ) |
| inline

Is the station at t a bus stop?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if station is a bus stop, `false` otherwise

Definition at line 191 of file station_map.h.

References GetStationType().

Referenced by IsAnyRoadStop(), and IsStationRoadStop().

## ◆ IsCompatibleTrainStationTile()

bool IsCompatibleTrainStationTile | ( | Tile | test_tile,
|  | Tile | station_tile
| ) |  |
| inline

Check if a tile is a valid continuation to a railstation tile.

The tile test_tile is a valid continuation to station_tile, if all of the following are true:

- test_tile is a rail station tile
- the railtype of test_tile is compatible with the railtype of station_tile
- the tracks on test_tile and station_tile are in the same direction
- both tiles belong to the same station
- test_tile is not blocked (
  See also
    IsStationTileBlocked)
  Parameters

    test_tile | Tile to test
    station_tile | Station tile to compare with

  Precondition
    IsRailStationTile(station_tile)
  Returns
    true if the two tiles are compatible

Definition at line 544 of file station_map.h.

References GetRailStationAxis(), GetRailType(), GetStationIndex(), IsCompatibleRail(), IsRailStationTile(), and IsStationTileBlocked().

Referenced by ClearPathReservation(), CmdBuildRailStation(), FollowTrainReservation(), Station::GetPlatformLength(), Station::GetPlatformLength(), GetRailTileArea(), GetTrainForReservation(), CYapfReserveTrack< Types >::ReserveRailStationPlatform(), SetRailStationPlatformReservation(), and CYapfReserveTrack< Types >::UnreserveSingleTrack().

## ◆ IsCustomRoadStopSpecIndex()

bool IsCustomRoadStopSpecIndex | ( | Tile | t | ) |
| inline

Is there a custom road stop spec on this tile?

Parameters

  t | Tile to query

Precondition
  IsAnyRoadStopTile(t)

Returns
  True if this station is part of a newgrf station.

Definition at line 654 of file station_map.h.

References GB(), IsAnyRoadStopTile(), and Tile::m8().

Referenced by RoadStopScopeResolver::GetVariable().

## ◆ IsCustomStationSpecIndex()

bool IsCustomStationSpecIndex | ( | Tile | t | ) |
| inline

Is there a custom rail station spec on this tile?

Parameters

  t | Tile to query

Precondition
  HasStationTileRail(t)

Returns
  True if this station is part of a newgrf station.

Definition at line 618 of file station_map.h.

References HasStationTileRail(), and Tile::m4().

Referenced by StationScopeResolver::GetVariable().

## ◆ IsDock()

bool IsDock | ( | Tile | t | ) |
| inline

Is tile t a dock tile?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if the tile is a dock

Definition at line 379 of file station_map.h.

References GetStationType().

Referenced by AfterLoadGame(), GetDockDirection(), IsWateredTile(), and TileLoop_Water().

## ◆ IsDockTile()

bool IsDockTile | ( | Tile | t | ) |
| inline

Is tile t a dock tile?

Parameters

  t | Tile to check

Returns
  `true` if the tile is a dock

Definition at line 389 of file station_map.h.

References GetStationType(), IsTileType(), and MP_STATION.

Referenced by CheckForDockingTile(), FindDockLandPart(), IsDockWaterPart(), IsShipDestinationTile(), and RemoveDock().

## ◆ IsDockWaterPart()

bool IsDockWaterPart | ( | Tile | t | ) |
| inline

Check whether a dock tile is the tile on water.

Definition at line 605 of file station_map.h.

References GetStationGfx(), GFX_DOCK_BASE_WATER_PART, and IsDockTile().

Referenced by CheckForDockingTile(), and IsShipDestinationTile().

## ◆ IsDriveThroughStopTile()

bool IsDriveThroughStopTile | ( | Tile | t | ) |
| inline

Is tile t a drive through road stop station or waypoint?

Parameters

  t | Tile to check

Returns
  `true` if the tile is a station tile and a drive through road stop or road waypoint

Definition at line 276 of file station_map.h.

References GetStationGfx(), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET, and IsAnyRoadStopTile().

Referenced by AfterLoadGame(), AfterLoadRoadStops(), CanFollowRoad(), CanRoadContinueIntoNextTile(), CheckFlatLandRoadStop(), RoadStop::Entry::CheckIntegrity(), ClearTile_Station(), CmdBuildRoad(), DrawRoadCatenary(), GetAnyRoadBits(), GetDriveThroughStopAxis(), RoadStop::IsDriveThroughRoadStopContinuation(), CYapfCostRoadT< Types >::OneTileCost(), RemoveGenericRoadStop(), RemoveRoad(), and RemoveRoadStop().

## ◆ IsHangar()

bool IsHangar | ( | Tile | t | ) |

Check whether the given tile is a hangar.

Parameters

  t | the tile to of whether it is a hangar.

Precondition
  IsTileType(t, MP_STATION)

Returns
  true if and only if the tile is a hangar.

Definition at line 97 of file station_cmd.cpp.

References Station::airport, AirportSpec::depots, BaseStation::GetByTile(), Airport::GetRotatedTileFromOffset(), Airport::GetSpec(), IsAirport(), IsTileType(), and MP_STATION.

Referenced by IsHangarTile().

## ◆ IsHangarTile()

bool IsHangarTile | ( | Tile | t | ) |
| inline

Is tile t an hangar tile?

Parameters

  t | Tile to check

Returns
  `true` if the tile is an hangar

Definition at line 420 of file station_map.h.

References IsHangar(), IsTileType(), and MP_STATION.

Referenced by GetDepotDestinationIndex(), IsDepotTile(), IsDepotTypeTile(), Aircraft::IsInDepot(), and OrderBackup::RemoveOrder().

## ◆ IsOilRig()

bool IsOilRig | ( | Tile | t | ) |
| inline

Is tile t part of an oilrig?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if the tile is an oilrig tile

Definition at line 368 of file station_map.h.

References GetStationType().

Referenced by AfterLoadGame(), CheckForDockingTile(), IsShipDestinationTile(), and IsWateredTile().

## ◆ IsRailStation()

bool IsRailStation | ( | Tile | t | ) |
| inline

Is this station tile a rail station?

Parameters

  t | the tile to get the information from

Precondition
  IsTileType(t, MP_STATION)

Returns
  true if and only if the tile is a rail station

Definition at line 92 of file station_map.h.

References GetStationType().

Referenced by CheckFlatLandRailStation(), HasStationRail(), and IsRailStationTile().

## ◆ IsRailStationTile()

bool IsRailStationTile | ( | Tile | t | ) |
| inline

Is this tile a station tile and a rail station?

Parameters

  t | the tile to get the information from

Returns
  true if and only if the tile is a rail station

Definition at line 102 of file station_map.h.

References IsRailStation(), IsTileType(), and MP_STATION.

Referenced by CalculateRailStationCost(), CheckNextTrainTile(), ClearPathReservation(), CmdBuildRailStation(), CmdConvertRail(), DeleteLastWagon(), DrawRailCatenaryRailway(), FollowTrainReservation(), FreeTrainReservation(), FreeTrainTrackReservation(), Train::GetCurrentMaxSpeed(), Station::GetPlatformLength(), GetRailTileArea(), GetTrainForReservation(), IsCompatibleTrainStationTile(), CYapfCostRailT< Types >::ReservationCost(), CYapfReserveTrack< Types >::ReserveSingleTrack(), RestoreTrainReservation(), ReverseTrainDirection(), SetRailStationPlatformReservation(), Vehicle::ShowVisualEffect(), Station::TileBelongsToRailStation(), and CYapfReserveTrack< Types >::UnreserveSingleTrack().

## ◆ IsRailWaypoint()

bool IsRailWaypoint | ( | Tile | t | ) |
| inline

Is this station tile a rail waypoint?

Parameters

  t | the tile to get the information from

Precondition
  IsTileType(t, MP_STATION)

Returns
  true if and only if the tile is a rail waypoint

Definition at line 113 of file station_map.h.

References GetStationType().

Referenced by HasStationRail(), IsRailWaypointTile(), IsValidTileForWaypoint(), and CYapfCostRailT< Types >::PfCalcCost().

## ◆ IsRailWaypointTile()

bool IsRailWaypointTile | ( | Tile | t | ) |
| inline

Is this tile a station tile and a rail waypoint?

Parameters

  t | the tile to get the information from

Returns
  true if and only if the tile is a rail waypoint

Definition at line 123 of file station_map.h.

References IsRailWaypoint(), IsTileType(), and MP_STATION.

Referenced by CheckNextTrainTile(), CmdBuildRailWaypoint(), GetAxisForNewRailWaypoint(), GetOrderCmdFromTile(), CYapfReserveTrack< Types >::ReserveSingleTrack(), and Waypoint::TileBelongsToRailStation().

## ◆ IsRoadWaypoint()

bool IsRoadWaypoint | ( | Tile | t | ) |
| inline

Is the station at t a road waypoint?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if station is a road waypoint, `false` otherwise

Definition at line 202 of file station_map.h.

References GetStationType().

Referenced by IsAnyRoadStop(), IsRoadWaypointTile(), CYapfCostRoadT< Types >::OneTileCost(), and RemoveGenericRoadStop().

## ◆ IsRoadWaypointOnSnowOrDesert()

static bool IsRoadWaypointOnSnowOrDesert | ( | Tile | t | ) |
| inlinestatic

Check if a road waypoint tile has snow/desert.

Parameters

  t | The tile to query.

Returns
  True if the tile has snow/desert.

Definition at line 310 of file station_map.h.

References HasBit(), IsRoadWaypointTile(), and Tile::m8().

## ◆ IsRoadWaypointTile()

bool IsRoadWaypointTile | ( | Tile | t | ) |
| inline

Is this tile a station tile and a road waypoint?

Parameters

  t | the tile to get the information from

Returns
  true if and only if the tile is a road waypoint

Definition at line 212 of file station_map.h.

References IsRoadWaypoint(), IsTileType(), and MP_STATION.

Referenced by CmdBuildRoadWaypoint(), GetAxisForNewRoadWaypoint(), GetNearbyTileInformation(), GetOrderCmdFromTile(), GetRoadWaypointRoadside(), IsRoadWaypointOnSnowOrDesert(), SetRoadWaypointRoadside(), and ToggleRoadWaypointOnSnowOrDesert().

## ◆ IsStationRoadStop()

bool IsStationRoadStop | ( | Tile | t | ) |
| inline

Is the station at t a road station?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if station at the tile is a bus stop or a truck stop, `false` otherwise

Definition at line 223 of file station_map.h.

References IsBusStop(), IsTileType(), IsTruckStop(), and MP_STATION.

Referenced by AfterLoadGame(), CmdBuildRoadStop(), and IsStationRoadStopTile().

## ◆ IsStationRoadStopTile()

bool IsStationRoadStopTile | ( | Tile | t | ) |
| inline

Is tile t a road stop station?

Parameters

  t | Tile to check

Returns
  `true` if the tile is a station tile and a station road stop

Definition at line 234 of file station_map.h.

References IsStationRoadStop(), IsTileType(), and MP_STATION.

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), IsBayRoadStopTile(), and Vehicle::LeaveStation().

## ◆ IsStationTileBlocked()

bool IsStationTileBlocked | ( | Tile | t | ) |
| inline

Is tile t a blocked tile?

Precondition
  HasStationRail(t)

Parameters

  t | Tile to check

Returns
  `true` if the tile is blocked

Definition at line 431 of file station_map.h.

References HasBit(), HasStationRail(), and Tile::m3().

Referenced by AfterLoadGame(), CmdBuildRailStation(), CmdConvertRail(), ExploreSegment(), IsCompatibleTrainStationTile(), and RemoveFromRailBaseStation().

## ◆ IsTruckStop()

bool IsTruckStop | ( | Tile | t | ) |
| inline

Is the station at t a truck stop?

Parameters

  t | Tile to check

Precondition
  IsTileType(t, MP_STATION)

Returns
  `true` if station is a truck stop, `false` otherwise

Definition at line 180 of file station_map.h.

References GetStationType().

Referenced by AfterLoadGame(), IsAnyRoadStop(), IsStationRoadStop(), and RemoveRoadStop().

## ◆ MakeAirport()

void MakeAirport | ( | Tile | t,
|  | Owner | o,
|  | StationID | sid,
|  | uint8_t | section,
|  | WaterClass | wc
| ) |  |
| inline

Make the given tile an airport tile.

Parameters

  t | the tile to make a airport
  o | the owner of the airport
  sid | the station to which this tile belongs
  section | the StationGfx to be used for this tile
  wc | the type of water on this tile

Definition at line 812 of file station_map.h.

References MakeStation().

Referenced by CmdBuildAirport().

## ◆ MakeBuoy()

void MakeBuoy | ( | Tile | t,
|  | StationID | sid,
|  | WaterClass | wc
| ) |  |
| inline

Make the given tile a buoy tile.

Parameters

  t | the tile to make a buoy
  sid | the station to which this tile belongs
  wc | the type of water on this tile

Definition at line 823 of file station_map.h.

References GetTileOwner(), and MakeStation().

Referenced by CmdBuildBuoy().

## ◆ MakeDock()

void MakeDock | ( | Tile | t,
|  | Owner | o,
|  | StationID | sid,
|  | DiagDirection | d,
|  | WaterClass | wc
| ) |  |
| inline

Make the given tile a dock tile.

Parameters

  t | the tile to make a dock
  o | the owner of the dock
  sid | the station to which this tile belongs
  d | the direction of the dock
  wc | the type of water on this tile

Definition at line 839 of file station_map.h.

References DiagDirToAxis(), GFX_DOCK_BASE_WATER_PART, MakeStation(), and TileOffsByDiagDir().

Referenced by CmdBuildDock().

## ◆ MakeDriveThroughRoadStop()

void MakeDriveThroughRoadStop | ( | Tile | t,
|  | Owner | station,
|  | Owner | road,
|  | Owner | tram,
|  | StationID | sid,
|  | StationType | rst,
|  | RoadType | road_rt,
|  | RoadType | tram_rt,
|  | Axis | a
| ) |  |
| inline

Make the given tile a drivethrough roadstop tile.

Parameters

  t | the tile to make a roadstop
  station | the owner of the roadstop
  road | the owner of the road
  tram | the owner of the tram
  sid | the station to which this tile belongs
  rst | the type of roadstop to make this tile
  road_rt | the road roadtype on this tile
  tram_rt | the tram roadtype on this tile
  a | the direction of the roadstop

Definition at line 796 of file station_map.h.

References GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET, MakeStation(), RTT_ROAD, RTT_TRAM, SetRoadOwner(), and SetRoadTypes().

Referenced by CmdBuildRoadStop(), and CmdBuildRoadWaypoint().

## ◆ MakeOilrig()

void MakeOilrig | ( | Tile | t,
|  | StationID | sid,
|  | WaterClass | wc
| ) |  |
| inline

Make the given tile an oilrig tile.

Parameters

  t | the tile to make an oilrig
  sid | the station to which this tile belongs
  wc | the type of water on this tile

Definition at line 851 of file station_map.h.

References MakeStation(), and OWNER_NONE.

## ◆ MakeRailStation()

void MakeRailStation | ( | Tile | t,
|  | Owner | o,
|  | StationID | sid,
|  | Axis | a,
|  | uint8_t | section,
|  | RailType | rt
| ) |  |
| inline

Make the given tile a rail station tile.

Parameters

  t | the tile to make a rail station tile
  o | the owner of the station
  sid | the station to which this tile belongs
  a | the axis of this tile
  section | the StationGfx to be used for this tile
  rt | the railtype of this tile

Definition at line 743 of file station_map.h.

References MakeStation(), SetRailStationReservation(), and SetRailType().

Referenced by CmdBuildRailStation().

## ◆ MakeRailWaypoint()

void MakeRailWaypoint | ( | Tile | t,
|  | Owner | o,
|  | StationID | sid,
|  | Axis | a,
|  | uint8_t | section,
|  | RailType | rt
| ) |  |
| inline

Make the given tile a rail waypoint tile.

Parameters

  t | the tile to make a rail waypoint
  o | the owner of the waypoint
  sid | the waypoint to which this tile belongs
  a | the axis of this tile
  section | the StationGfx to be used for this tile
  rt | the railtype of this tile

Definition at line 759 of file station_map.h.

References MakeStation(), SetRailStationReservation(), and SetRailType().

Referenced by CmdBuildRailWaypoint(), and MoveWaypointsToBaseStations().

## ◆ MakeRoadStop()

void MakeRoadStop | ( | Tile | t,
|  | Owner | o,
|  | StationID | sid,
|  | RoadStopType | rst,
|  | RoadType | road_rt,
|  | RoadType | tram_rt,
|  | DiagDirection | d
| ) |  |
| inline

Make the given tile a roadstop tile.

Parameters

  t | the tile to make a roadstop
  o | the owner of the roadstop
  sid | the station to which this tile belongs
  rst | the type of roadstop to make this tile
  road_rt | the road roadtype on this tile
  tram_rt | the tram roadtype on this tile
  d | the direction of the roadstop

Definition at line 776 of file station_map.h.

References Bus, MakeStation(), RTT_ROAD, RTT_TRAM, SetRoadOwner(), and SetRoadTypes().

Referenced by CmdBuildRoadStop().

## ◆ MakeStation()

void MakeStation | ( | Tile | t,
|  | Owner | o,
|  | StationID | sid,
|  | StationType | st,
|  | uint8_t | section,
|  | WaterClass | wc = `WaterClass::Invalid`
| ) |  |
| inline

Make the given tile a station tile.

Parameters

  t | the tile to make a station tile
  o | the owner of the station
  sid | the station to which this tile belongs
  st | the type this station tile
  section | the StationGfx to be used for this tile
  wc | The water class of the station

Definition at line 717 of file station_map.h.

References Tile::m2(), Tile::m3(), Tile::m4(), Tile::m5(), Tile::m6(), Tile::m7(), Tile::m8(), MP_STATION, SB(), SetDockingTile(), SetTileOwner(), SetTileType(), SetWaterClass(), and to_underlying().

Referenced by MakeAirport(), MakeBuoy(), MakeDock(), MakeDriveThroughRoadStop(), MakeOilrig(), MakeRailStation(), MakeRailWaypoint(), and MakeRoadStop().

## ◆ SetCustomRoadStopSpecIndex()

void SetCustomRoadStopSpecIndex | ( | Tile | t,
|  | uint8_t | specindex
| ) |  |
| inline

Set the custom road stop spec for this tile.

Parameters

  t | Tile to set the stationspec of.
  specindex | The new spec.

Precondition
  IsAnyRoadStopTile(t)

Definition at line 666 of file station_map.h.

References IsAnyRoadStopTile(), Tile::m8(), and SB().

Referenced by CmdBuildRoadStop(), and CmdBuildRoadWaypoint().

## ◆ SetCustomStationSpecIndex()

void SetCustomStationSpecIndex | ( | Tile | t,
|  | uint8_t | specindex
| ) |  |
| inline

Set the custom station spec for this tile.

Parameters

  t | Tile to set the stationspec of.
  specindex | The new spec.

Precondition
  HasStationTileRail(t)

Definition at line 630 of file station_map.h.

References HasStationTileRail(), and Tile::m4().

Referenced by CmdBuildRailStation(), CmdBuildRailWaypoint(), and MoveWaypointsToBaseStations().

## ◆ SetRailStationReservation()

void SetRailStationReservation | ( | Tile | t,
|  | bool | b
| ) |  |
| inline

Set the reservation state of the rail station.

Precondition
  HasStationRail(t)

Parameters

  t | the station tile
  b | the reservation state

Definition at line 571 of file station_map.h.

References AssignBit(), HasStationRail(), and Tile::m6().

Referenced by AfterLoadGame(), CmdBuildRailWaypoint(), MakeRailStation(), MakeRailWaypoint(), MoveWaypointsToBaseStations(), CYapfReserveTrack< Types >::ReserveRailStationPlatform(), SetRailStationPlatformReservation(), TryReserveRailTrack(), UnreserveRailTrack(), and CYapfReserveTrack< Types >::UnreserveSingleTrack().

## ◆ SetRoadWaypointRoadside()

static void SetRoadWaypointRoadside | ( | Tile | tile,
|  | Roadside | s
| ) |  |
| inlinestatic

Set the decorations of a road waypoint.

Parameters

  tile | The tile to change.
  s | The new road decoration of the tile.

Definition at line 299 of file station_map.h.

References IsRoadWaypointTile(), Tile::m3(), SB(), and to_underlying().

## ◆ SetStationGfx()

void SetStationGfx | ( | Tile | t,
|  | StationGfx | gfx
| ) |  |
| inline

Set the station graphics of this tile.

Parameters

  t | the tile to update
  gfx | the new graphics

Precondition
  IsTileType(t, MP_STATION)

Definition at line 80 of file station_map.h.

References IsTileType(), Tile::m5(), and MP_STATION.

Referenced by AfterLoadGame(), and CmdBuildRailStation().

## ◆ SetStationTileBlocked()

void SetStationTileBlocked | ( | Tile | t,
|  | bool | b
| ) |  |
| inline

Set the blocked state of the rail station.

Precondition
  HasStationRail(t)

Parameters

  t | the station tile
  b | the blocked state

Definition at line 443 of file station_map.h.

References AssignBit(), HasStationRail(), and Tile::m3().

Referenced by SetRailStationTileFlags().

## ◆ SetStationTileHavePylons()

void SetStationTileHavePylons | ( | Tile | t,
|  | bool | b
| ) |  |
| inline

Set the catenary pylon state of the rail station.

Precondition
  HasStationRail(t)

Parameters

  t | the station tile
  b | the catenary pylons state

Definition at line 491 of file station_map.h.

References AssignBit(), HasStationRail(), and Tile::m3().

Referenced by SetRailStationTileFlags().

## ◆ SetStationTileHaveWires()

void SetStationTileHaveWires | ( | Tile | t,
|  | bool | b
| ) |  |
| inline

Set the catenary wires state of the rail station.

Precondition
  HasStationRail(t)

Parameters

  t | the station tile
  b | the catenary wires state

Definition at line 467 of file station_map.h.

References AssignBit(), HasStationRail(), and Tile::m3().

Referenced by SetRailStationTileFlags().

## ◆ SetStationTileRandomBits()

void SetStationTileRandomBits | ( | Tile | t,
|  | uint8_t | random_bits
| ) |  |
| inline

Set the random bits for a station tile.

Parameters

  t | Tile to set random bits for.
  random_bits | The random bits.

Precondition
  IsTileType(t, MP_STATION)

Definition at line 690 of file station_map.h.

References IsTileType(), Tile::m3(), MP_STATION, and SB().

Referenced by CmdBuildAirport(), CmdBuildRailStation(), and TriggerStationRandomisation().

## ◆ ToggleRoadWaypointOnSnowOrDesert()

static void ToggleRoadWaypointOnSnowOrDesert | ( | Tile | t | ) |
| inlinestatic

Toggle the snow/desert state of a road waypoint tile.

Parameters

  t | The tile to change.

Definition at line 320 of file station_map.h.

References IsRoadWaypointTile(), Tile::m8(), and ToggleBit().

## Variable Documentation

## ◆ GFX_DOCK_BASE_WATER_PART

const int GFX_DOCK_BASE_WATER_PART = 4
| static

The offset for the water parts.

Definition at line 35 of file station_map.h.

Referenced by CmdBuildDock(), FindDockLandPart(), GetDockDirection(), IsDockWaterPart(), and MakeDock().

## ◆ GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET

const int GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET = 4
| static

The offset for the drive through parts.

Definition at line 36 of file station_map.h.

Referenced by AfterLoadGame(), CheckFlatLandRoadStop(), GetDriveThroughStopAxis(), IsBayRoadStopTile(), IsDriveThroughStopTile(), and MakeDriveThroughRoadStop().