OpenTTD Source 20250312-master-gcdcc6b491d
|
Types related to stations. More...
Go to the source code of this file.
Data Structures | |
struct | StationCompare |
class | StationFinder |
Structure contains cached list of stations nearby. More... | |
Typedefs | |
using | StationID = PoolID< uint16_t, struct StationIDTag, 64000, 0xFFFF > |
using | RoadStopID = PoolID< uint16_t, struct RoadStopIDTag, 64000, 0xFFFF > |
using | StationIDStack = SmallStack< StationID::BaseType, StationID::BaseType, StationID::Invalid().base(), 8, StationID::End().base()> |
using | StationFacilities = EnumBitSet< StationFacility, uint8_t > |
typedef std::set< Station *, StationCompare > | StationList |
List of stations. | |
Enumerations | |
enum class | StationType : uint8_t { Rail , Airport , Truck , Bus , Oilrig , Dock , Buoy , RailWaypoint , RoadWaypoint , End } |
Station types. More... | |
enum class | RoadStopType : uint8_t { Bus , Truck , End } |
Types of RoadStops. More... | |
enum class | StationFacility : uint8_t { Train = 0 , TruckStop = 1 , BusStop = 2 , Airport = 3 , Dock = 4 , Waypoint = 7 } |
The facilities a station might be having. More... | |
enum | StationHadVehicleOfType : uint8_t { HVOT_NONE = 0 , HVOT_TRAIN = 1 << 1 , HVOT_BUS = 1 << 2 , HVOT_TRUCK = 1 << 3 , HVOT_AIRCRAFT = 1 << 4 , HVOT_SHIP = 1 << 5 , HVOT_WAYPOINT = 1 << 6 } |
The vehicles that may have visited a station. More... | |
Variables | |
static constexpr StationID | NEW_STATION {0xFFFD} |
static constexpr StationID | ADJACENT_STATION {0xFFFE} |
static constexpr StationFacility | STATION_FACILITY_GHOST {6} |
Fake 'facility' to allow toggling display of recently-removed station signs. | |
static constexpr uint | CA_NONE = 0 |
Catchment when the station has no facilities. | |
static constexpr uint | CA_BUS = 3 |
Catchment for bus stops with "modified catchment" enabled. | |
static constexpr uint | CA_TRUCK = 3 |
Catchment for truck stops with "modified catchment" enabled. | |
static constexpr uint | CA_TRAIN = 4 |
Catchment for train stations with "modified catchment" enabled. | |
static constexpr uint | CA_DOCK = 5 |
Catchment for docks with "modified catchment" enabled. | |
static constexpr uint | CA_UNMODIFIED = 4 |
Catchment for all stations with "modified catchment" disabled. | |
static constexpr uint | MAX_CATCHMENT = 10 |
Maximum catchment for airports with "modified catchment" enabled. | |
static const uint | MAX_LENGTH_STATION_NAME_CHARS = 32 |
The maximum length of a station name in characters including '\0'. | |
Types related to stations.
Definition in file station_type.h.
using RoadStopID = PoolID<uint16_t, struct RoadStopIDTag, 64000, 0xFFFF> |
Definition at line 21 of file station_type.h.
using StationFacilities = EnumBitSet<StationFacility, uint8_t> |
Definition at line 61 of file station_type.h.
Definition at line 17 of file station_type.h.
using StationIDStack = SmallStack<StationID::BaseType, StationID::BaseType, StationID::Invalid().base(), 8, StationID::End().base()> |
Definition at line 29 of file station_type.h.
typedef std::set<Station *, StationCompare> StationList |
List of stations.
Definition at line 97 of file station_type.h.
|
strong |
Types of RoadStops.
Enumerator | |
---|---|
Bus | A standard stop for buses. |
Truck | A standard stop for trucks. |
End | End of valid types. |
Definition at line 46 of file station_type.h.
|
strong |
enum StationHadVehicleOfType : uint8_t |
The vehicles that may have visited a station.
Enumerator | |
---|---|
HVOT_NONE | Station has seen no vehicles. |
HVOT_TRAIN | Station has seen a train. |
HVOT_BUS | Station has seen a bus. |
HVOT_TRUCK | Station has seen a truck. |
HVOT_AIRCRAFT | Station has seen an aircraft. |
HVOT_SHIP | Station has seen a ship. |
HVOT_WAYPOINT | Station is a waypoint (NewGRF only!) |
Definition at line 67 of file station_type.h.
|
strong |
Station types.
Definition at line 32 of file station_type.h.
|
staticconstexpr |
Definition at line 19 of file station_type.h.
|
staticconstexpr |
Catchment for bus stops with "modified catchment" enabled.
Definition at line 81 of file station_type.h.
Referenced by Station::GetCatchmentRadius(), GetTileCatchmentRadius(), and BuildRoadStationWindow::OnPaint().
|
staticconstexpr |
Catchment for docks with "modified catchment" enabled.
Definition at line 84 of file station_type.h.
Referenced by Station::GetCatchmentRadius(), GetTileCatchmentRadius(), and BuildDocksStationWindow::OnPaint().
|
staticconstexpr |
Catchment when the station has no facilities.
Definition at line 80 of file station_type.h.
Referenced by Station::GetCatchmentRadius(), GetTileCatchmentRadius(), and Station::RecomputeCatchment().
|
staticconstexpr |
Catchment for train stations with "modified catchment" enabled.
Definition at line 83 of file station_type.h.
Referenced by Station::GetCatchmentRadius(), GetTileCatchmentRadius(), and BuildRailStationWindow::OnPaint().
|
staticconstexpr |
Catchment for truck stops with "modified catchment" enabled.
Definition at line 82 of file station_type.h.
Referenced by Station::GetCatchmentRadius(), GetTileCatchmentRadius(), and BuildRoadStationWindow::OnPaint().
|
staticconstexpr |
Catchment for all stations with "modified catchment" disabled.
Definition at line 86 of file station_type.h.
Referenced by ForAllStationsAroundTiles(), Station::GetCatchmentRadius(), GetTileCatchmentRadius(), BuildAirportWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), and BuildRoadStationWindow::OnPaint().
|
staticconstexpr |
Maximum catchment for airports with "modified catchment" enabled.
Definition at line 88 of file station_type.h.
Referenced by AirportChangeInfo(), and ForAllStationsAroundTiles().
|
static |
The maximum length of a station name in characters including '\0'.
Definition at line 90 of file station_type.h.
Referenced by CmdRenameStation(), CmdRenameWaypoint(), StationViewWindow::OnClick(), and WaypointWindow::OnClick().
|
staticconstexpr |
Definition at line 18 of file station_type.h.
|
staticconstexpr |
Fake 'facility' to allow toggling display of recently-removed station signs.
Definition at line 64 of file station_type.h.
Referenced by MenuClickSettings(), and ToolbarOptionsClick().