168 std::vector<BadgeID> badges;
170 inline bool UsesOverlay()
const
190inline bool RoadTypeIsRoad(
RoadType roadtype)
195inline bool RoadTypeIsTram(
RoadType roadtype)
219 return &_roadtypes[roadtype];
272 if (from == to)
return (Money)0;
constexpr bool Test(Tvalue_type value) const
Test if the value-th bit is set.
A sort-of mixin that implements 'at(pos)' and 'operator[](pos)' only for a specific enum class.
Flat set implementation that uses a sorted vector for storage.
RoadTypeLabel label
Unique 32 bit road type identifier.
StringID menu_text
Name of this rail type in the main toolbar dropdown.
StringID replace_text
Text used in the autoreplace GUI.
struct RoadTypeInfo::@040007041145073342004320043002073006000034160103 gui_sprites
struct containing the sprites for the road GUI.
StringID picker_title[2]
Title for the station picker for bus or truck stations.
RoadTypes powered_roadtypes
bitmask to the OTHER roadtypes on which a vehicle of THIS roadtype generates power
struct RoadTypeInfo::@262365004142063215107272155332373126354130071373 cursor
Cursors associated with the road type.
RoadTypes introduces_roadtypes
Bitmask of which other roadtypes are introduced when this roadtype is introduced.
RoadType Index() const
Get the RoadType for this RoadTypeInfo.
CursorID autoroad
Cursor for autorail tool.
TimerGameCalendar::Date introduction_date
Introduction date.
uint8_t sorting_order
The sorting order of this roadtype for the toolbar dropdown.
EnumClassIndexContainer< std::array< const SpriteGroup *, to_underlying(RoadSpriteType::End)>, RoadSpriteType > group
Sprite groups for resolving sprites.
StringID picker_tooltip[2]
Tooltip for the station picker for bus or truck stations.
uint16_t maintenance_multiplier
Cost multiplier for maintenance of this road type.
RoadTypeFlags flags
Bit mask of road type flags.
StringID err_build_road
Building a normal piece of road.
StringID err_remove_road
Removing a normal piece of road.
FlatSet< RoadTypeLabel > alternate_labels
Road type labels this type provides in addition to the main label.
CursorID depot
Cursor for building a depot.
CursorID road_nwse
Cursor for building rail in Y direction.
uint16_t max_speed
Maximum speed for vehicles travelling on this road type.
EnumClassIndexContainer< std::array< const GRFFile *, to_underlying(RoadSpriteType::End)>, RoadSpriteType > grffile
NewGRF providing the Action3 for the roadtype.
struct RoadTypeInfo::@070000167274302256150317022075324310363002361255 strings
Strings associated with the rail type.
StringID name
Name of this rail type.
StringID toolbar_caption
Caption in the construction toolbar GUI for this rail type.
SpriteID build_y_road
button for building single rail in Y direction
CursorID tunnel
Cursor for building a tunnel.
SpriteID auto_road
button for the autoroad construction
SpriteID convert_road
button for converting road types
CursorID road_swne
Cursor for building rail in X direction.
StringID err_convert_road
Converting a road type.
StringID new_engine
Name of an engine for this type of road in the engine preview GUI.
StringID err_depot
Building a depot.
SpriteID build_x_road
button for building single rail in X direction
SpriteID build_depot
button for building depots
RoadTypes introduction_required_roadtypes
Bitmask of roadtypes that are required for this roadtype to be introduced at a given introduction_dat...
SpriteID build_tunnel
button for building a tunnel
StringID err_build_station[2]
Building a bus or truck station.
uint16_t cost_multiplier
Cost multiplier for building this road type.
PixelColour map_colour
Colour on mini-map.
StringID err_remove_station[2]
Removing of a bus or truck station.
StringID build_caption
Caption of the build vehicle GUI for this rail type.
StrongType::Typedef< int32_t, DateTag< struct Calendar >, StrongType::Compare, StrongType::Integer > Date
Prices _price
Prices and also the fractional part.
Functions related to the economy.
@ ClearRoad
Price for destroying roads.
@ BuildRoad
Price for building roads.
Type (helpers) for enums.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23).
Flat set container implementation.
Types related to the graphics and/or input devices.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
uint32_t CursorID
The number of the cursor (sprite).
Base for the NewGRF implementation.
Types related to NewGRF badges.
void ResetRoadTypes()
Reset all road type information to its default values.
void InitRoadTypes()
Resolve sprites of custom road types.
bool HasPowerOnRoad(RoadType enginetype, RoadType tiletype)
Checks if an engine of the given RoadType got power on a tile with a given RoadType.
RoadTypeFlag
Roadtype flag bit numbers.
@ Catenary
Bit number for adding catenary.
@ NoHouses
Bit number for setting this roadtype as not house friendly.
@ Hidden
Bit number for hidden from construction.
@ NoLevelCrossing
Bit number for disabling level crossing.
@ TownBuild
Bit number for allowing towns to build this roadtype.
RoadTypes _roadtypes_hidden_mask
Bitset of hidden roadtypes.
Money RoadClearCost(RoadType roadtype)
Returns the cost of clearing the specified roadtype.
bool HasAnyRoadTypesAvail(CompanyID company, RoadTramType rtt)
Test if any buildable RoadType is available for a company.
RoadTypes GetMaskForRoadTramType(RoadTramType rtt)
Get the mask for road types of the given RoadTramType.
const RoadTypeInfo * GetRoadTypeInfo(RoadType roadtype)
Returns a pointer to the Roadtype information for a given roadtype.
Money RoadConvertCost(RoadType from, RoadType to)
Calculates the cost of road conversion.
RoadType GetRoadTypeByLabel(RoadTypeLabel label, bool allow_alternate_labels=true)
Get the road type for a given label.
RoadSpriteType
Sprite types for a roadtype.
@ Roadstop
Required: Bay stop surface.
@ Ground
Required: Main group of ground images.
@ CatenaryFront
Optional: Catenary front.
@ ReservedFence
Placeholder, if we add road fences (for highways).
@ Overlay
Optional: Images for overlaying track.
@ UI
Optional: Cursor and toolbar icon images.
@ CatenaryRear
Optional: Catenary back.
@ Oneway
Optional: One-way indicator images.
@ ReservedCrossing
Placeholder, if we need specific level crossing sprites.
@ Bridge
Required: Bridge surface images.
@ Tunnel
Optional: Ground images for tunnels.
std::vector< RoadType > _sorted_roadtypes
Sorted list of road types.
bool RoadNoLevelCrossing(RoadType roadtype)
Test if road disallows level crossings.
RoadType AllocateRoadType(RoadTypeLabel label, RoadTramType rtt)
Allocate a new road type label.
Money RoadBuildCost(RoadType roadtype)
Returns the cost of building the specified roadtype.
RoadTypes _roadtypes_road
Bitset of road roadtypes.
RoadTypes _roadtypes_tram
Bitset of tram roadtypes.
Enums and other types related to roads.
RoadType
The different roadtypes we support.
@ ROADTYPE_END
Used for iterations.
RoadTramType
The different types of road type.
Types related to strings.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Dynamic data of a loaded NewGRF.
Colour for pixel/line drawing.
Common wrapper for all the different sprite group types.
Definition of the game-calendar-timer.