|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
Enums and other types related to roads. More...
#include "core/enum_type.hpp"Go to the source code of this file.
Typedefs | |
| typedef uint32_t | RoadTypeLabel |
| using | RoadTypes = EnumBitSet<RoadType, uint64_t> |
| using | RoadTramTypes = EnumBitSet<RoadTramType, uint8_t> |
Bitset of RoadTramType elements. | |
| using | RoadBits = EnumBitSet<RoadBit, uint8_t> |
Bitset of RoadBit elements. | |
| using | DisallowedRoadDirections = EnumBitSet<DisallowedRoadDirection, uint8_t> |
Bitset of DisallowedRoadDirection elements. | |
Enumerations | |
| enum | RoadType : uint8_t { ROADTYPE_BEGIN = 0 , ROADTYPE_ROAD = 0 , ROADTYPE_TRAM = 1 , ROADTYPE_END = 63 , INVALID_ROADTYPE = 63 } |
| The different roadtypes we support. More... | |
| enum class | RoadTramType : uint8_t { Road , Tram , End , Invalid = 0xFF } |
| The different types of road type. More... | |
| enum class | RoadBit : uint8_t { NW = 0 , SW = 1 , SE = 2 , NE = 3 } |
| Enumeration for the road parts on a tile. More... | |
| enum class | DisallowedRoadDirection : uint8_t { Southbound , Northbound , End } |
| Which directions are disallowed ? More... | |
Variables | |
| static const RoadTypeLabel | ROADTYPE_LABEL_ROAD = 'ROAD' |
| static const RoadTypeLabel | ROADTYPE_LABEL_TRAM = 'ELRL' |
| static constexpr RoadTramTypes | ROADTRAMTYPES_ALL {RoadTramType::Road, RoadTramType::Tram} |
| All possible RoadTramTypes. | |
| static constexpr RoadBits | ROAD_X {RoadBit::SW, RoadBit::NE} |
| Full road along the x-axis (south-west + north-east). | |
| static constexpr RoadBits | ROAD_Y {RoadBit::NW, RoadBit::SE} |
| Full road along the y-axis (north-west + south-east). | |
| static constexpr RoadBits | ROAD_N {RoadBit::NE, RoadBit::NW} |
| Road at the two northern edges. | |
| static constexpr RoadBits | ROAD_E {RoadBit::NE, RoadBit::SE} |
| Road at the two eastern edges. | |
| static constexpr RoadBits | ROAD_S {RoadBit::SE, RoadBit::SW} |
| Road at the two southern edges. | |
| static constexpr RoadBits | ROAD_W {RoadBit::NW, RoadBit::SW} |
| Road at the two western edges. | |
| static constexpr RoadBits | ROAD_ALL {RoadBit::NW, RoadBit::SW, RoadBit::SE, RoadBit::NE} |
| Full 4-way crossing. | |
Enums and other types related to roads.
Definition in file road_type.h.
| using DisallowedRoadDirections = EnumBitSet<DisallowedRoadDirection, uint8_t> |
Bitset of DisallowedRoadDirection elements.
Definition at line 84 of file road_type.h.
| using RoadBits = EnumBitSet<RoadBit, uint8_t> |
Bitset of RoadBit elements.
Definition at line 64 of file road_type.h.
| using RoadTramTypes = EnumBitSet<RoadTramType, uint8_t> |
Bitset of RoadTramType elements.
Definition at line 45 of file road_type.h.
| typedef uint32_t RoadTypeLabel |
Definition at line 15 of file road_type.h.
| using RoadTypes = EnumBitSet<RoadType, uint64_t> |
Definition at line 32 of file road_type.h.
|
strong |
Which directions are disallowed ?
| Enumerator | |
|---|---|
| Southbound | All southbound traffic is disallowed. |
| Northbound | All northbound traffic is disallowed. |
| End | End marker. |
Definition at line 77 of file road_type.h.
|
strong |
Enumeration for the road parts on a tile.
This enumeration defines the possible road parts which can be build on a tile.
| Enumerator | |
|---|---|
| NW | North-west part. |
| SW | South-west part. |
| SE | South-east part. |
| NE | North-east part. |
Definition at line 56 of file road_type.h.
|
strong |
The different types of road type.
| Enumerator | |
|---|---|
| Road | Road type. |
| Tram | Tram type. |
| End | End marker. |
| Invalid | Invalid marker. |
Definition at line 37 of file road_type.h.
| enum RoadType : uint8_t |
The different roadtypes we support.
| Enumerator | |
|---|---|
| ROADTYPE_BEGIN | Used for iterations. |
| ROADTYPE_ROAD | Basic road type. |
| ROADTYPE_TRAM | Trams. |
| ROADTYPE_END | Used for iterations. |
| INVALID_ROADTYPE | flag for invalid roadtype |
Definition at line 23 of file road_type.h.
|
staticconstexpr |
Full 4-way crossing.
Definition at line 74 of file road_type.h.
Referenced by ComplementRoadBits(), GetTownRoadGridElement(), and IsValidRoadBits().
|
staticconstexpr |
Road at the two eastern edges.
Definition at line 70 of file road_type.h.
Referenced by GrowTownInTile().
|
staticconstexpr |
Road at the two northern edges.
Definition at line 69 of file road_type.h.
Referenced by GrowTownInTile().
|
staticconstexpr |
Road at the two southern edges.
Definition at line 71 of file road_type.h.
Referenced by GrowTownInTile().
|
staticconstexpr |
Road at the two western edges.
Definition at line 72 of file road_type.h.
Referenced by GrowTownInTile().
|
staticconstexpr |
Full road along the x-axis (south-west + north-east).
Definition at line 66 of file road_type.h.
Referenced by AfterLoadGame(), AxisToRoadBits(), CheckFlatLandRoadStop(), CmdBuildRoad(), CmdBuildSingleRail(), DrawRoadBits(), DrawRoadCatenary(), GetAxisForNewRoadWaypoint(), GetCrossingRoadBits(), GetRoadFoundation(), GetTownRoadGridElement(), GrowTownInTile(), IsRoadAllowedHere(), and IsStraightRoad().
|
staticconstexpr |
Full road along the y-axis (north-west + south-east).
Definition at line 67 of file road_type.h.
Referenced by AfterLoadGame(), AxisToRoadBits(), CheckFlatLandRoadStop(), CmdBuildRoad(), CmdBuildSingleRail(), DrawRoadCatenary(), GetAxisForNewRoadWaypoint(), GetCrossingRoadBits(), GetTownRoadGridElement(), IsRoadAllowedHere(), and IsStraightRoad().
|
staticconstexpr |
All possible RoadTramTypes.
Definition at line 48 of file road_type.h.
Referenced by AfterLoadCompanyStats(), AfterLoadGame(), ChangeTileOwner_Road(), ChangeTileOwner_Station(), ChangeTileOwner_TunnelBridge(), ClearTile_Road(), ReplaceVehicleWindow::OnClick(), RemoveGenericRoadStop(), RemoveRoadStop(), and RemoveRoadWaypointStop().
|
static |
Definition at line 17 of file road_type.h.
|
static |
Definition at line 18 of file road_type.h.