#include "rail_map.h"
#include "road_map.h"
#include "water_map.h"
#include "station_func.h"
#include "rail.h"
Go to the source code of this file.
Typedefs | |
typedef byte | StationGfx |
Enumerations | |
enum | { GFX_RADAR_LARGE_FIRST = 31, GFX_RADAR_LARGE_LAST = 42, GFX_WINDSACK_FIRST = 50, GFX_WINDSACK_LAST = 53, GFX_DOCK_BASE_WATER_PART = 4, GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET = 4, GFX_RADAR_INTERNATIONAL_FIRST = 66, GFX_RADAR_INTERNATIONAL_LAST = 77, GFX_RADAR_METROPOLITAN_FIRST = 78, GFX_RADAR_METROPOLITAN_LAST = 89, GFX_RADAR_DISTRICTWE_FIRST = 121, GFX_RADAR_DISTRICTWE_LAST = 132, GFX_WINDSACK_INTERCON_FIRST = 140, GFX_WINDSACK_INTERCON_LAST = 143 } |
Functions | |
static StationID | GetStationIndex (TileIndex t) |
Get Station ID from a tile. | |
static StationType | GetStationType (TileIndex t) |
Get the station type of this tile. | |
static RoadStopType | GetRoadStopType (TileIndex t) |
Get the road stop type of this tile. | |
static StationGfx | GetStationGfx (TileIndex t) |
Get the station graphics of this tile. | |
static void | SetStationGfx (TileIndex t, StationGfx gfx) |
Set the station graphics of this tile. | |
static uint8 | GetStationAnimationFrame (TileIndex t) |
Get the station's animation frame of this tile. | |
static void | SetStationAnimationFrame (TileIndex t, uint8 frame) |
Set the station's animation frame of this tile. | |
static bool | IsRailStation (TileIndex t) |
Is this station tile a rail station? | |
static bool | IsRailStationTile (TileIndex t) |
Is this tile a station tile and a rail station? | |
static bool | IsRailWaypoint (TileIndex t) |
Is this station tile a rail waypoint? | |
static bool | IsRailWaypointTile (TileIndex t) |
Is this tile a station tile and a rail waypoint? | |
static bool | HasStationRail (TileIndex t) |
Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint? | |
static bool | HasStationTileRail (TileIndex t) |
Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint? | |
static bool | IsAirport (TileIndex t) |
Is this station tile an airport? | |
bool | IsHangar (TileIndex t) |
Check whether the given tile is a hangar. | |
static bool | IsTruckStop (TileIndex t) |
Is the station at t a truck stop? | |
static bool | IsBusStop (TileIndex t) |
Is the station at t a bus stop? | |
static bool | IsRoadStop (TileIndex t) |
Is the station at t a road station? | |
static bool | IsRoadStopTile (TileIndex t) |
Is tile t a road stop station? | |
static bool | IsStandardRoadStopTile (TileIndex t) |
Is tile t a standard (non-drive through) road stop station? | |
static bool | IsDriveThroughStopTile (TileIndex t) |
Is tile t a drive through road stop station? | |
static DiagDirection | GetRoadStopDir (TileIndex t) |
Gets the direction the road stop entrance points towards. | |
static bool | IsOilRig (TileIndex t) |
static bool | IsDock (TileIndex t) |
static bool | IsDockTile (TileIndex t) |
static bool | IsBuoy (TileIndex t) |
static bool | IsBuoyTile (TileIndex t) |
static bool | IsHangarTile (TileIndex t) |
static Axis | GetRailStationAxis (TileIndex t) |
static Track | GetRailStationTrack (TileIndex t) |
static TrackBits | GetRailStationTrackBits (TileIndex t) |
static bool | IsCompatibleTrainStationTile (TileIndex t1, TileIndex t2) |
static bool | HasStationReservation (TileIndex t) |
Get the reservation state of the rail station. | |
static void | SetRailStationReservation (TileIndex t, bool b) |
Set the reservation state of the rail station. | |
static TrackBits | GetStationReservationTrackBits (TileIndex t) |
Get the reserved track bits for a waypoint. | |
static DiagDirection | GetDockDirection (TileIndex t) |
static TileIndexDiffC | GetDockOffset (TileIndex t) |
static bool | IsCustomStationSpecIndex (TileIndex t) |
static void | SetCustomStationSpecIndex (TileIndex t, byte specindex) |
static uint | GetCustomStationSpecIndex (TileIndex t) |
static void | SetStationTileRandomBits (TileIndex t, byte random_bits) |
static byte | GetStationTileRandomBits (TileIndex t) |
static void | MakeStation (TileIndex t, Owner o, StationID sid, StationType st, byte section) |
static void | MakeRailStation (TileIndex t, Owner o, StationID sid, Axis a, byte section, RailType rt) |
static void | MakeRailWaypoint (TileIndex t, Owner o, StationID sid, Axis a, byte section, RailType rt) |
static void | MakeRoadStop (TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt, DiagDirection d) |
static void | MakeDriveThroughRoadStop (TileIndex t, Owner station, Owner road, Owner tram, StationID sid, RoadStopType rst, RoadTypes rt, Axis a) |
static void | MakeAirport (TileIndex t, Owner o, StationID sid, byte section) |
static void | MakeBuoy (TileIndex t, StationID sid, WaterClass wc) |
static void | MakeDock (TileIndex t, Owner o, StationID sid, DiagDirection d, WaterClass wc) |
static void | MakeOilrig (TileIndex t, StationID sid, WaterClass wc) |
Definition in file station_map.h.
static DiagDirection GetRoadStopDir | ( | TileIndex | t | ) | [inline, static] |
Gets the direction the road stop entrance points towards.
t | the tile of the road stop |
Definition at line 273 of file station_map.h.
References GetStationGfx(), and IsRoadStopTile().
Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), RoadStop::Entry::CheckIntegrity(), RoadStop::ClearDriveThrough(), CmdBuildRoad(), CmdRemoveRoadStop(), GetAnyRoadBits(), AIRoad::GetDriveThroughBackTile(), AIRoad::GetRoadStationFrontTile(), GetTileSingleEntry(), RoadStop::IsDriveThroughRoadStopContinuation(), RoadStop::MakeDriveThrough(), NeighbourHasReachableRoad(), RoadStop::Entry::Rebuild(), and RoadFindPathToDest().
static RoadStopType GetRoadStopType | ( | TileIndex | t | ) | [inline, static] |
Get the road stop type of this tile.
t | the tile to query |
Definition at line 71 of file station_map.h.
References GetStationType(), ROADSTOP_BUS, and ROADSTOP_TRUCK.
Referenced by RoadStop::ClearDriveThrough(), CmdRemoveRoadStop(), RoadStop::MakeDriveThrough(), AIRoad::RemoveRoadStation(), and RoadFindPathToDest().
static uint8 GetStationAnimationFrame | ( | TileIndex | t | ) | [inline, static] |
Get the station's animation frame of this tile.
t | the tile to query |
Definition at line 107 of file station_map.h.
References _me, IsTileType(), TileExtended::m7, and MP_STATION.
static StationGfx GetStationGfx | ( | TileIndex | t | ) | [inline, static] |
Get the station graphics of this tile.
t | the tile to query |
Definition at line 83 of file station_map.h.
References _m, IsTileType(), Tile::m5, and MP_STATION.
Referenced by GetRoadStopDir(), IsDriveThroughStopTile(), and IsStandardRoadStopTile().
Get Station ID from a tile.
t | Tile to query station ID from |
Definition at line 27 of file station_map.h.
References _m, IsTileType(), Tile::m2, and MP_STATION.
Referenced by AddNearbyStation(), AITileList_StationType::AITileList_StationType(), AIVehicleList_Depot::AIVehicleList_Depot(), CheckFlatLandBelow(), CheckNextTrainTile(), CmdBuildAircraft(), CmdReverseTrainDirection(), DisasterTick_Zeppeliner(), FindStationsNearby(), FreeTrainTrackReservation(), AIAirport::GetAirportType(), SpecializedStation< Waypoint, true >::GetByTile(), BaseStation::GetByTile(), GetStationAround(), AIStation::GetStationID(), GetTrainAcceleration(), AIWaypoint::GetWaypointID(), AIOrder::InsertOrder(), RoadStop::IsDriveThroughRoadStopContinuation(), IsValidTileForWaypoint(), LoadUnloadVehicle(), MoveBuoysToWaypoints(), ProcessOrders(), StationRect::ScanForStationTiles(), and Station::TileBelongsToRailStation().
Get the reserved track bits for a waypoint.
t | the tile |
Definition at line 373 of file station_map.h.
References HasStationReservation(), and TRACK_BIT_NONE.
Referenced by GetReservedTrackbits().
static StationType GetStationType | ( | TileIndex | t | ) | [inline, static] |
Get the station type of this tile.
t | the tile to query |
Definition at line 59 of file station_map.h.
References _m, GB(), IsTileType(), and MP_STATION.
Referenced by AITileList_StationType::AITileList_StationType(), FloodVehicles(), GetRoadStopType(), GetSmallMapRoutesPixels(), IsAirport(), IsBusStop(), RoadStop::IsDriveThroughRoadStopContinuation(), IsRailStation(), IsRailWaypoint(), and IsTruckStop().
static bool HasStationRail | ( | TileIndex | t | ) | [inline, static] |
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 174 of file station_map.h.
References IsRailStation(), and IsRailWaypoint().
Referenced by CmdConvertRail(), ExploreSegment(), GetRailTrackBitsUniversal(), GetReservedTrackbits(), GetTileRailType(), HasStationReservation(), HasStationTileRail(), SetRailStationReservation(), TryReserveRailTrack(), and UnreserveRailTrack().
static bool HasStationReservation | ( | TileIndex | t | ) | [inline, static] |
Get the reservation state of the rail station.
t | the station tile |
Definition at line 349 of file station_map.h.
References _m, HasBit(), and HasStationRail().
Referenced by CmdBuildRailStation(), CmdBuildRailWaypoint(), GetStationReservationTrackBits(), RemoveFromRailBaseStation(), RemoveRailStation(), and TryReserveRailTrack().
static bool HasStationTileRail | ( | TileIndex | t | ) | [inline, static] |
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 185 of file station_map.h.
References HasStationRail(), IsTileType(), and MP_STATION.
Referenced by CanEnterTileOwnerCheck(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), AIRail::IsRailTile(), RemoveFromRailBaseStation(), and SetDefaultRailGui().
static bool IsAirport | ( | TileIndex | t | ) | [inline, static] |
Is this station tile an airport?
t | the tile to get the information from |
Definition at line 196 of file station_map.h.
References GetStationType().
Referenced by AIVehicleList_Depot::AIVehicleList_Depot(), DisasterTick_Zeppeliner(), FloodVehicles(), AIAirport::IsAirportTile(), and IsHangar().
static bool IsBusStop | ( | TileIndex | t | ) | [inline, static] |
Is the station at t a bus stop?
t | Tile to check |
true
if station is a bus stop, false
otherwise Definition at line 220 of file station_map.h.
References GetStationType().
Referenced by IsRoadStop().
static bool IsDriveThroughStopTile | ( | TileIndex | t | ) | [inline, static] |
Is tile t a drive through road stop station?
t | Tile to check |
true
if the tile is a station tile and a drive through road stop Definition at line 262 of file station_map.h.
References GetStationGfx(), and IsRoadStopTile().
Referenced by AfterLoadRoadStops(), CmdBuildRoad(), CmdRemoveRoadStop(), GetAnyRoadBits(), AIRoad::IsDriveThroughRoadStationTile(), RoadStop::IsDriveThroughRoadStopContinuation(), NeighbourHasReachableRoad(), RemoveRoad(), and RemoveRoadStop().
bool IsHangar | ( | TileIndex | t | ) |
Check whether the given tile is a hangar.
t | the tile to of whether it is a hangar. |
Definition at line 57 of file station_cmd.cpp.
References Station::Airport(), AirportFTAClass::airport_depots, Station::airport_tile, SpecializedStation< Station, false >::GetByTile(), IsAirport(), IsTileType(), MP_STATION, AirportFTAClass::nof_depots, and ToTileIndexDiff().
Referenced by AIOrder::GetOrderDestination(), GetOrderTypeByTile(), and AIAirport::IsHangarTile().
static bool IsRailStation | ( | TileIndex | t | ) | [inline, static] |
Is this station tile a rail station?
t | the tile to get the information from |
Definition at line 131 of file station_map.h.
References GetStationType().
Referenced by CheckFlatLandBelow(), HasStationRail(), and IsRailStationTile().
static bool IsRailStationTile | ( | TileIndex | t | ) | [inline, static] |
Is this tile a station tile and a rail station?
t | the tile to get the information from |
Definition at line 141 of file station_map.h.
References IsRailStation(), IsTileType(), and MP_STATION.
Referenced by CheckNextTrainTile(), ClearPathReservation(), CmdBuildRailStation(), FreeTrainTrackReservation(), Station::GetPlatformLength(), GetTrainAcceleration(), GetTrainForReservation(), AIRail::IsRailStationTile(), NPFSaveTargetData(), RemoveFromRailBaseStation(), SetRailStationPlatformReservation(), and Station::TileBelongsToRailStation().
static bool IsRailWaypoint | ( | TileIndex | t | ) | [inline, static] |
Is this station tile a rail waypoint?
t | the tile to get the information from |
Definition at line 152 of file station_map.h.
References GetStationType().
Referenced by GetOrderTypeByTile(), HasStationRail(), IsRailWaypointTile(), and IsValidTileForWaypoint().
static bool IsRailWaypointTile | ( | TileIndex | t | ) | [inline, static] |
Is this tile a station tile and a rail waypoint?
t | the tile to get the information from |
Definition at line 162 of file station_map.h.
References IsRailWaypoint(), IsTileType(), and MP_STATION.
Referenced by GetAxisForNewWaypoint(), and AIRail::IsRailWaypointTile().
static bool IsRoadStop | ( | TileIndex | t | ) | [inline, static] |
Is the station at t a road station?
t | Tile to check |
true
if station at the tile is a bus top or a truck stop, false
otherwise Definition at line 231 of file station_map.h.
References IsBusStop(), IsTileType(), IsTruckStop(), and MP_STATION.
Referenced by CmdRemoveRoadStop(), IsRoadStopTile(), and AIRoad::RemoveRoadStation().
static bool IsRoadStopTile | ( | TileIndex | t | ) | [inline, static] |
Is tile t a road stop station?
t | Tile to check |
true
if the tile is a station tile and a road stop Definition at line 242 of file station_map.h.
References IsRoadStop(), IsTileType(), and MP_STATION.
Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), GetAnyRoadBits(), GetRoadStopDir(), IsDriveThroughStopTile(), AIRoad::IsRoadStationTile(), and IsStandardRoadStopTile().
static bool IsStandardRoadStopTile | ( | TileIndex | t | ) | [inline, static] |
Is tile t a standard (non-drive through) road stop station?
t | Tile to check |
true
if the tile is a station tile and a standard road stop Definition at line 252 of file station_map.h.
References GetStationGfx(), and IsRoadStopTile().
Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CanEnterTileOwnerCheck(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), RoadStop::Enter(), GetTileSingleEntry(), GetTownRoadBits(), RoadStop::Leave(), RoadFindPathToDest(), and StateGameLoop().
static bool IsTruckStop | ( | TileIndex | t | ) | [inline, static] |
Is the station at t a truck stop?
t | Tile to check |
true
if station is a truck stop, false
otherwise Definition at line 209 of file station_map.h.
References GetStationType().
Referenced by IsRoadStop(), and RemoveRoadStop().
static void SetRailStationReservation | ( | TileIndex | t, | |
bool | b | |||
) | [inline, static] |
Set the reservation state of the rail station.
t | the station tile | |
b | the reservation state |
Definition at line 361 of file station_map.h.
References _m, HasStationRail(), and SB().
Referenced by CmdBuildRailWaypoint(), MoveWaypointsToBaseStations(), NPFSaveTargetData(), SetRailStationPlatformReservation(), TryReserveRailTrack(), and UnreserveRailTrack().
static void SetStationAnimationFrame | ( | TileIndex | t, | |
uint8 | frame | |||
) | [inline, static] |
Set the station's animation frame of this tile.
t | the tile to update | |
frame | the new frame |
Definition at line 119 of file station_map.h.
References _me, IsTileType(), TileExtended::m7, and MP_STATION.
Referenced by CmdBuildRailStation().
static void SetStationGfx | ( | TileIndex | t, | |
StationGfx | gfx | |||
) | [inline, static] |
Set the station graphics of this tile.
t | the tile to update | |
gfx | the new graphics |
Definition at line 95 of file station_map.h.
References _m, IsTileType(), Tile::m5, and MP_STATION.
Referenced by CmdBuildRailStation().