OpenTTD Source
20241108-master-g80f628063a
|
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. More... | |
Functions | |
StationID | GetStationIndex (Tile t) |
Get StationID from a tile. More... | |
StationType | GetStationType (Tile t) |
Get the station type of this tile. More... | |
RoadStopType | GetRoadStopType (Tile t) |
Get the road stop type of this tile. More... | |
StationGfx | GetStationGfx (Tile t) |
Get the station graphics of this tile. More... | |
void | SetStationGfx (Tile t, StationGfx gfx) |
Set the station graphics of this tile. More... | |
bool | IsRailStation (Tile t) |
Is this station tile a rail station? More... | |
bool | IsRailStationTile (Tile t) |
Is this tile a station tile and a rail station? More... | |
bool | IsRailWaypoint (Tile t) |
Is this station tile a rail waypoint? More... | |
bool | IsRailWaypointTile (Tile t) |
Is this tile a station tile and a rail waypoint? More... | |
bool | HasStationRail (Tile t) |
Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint? More... | |
bool | HasStationTileRail (Tile t) |
Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint? More... | |
bool | IsAirport (Tile t) |
Is this station tile an airport? More... | |
bool | IsAirportTile (Tile t) |
Is this tile a station tile and an airport tile? More... | |
bool | IsHangar (Tile t) |
Check whether the given tile is a hangar. More... | |
bool | IsTruckStop (Tile t) |
Is the station at t a truck stop? More... | |
bool | IsBusStop (Tile t) |
Is the station at t a bus stop? More... | |
bool | IsRoadWaypoint (Tile t) |
Is the station at t a road waypoint? More... | |
bool | IsRoadWaypointTile (Tile t) |
Is this tile a station tile and a road waypoint? More... | |
bool | IsStationRoadStop (Tile t) |
Is the station at t a road station? More... | |
bool | IsStationRoadStopTile (Tile t) |
Is tile t a road stop station? More... | |
bool | IsAnyRoadStop (Tile t) |
Is the station at t a road station? More... | |
bool | IsAnyRoadStopTile (Tile t) |
Is tile t a road stop station? More... | |
bool | IsBayRoadStopTile (Tile t) |
Is tile t a bay (non-drive through) road stop station? More... | |
bool | IsDriveThroughStopTile (Tile t) |
Is tile t a drive through road stop station or waypoint? More... | |
StationGfx | GetTranslatedAirportTileID (StationGfx gfx) |
Do airporttile gfx ID translation for NewGRFs. More... | |
static Roadside | GetRoadWaypointRoadside (Tile tile) |
Get the decorations of a road waypoint. More... | |
static void | SetRoadWaypointRoadside (Tile tile, Roadside s) |
Set the decorations of a road waypoint. More... | |
static bool | IsRoadWaypointOnSnowOrDesert (Tile t) |
Check if a road waypoint tile has snow/desert. More... | |
static void | ToggleRoadWaypointOnSnowOrDesert (Tile t) |
Toggle the snow/desert state of a road waypoint tile. More... | |
StationGfx | GetAirportGfx (Tile t) |
Get the station graphics of this airport tile. More... | |
DiagDirection | GetBayRoadStopDir (Tile t) |
Gets the direction the bay road stop entrance points towards. More... | |
Axis | GetDriveThroughStopAxis (Tile t) |
Gets the axis of the drive through stop. More... | |
bool | IsOilRig (Tile t) |
Is tile t part of an oilrig? More... | |
bool | IsDock (Tile t) |
Is tile t a dock tile? More... | |
bool | IsDockTile (Tile t) |
Is tile t a dock tile? More... | |
bool | IsBuoy (Tile t) |
Is tile t a buoy tile? More... | |
bool | IsBuoyTile (Tile t) |
Is tile t a buoy tile? More... | |
bool | IsHangarTile (Tile t) |
Is tile t an hangar tile? More... | |
bool | IsStationTileBlocked (Tile t) |
Is tile t a blocked tile? More... | |
void | SetStationTileBlocked (Tile t, bool b) |
Set the blocked state of the rail station. More... | |
bool | CanStationTileHaveWires (Tile t) |
Can tile t have catenary wires? More... | |
void | SetStationTileHaveWires (Tile t, bool b) |
Set the catenary wires state of the rail station. More... | |
bool | CanStationTileHavePylons (Tile t) |
Can tile t have catenary pylons? More... | |
void | SetStationTileHavePylons (Tile t, bool b) |
Set the catenary pylon state of the rail station. More... | |
Axis | GetRailStationAxis (Tile t) |
Get the rail direction of a rail station. More... | |
Track | GetRailStationTrack (Tile t) |
Get the rail track of a rail station tile. More... | |
TrackBits | GetRailStationTrackBits (Tile t) |
Get the trackbits of a rail station tile. More... | |
bool | IsCompatibleTrainStationTile (Tile test_tile, Tile station_tile) |
Check if a tile is a valid continuation to a railstation tile. More... | |
bool | HasStationReservation (Tile t) |
Get the reservation state of the rail station. More... | |
void | SetRailStationReservation (Tile t, bool b) |
Set the reservation state of the rail station. More... | |
TrackBits | GetStationReservationTrackBits (Tile t) |
Get the reserved track bits for a waypoint. More... | |
DiagDirection | GetDockDirection (Tile t) |
Get the direction of a dock. More... | |
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? More... | |
void | SetCustomStationSpecIndex (Tile t, uint8_t specindex) |
Set the custom station spec for this tile. More... | |
uint | GetCustomStationSpecIndex (Tile t) |
Get the custom station spec for this tile. More... | |
bool | IsCustomRoadStopSpecIndex (Tile t) |
Is there a custom road stop spec on this tile? More... | |
void | SetCustomRoadStopSpecIndex (Tile t, uint8_t specindex) |
Set the custom road stop spec for this tile. More... | |
uint | GetCustomRoadStopSpecIndex (Tile t) |
Get the custom road stop spec for this tile. More... | |
void | SetStationTileRandomBits (Tile t, uint8_t random_bits) |
Set the random bits for a station tile. More... | |
uint8_t | GetStationTileRandomBits (Tile t) |
Get the random bits of a station tile. More... | |
void | MakeStation (Tile t, Owner o, StationID sid, StationType st, uint8_t section, WaterClass wc=WATER_CLASS_INVALID) |
Make the given tile a station tile. More... | |
void | MakeRailStation (Tile t, Owner o, StationID sid, Axis a, uint8_t section, RailType rt) |
Make the given tile a rail station tile. More... | |
void | MakeRailWaypoint (Tile t, Owner o, StationID sid, Axis a, uint8_t section, RailType rt) |
Make the given tile a rail waypoint tile. More... | |
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. More... | |
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. More... | |
void | MakeAirport (Tile t, Owner o, StationID sid, uint8_t section, WaterClass wc) |
Make the given tile an airport tile. More... | |
void | MakeBuoy (Tile t, StationID sid, WaterClass wc) |
Make the given tile a buoy tile. More... | |
void | MakeDock (Tile t, Owner o, StationID sid, DiagDirection d, WaterClass wc) |
Make the given tile a dock tile. More... | |
void | MakeOilrig (Tile t, StationID sid, WaterClass wc) |
Make the given tile an oilrig tile. More... | |
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. | |
Maps accessors for stations.
Definition in file station_map.h.
typedef uint8_t StationGfx |
Index of station graphics.
Definition at line 20 of file station_map.h.
|
inline |
Can tile t have catenary pylons?
t | Tile to check |
true
if the tile can have catenary pylons Definition at line 479 of file station_map.h.
References HasBit(), HasStationRail(), and Tile::m6().
|
inline |
Can tile t have catenary wires?
t | Tile to check |
true
if the tile can have catenary wires Definition at line 455 of file station_map.h.
References HasBit(), HasStationRail(), and Tile::m6().
Referenced by MaskWireBits().
|
inline |
Get the station graphics of this airport tile.
t | the tile to query |
Definition at line 332 of file station_map.h.
References GetStationGfx(), GetTranslatedAirportTileID(), and IsAirport().
Referenced by GetAirportTileIDAtOffset(), AirportTileSpec::GetByTile(), NIHAirportTile::GetGRFID(), NIHAirportTile::GetSpec(), and NIHAirportTile::IsInspectable().
|
inline |
Gets the direction the bay road stop entrance points towards.
t | the tile of the road stop |
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(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), GetAnyRoadBits(), and RoadVehicle::GetVehicleTrackdir().
|
inline |
Get the custom road stop spec for this tile.
t | Tile to query |
Definition at line 678 of file station_map.h.
References GB(), IsAnyRoadStopTile(), and Tile::m8().
|
inline |
Get the custom station spec for this tile.
t | Tile to query |
Definition at line 642 of file station_map.h.
References HasStationTileRail(), and Tile::m4().
Referenced by FindRailStationEnd(), and StationUsesDefaultType().
|
inline |
Get the direction of a dock.
t | Tile to query |
Definition at line 595 of file station_map.h.
References GetStationGfx(), GFX_DOCK_BASE_WATER_PART, and IsDock().
Referenced by FindDockLandPart(), and RemoveDock().
Gets the axis of the drive through stop.
t | the tile of the road stop |
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(), GetAnyRoadBits(), GetAxisForNewRoadWaypoint(), RoadStop::IsDriveThroughRoadStopContinuation(), RoadStop::MakeDriveThrough(), and RoadStop::Entry::Rebuild().
Get the rail direction of a rail station.
t | Tile to query |
Definition at line 503 of file station_map.h.
References AXIS_X, AXIS_Y, GetStationGfx(), HasBit(), and HasStationRail().
Referenced by FindRailStationEnd(), GetAxisForNewRailWaypoint(), Station::GetPlatformLength(), GetRailStationTrack(), GetRailStationTrackBits(), IsCompatibleTrainStationTile(), MaskWireBits(), and SetRailStationPlatformReservation().
Get the rail track of a rail station tile.
t | Tile to query |
Definition at line 515 of file station_map.h.
References AxisToTrack(), and GetRailStationAxis().
Referenced by CmdConvertRail(), and GetRailTrackBitsUniversal().
Get the trackbits of a rail station tile.
t | Tile to query |
Definition at line 526 of file station_map.h.
References AxisToTrackBits(), and GetRailStationAxis().
Referenced by GetStationReservationTrackBits().
|
inline |
Get the road stop type of this tile.
t | the tile to query |
Definition at line 56 of file station_map.h.
References GetStationType().
Referenced by RoadStop::ClearDriveThrough(), RoadStop::MakeDriveThrough(), and CYapfCostRoadT< Types >::OneTileCost().
Get the decorations of a road waypoint.
tile | The tile to query. |
Definition at line 288 of file station_map.h.
References GB(), IsRoadWaypointTile(), and Tile::m3().
|
inline |
Get the station graphics of this tile.
t | the tile to query |
Definition at line 68 of file station_map.h.
References IsTileType(), Tile::m5(), and MP_STATION.
Referenced by FindDockLandPart(), GetAirportGfx(), GetBayRoadStopDir(), GetDockDirection(), GetDriveThroughStopAxis(), GetRailStationAxis(), IsBayRoadStopTile(), IsDockWaterPart(), IsDriveThroughStopTile(), and SetRailStationTileFlags().
|
inline |
Get StationID from a tile.
t | Tile to query station ID from |
Definition at line 28 of file station_map.h.
References IsTileType(), Tile::m2(), and MP_STATION.
Referenced by CheckFlatLandRoadStop(), FindRailStationEnd(), ForAllStationsAroundTiles(), FreeTrainTrackReservation(), BaseStation::GetByTile(), GetNearbyAirportTileInformation(), GetOrderCmdFromTile(), GetTileHighlightType(), IsCompatibleTrainStationTile(), RoadStop::IsDriveThroughRoadStopContinuation(), IsShipDestinationTile(), IsValidTileForWaypoint(), MoveBuoysToWaypoints(), Station::RecomputeCatchment(), StationRect::ScanForStationTiles(), NIHStation::SetStringParameters(), NIHAirportTile::SetStringParameters(), NIHRoadStop::SetStringParameters(), Station::TileBelongsToRailStation(), and Waypoint::TileBelongsToRailStation().
Get the reserved track bits for a waypoint.
t | the tile |
Definition at line 583 of file station_map.h.
References GetRailStationTrackBits(), HasStationReservation(), and TRACK_BIT_NONE.
Referenced by GetReservedTrackbits().
|
inline |
Get the random bits of a station tile.
t | Tile to query |
Definition at line 702 of file station_map.h.
References GB(), IsTileType(), Tile::m3(), and MP_STATION.
Referenced by AirportTileScopeResolver::GetRandomBits(), and StationScopeResolver::GetRandomBits().
|
inline |
Get the station type of this tile.
t | the tile to query |
Definition at line 44 of file station_map.h.
References GB(), IsTileType(), Tile::m6(), and MP_STATION.
Referenced by CheckFlatLandRoadStop(), ClearTile_Station(), GetRoadStopType(), GetSmallMapRoutesPixels(), GetTileCatchmentRadius(), IsAirport(), IsBuoy(), IsBusStop(), IsDock(), IsDockTile(), RoadStop::IsDriveThroughRoadStopContinuation(), IsOilRig(), IsRailStation(), IsRailWaypoint(), IsRoadWaypoint(), IsTruckStop(), and RemoveGenericRoadStop().
StationGfx GetTranslatedAirportTileID | ( | StationGfx | gfx | ) |
Do airporttile gfx ID translation for NewGRFs.
gfx | the type to get the override for. |
Definition at line 96 of file newgrf_airporttiles.cpp.
References AirportTileSpec::Get(), AirportTileSpec::grf_prop, INVALID_AIRPORTTILE, and GRFFileProps::override.
Referenced by GetAirportGfx().
|
inline |
Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint?
t | the tile to check |
Definition at line 135 of file station_map.h.
References IsRailStation(), and IsRailWaypoint().
Referenced by CanStationTileHavePylons(), CanStationTileHaveWires(), CmdConvertRail(), FindRailStationEnd(), GetRailStationAxis(), GetRailTrackBitsUniversal(), GetReservedTrackbits(), GetTileRailType(), HasStationReservation(), HasStationTileRail(), IsStationTileBlocked(), SetRailStationReservation(), SetStationTileBlocked(), SetStationTileHavePylons(), SetStationTileHaveWires(), StationUsesDefaultType(), TryReserveRailTrack(), and UnreserveRailTrack().
|
inline |
Get the reservation state of the rail station.
t | the station tile |
Definition at line 559 of file station_map.h.
References HasBit(), HasStationRail(), and Tile::m6().
Referenced by FollowReservation(), GetStationReservationTrackBits(), CYapfCostRailT< Types >::IsAnyStationTileReserved(), CYapfReserveTrack< Types >::ReserveRailStationPlatform(), and TryReserveRailTrack().
|
inline |
Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint?
t | the tile to check |
Definition at line 146 of file station_map.h.
References HasStationRail(), IsTileType(), and MP_STATION.
Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), GetCustomStationSpecIndex(), IsCustomStationSpecIndex(), MaskWireBits(), RemoveFromRailBaseStation(), and SetCustomStationSpecIndex().
|
inline |
Is this station tile an airport?
t | the tile to get the information from |
Definition at line 157 of file station_map.h.
References GetStationType().
Referenced by GetAirportGfx(), GetNearbyAirportTileInformation(), IsAirportTile(), and IsHangar().
|
inline |
Is this tile a station tile and an airport tile?
t | the tile to get the information from |
Definition at line 167 of file station_map.h.
References IsAirport(), IsTileType(), and MP_STATION.
Referenced by FloodVehicleProc(), and FloodVehicles().
|
inline |
Is the station at t a road station?
t | Tile to check |
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 CalculateRoadStopCost(), CheckFlatLandRoadStop(), IsAnyRoadStopTile(), and RemoveGenericRoadStop().
|
inline |
Is tile t a road stop station?
t | Tile to check |
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(), IsCustomRoadStopSpecIndex(), IsDriveThroughStopTile(), RoadTypesAllowHouseHere(), and SetCustomRoadStopSpecIndex().
|
inline |
Is tile t a bay (non-drive through) road stop station?
t | Tile to check |
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 CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), CanRoadContinueIntoNextTile(), RoadStop::Enter(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), GetBayRoadStopDir(), RoadStop::GetNextRoadStop(), GetTownRoadBits(), GetVehicleCannotUseStationReason(), RoadVehicle::GetVehicleTrackdir(), and RoadStop::Leave().
|
inline |
Is tile t a buoy tile?
t | Tile to check |
true
if the tile is a buoy Definition at line 400 of file station_map.h.
References GetStationType().
Referenced by IsBuoyTile(), and TileLoop_Water().
|
inline |
Is tile t a buoy tile?
t | Tile to check |
true
if the tile is a buoy Definition at line 410 of file station_map.h.
References IsBuoy(), IsTileType(), and MP_STATION.
Referenced by GetOrderCmdFromTile(), and ResetLandscapeConfirmationCallback().
|
inline |
Is the station at t a bus stop?
t | Tile to check |
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().
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:
Definition at line 544 of file station_map.h.
References GetRailStationAxis(), GetRailType(), GetStationIndex(), IsCompatibleRail(), IsRailStationTile(), and IsStationTileBlocked().
Referenced by ClearPathReservation(), FollowTrainReservation(), Station::GetPlatformLength(), GetTrainForReservation(), CYapfReserveTrack< Types >::ReserveRailStationPlatform(), SetRailStationPlatformReservation(), and CYapfReserveTrack< Types >::UnreserveSingleTrack().
|
inline |
Is there a custom road stop spec on this tile?
t | Tile to query |
Definition at line 654 of file station_map.h.
References GB(), IsAnyRoadStopTile(), and Tile::m8().
|
inline |
Is there a custom rail station spec on this tile?
t | Tile to query |
Definition at line 618 of file station_map.h.
References HasStationTileRail(), and Tile::m4().
|
inline |
Is tile t a dock tile?
t | Tile to check |
true
if the tile is a dock Definition at line 379 of file station_map.h.
References GetStationType().
Referenced by GetDockDirection(), and TileLoop_Water().
|
inline |
Is tile t a dock tile?
t | Tile to check |
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().
|
inline |
Is tile t a drive through road stop station or waypoint?
t | Tile to check |
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 AfterLoadRoadStops(), CanFollowRoad(), CanRoadContinueIntoNextTile(), CheckFlatLandRoadStop(), RoadStop::Entry::CheckIntegrity(), GetAnyRoadBits(), GetDriveThroughStopAxis(), RoadStop::IsDriveThroughRoadStopContinuation(), CYapfCostRoadT< Types >::OneTileCost(), RemoveGenericRoadStop(), and RemoveRoadStop().
bool IsHangar | ( | Tile | t | ) |
Check whether the given tile is a hangar.
t | the tile to of whether it is a hangar. |
Definition at line 92 of file station_cmd.cpp.
References Station::airport, AirportSpec::depots, SpecializedStation< Station, false >::GetByTile(), Airport::GetRotatedTileFromOffset(), Airport::GetSpec(), IsAirport(), IsTileType(), and MP_STATION.
Referenced by IsHangarTile().
|
inline |
Is tile t an hangar tile?
t | Tile to check |
true
if the tile is an hangar Definition at line 420 of file station_map.h.
References IsHangar(), IsTileType(), and MP_STATION.
Referenced by IsDepotTile(), and Aircraft::IsInDepot().
|
inline |
Is tile t part of an oilrig?
t | Tile to check |
true
if the tile is an oilrig tile Definition at line 368 of file station_map.h.
References GetStationType().
Referenced by CheckForDockingTile(), and IsShipDestinationTile().
|
inline |
Is this station tile a rail station?
t | the tile to get the information from |
Definition at line 92 of file station_map.h.
References GetStationType().
Referenced by HasStationRail(), IsRailStationTile(), and TryReserveRailTrack().
|
inline |
Is this tile a station tile and a rail station?
t | the tile to get the information from |
Definition at line 102 of file station_map.h.
References IsRailStation(), IsTileType(), and MP_STATION.
Referenced by ClearPathReservation(), CmdConvertRail(), FollowTrainReservation(), FreeTrainReservation(), FreeTrainTrackReservation(), Station::GetPlatformLength(), GetTrainForReservation(), IsCompatibleTrainStationTile(), CYapfReserveTrack< Types >::ReserveSingleTrack(), RestoreTrainReservation(), SetRailStationPlatformReservation(), Station::TileBelongsToRailStation(), and CYapfReserveTrack< Types >::UnreserveSingleTrack().
|
inline |
Is this station tile a rail waypoint?
t | the tile to get the information from |
Definition at line 113 of file station_map.h.
References GetStationType().
Referenced by HasStationRail(), IsRailWaypointTile(), and IsValidTileForWaypoint().
|
inline |
Is this tile a station tile and a rail waypoint?
t | the tile to get the information from |
Definition at line 123 of file station_map.h.
References IsRailWaypoint(), IsTileType(), and MP_STATION.
Referenced by GetAxisForNewRailWaypoint(), GetOrderCmdFromTile(), and Waypoint::TileBelongsToRailStation().
|
inline |
Is the station at t a road waypoint?
t | Tile to check |
true
if station is a road waypoint, false
otherwise Definition at line 202 of file station_map.h.
References GetStationType().
Referenced by IsAnyRoadStop(), IsRoadWaypointTile(), and CYapfCostRoadT< Types >::OneTileCost().
|
inlinestatic |
Check if a road waypoint tile has snow/desert.
t | The tile to query. |
Definition at line 310 of file station_map.h.
References HasBit(), IsRoadWaypointTile(), and Tile::m8().
|
inline |
Is this tile a station tile and a road waypoint?
t | the tile to get the information from |
Definition at line 212 of file station_map.h.
References IsRoadWaypoint(), IsTileType(), and MP_STATION.
Referenced by GetAxisForNewRoadWaypoint(), GetNearbyTileInformation(), GetOrderCmdFromTile(), GetRoadWaypointRoadside(), IsRoadWaypointOnSnowOrDesert(), SetRoadWaypointRoadside(), and ToggleRoadWaypointOnSnowOrDesert().
|
inline |
Is the station at t a road station?
t | Tile to check |
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 IsStationRoadStopTile().
|
inline |
Is tile t a road stop station?
t | Tile to check |
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(), and IsBayRoadStopTile().
|
inline |
Is tile t a blocked tile?
t | Tile to check |
true
if the tile is blocked Definition at line 431 of file station_map.h.
References HasBit(), HasStationRail(), and Tile::m6().
Referenced by CmdConvertRail(), and IsCompatibleTrainStationTile().
|
inline |
Is the station at t a truck stop?
t | Tile to check |
true
if station is a truck stop, false
otherwise Definition at line 180 of file station_map.h.
References GetStationType().
Referenced by IsAnyRoadStop(), IsStationRoadStop(), and RemoveRoadStop().
|
inline |
Make the given tile an airport tile.
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 811 of file station_map.h.
References MakeStation().
|
inline |
Make the given tile a buoy tile.
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 822 of file station_map.h.
References GetTileOwner(), and MakeStation().
|
inline |
Make the given tile a dock tile.
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 838 of file station_map.h.
References MakeStation().
|
inline |
Make the given tile a drivethrough roadstop tile.
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 795 of file station_map.h.
References GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET, MakeStation(), SetRoadOwner(), and SetRoadTypes().
|
inline |
Make the given tile an oilrig tile.
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 850 of file station_map.h.
References MakeStation(), and OWNER_NONE.
|
inline |
Make the given tile a rail station tile.
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 742 of file station_map.h.
References MakeStation().
|
inline |
Make the given tile a rail waypoint tile.
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 758 of file station_map.h.
References MakeStation().
Referenced by MoveWaypointsToBaseStations().
|
inline |
Make the given tile a roadstop tile.
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 775 of file station_map.h.
References MakeStation(), and ROADSTOP_BUS.
|
inline |
Make the given tile a station tile.
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(), and SetWaterClass().
Referenced by MakeAirport(), MakeBuoy(), MakeDock(), MakeDriveThroughRoadStop(), MakeOilrig(), MakeRailStation(), MakeRailWaypoint(), and MakeRoadStop().
|
inline |
Set the custom road stop spec for this tile.
t | Tile to set the stationspec of. |
specindex | The new spec. |
Definition at line 666 of file station_map.h.
References IsAnyRoadStopTile(), Tile::m8(), and SB().
|
inline |
Set the custom station spec for this tile.
t | Tile to set the stationspec of. |
specindex | The new spec. |
Definition at line 630 of file station_map.h.
References HasStationTileRail(), and Tile::m4().
Referenced by MoveWaypointsToBaseStations().
|
inline |
Set the reservation state of the rail station.
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 MoveWaypointsToBaseStations(), CYapfReserveTrack< Types >::ReserveRailStationPlatform(), SetRailStationPlatformReservation(), TryReserveRailTrack(), UnreserveRailTrack(), and CYapfReserveTrack< Types >::UnreserveSingleTrack().
Set the decorations of a road waypoint.
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(), and SB().
|
inline |
Set the station graphics of this tile.
t | the tile to update |
gfx | the new graphics |
Definition at line 80 of file station_map.h.
References IsTileType(), Tile::m5(), and MP_STATION.
|
inline |
Set the blocked state of the rail station.
t | the station tile |
b | the blocked state |
Definition at line 443 of file station_map.h.
References AssignBit(), HasStationRail(), and Tile::m6().
Referenced by SetRailStationTileFlags().
|
inline |
Set the catenary pylon state of the rail station.
t | the station tile |
b | the catenary pylons state |
Definition at line 491 of file station_map.h.
References AssignBit(), HasStationRail(), and Tile::m6().
Referenced by SetRailStationTileFlags().
|
inline |
Set the catenary wires state of the rail station.
t | the station tile |
b | the catenary wires state |
Definition at line 467 of file station_map.h.
References AssignBit(), HasStationRail(), and Tile::m6().
Referenced by SetRailStationTileFlags().
|
inline |
Set the random bits for a station tile.
t | Tile to set random bits for. |
random_bits | The random bits. |
Definition at line 690 of file station_map.h.
References IsTileType(), Tile::m3(), MP_STATION, and SB().
|
inlinestatic |
Toggle the snow/desert state of a road waypoint tile.
t | The tile to change. |
Definition at line 320 of file station_map.h.
References IsRoadWaypointTile(), Tile::m8(), and ToggleBit().