25 extern const byte _signal_along_trackdir[
TRACKDIR_END] = {
26 0x8, 0x8, 0x8, 0x2, 0x4, 0x1, 0, 0,
27 0x4, 0x4, 0x4, 0x1, 0x8, 0x2
32 extern const byte _signal_against_trackdir[
TRACKDIR_END] = {
33 0x4, 0x4, 0x4, 0x1, 0x8, 0x2, 0, 0,
34 0x8, 0x8, 0x8, 0x2, 0x4, 0x1
39 extern const byte _signal_on_track[] = {
40 0xC, 0xC, 0xC, 0x3, 0xC, 0x3
46 extern const TrackdirBits _exitdir_reaches_trackdirs[] = {
69 extern const TrackBits _track_crosses_tracks[] = {
112 extern const Trackdir _dir_to_diag_trackdir[] = {
116 extern const TrackBits _corner_to_trackbits[] = {
232 if (rti->
label == 0)
continue;
242 if ((rts & required) != required)
continue;
290 if (rti->
label == label)
return r;
293 if (allow_alternate_labels) {
static TileType GetTileType(TileIndex tile)
Get the tiletype of a given tile.
GameSettings _settings_game
Game settings of a running game or the scenario editor.
Definition of stuff that is very close to a company, like the company struct itself.
static const RailtypeInfo * GetRailTypeInfo(RailType railtype)
Returns a pointer to the Railtype information for a given railtype.
static const int DAYS_IN_YEAR
days per year
static TransportType GetTunnelBridgeTransportType(TileIndex t)
Tunnel: Get the transport type of the tunnel (road or rail) Bridge: Get the transport type of the bri...
RailTypes
The different roadtypes we support, but then a bitmask of them.
byte landscape
the landscape we're currently in
Maps accessors for stations.
RailType
Enumeration for all possible railtypes.
Y-axis and direction to north-west.
static Titem * Get(size_t index)
Returns Titem with given index.
Functions related to dates.
static bool IsInsideMM(const T x, const uint min, const uint max)
Checks if a value is in an interval.
RailTypes introduction_required_railtypes
Bitmask of railtypes that are required for this railtype to be introduced at a given introduction_dat...
A tile with road (or tram tracks)
Date intro_date
Date of introduction of the engine.
Right track and direction to north.
Track right, direction south.
bool ValParamRailtype(const RailType rail)
Validate functions for rail building.
X-axis and direction to south-west.
RailTypeLabelList alternate_labels
Rail type labels this type provides in addition to the main label.
Northeast, upper right on your monitor.
Standard non-electric rails.
static bool IsLevelCrossing(TileIndex t)
Return whether a tile is a level crossing.
This struct contains all the info that is needed to draw and construct tracks.
Track upper, direction east.
RailType GetBestRailtype(const CompanyID company)
Returns the "best" railtype a company can build.
static bool HasStationRail(TileIndex t)
Has this station tile a rail? In other words, is this station tile a rail station or rail waypoint...
Track right, direction north.
TrackBits
Bitfield corresponding to Track.
Track x-axis, direction north-east.
Information about a vehicle.
Track upper, direction west.
Track lower, direction west.
bool Contains(const T &item) const
Tests whether a item is present in the vector.
simple wagon, not motorized
Definition of base types and functions in a cross-platform compatible way.
A number of safeguards to prevent using unsafe methods.
RailTypes introduces_railtypes
Bitmask of which other railtypes are introduced when this railtype is introduced. ...
Trackdir
Enumeration for tracks and directions.
CompanyMask company_avail
Bit for each company whether the engine is available for that company.
DiagDirection
Enumeration for diagonal directions.
RailTypeLabel label
Unique 32 bit rail type identifier.
RailTypes GetCompanyRailtypes(CompanyID company)
Get the rail types the given company can build.
Information about a rail vehicle.
Left track and direction to north.
Upper track and direction to west.
Y-axis and direction to south-east.
Lower track and direction to east.
Functions related to companies.
RailType GetTileRailType(TileIndex tile)
Return the rail type of tile, or INVALID_RAILTYPE if this is no rail tile.
Date introduction_date
Introduction date.
Tunnel entry/exit and bridge heads.
Left track and direction to south.
Track x-axis, direction south-west.
CompanyByte _current_company
Company currently doing an action.
uint32 TileIndex
The index/ID of a Tile.
Right track and direction to south.
bool HasRailtypeAvail(const CompanyID company, const RailType railtype)
Finds out if a company has a certain railtype available.
Track y-axis, direction north-west.
Lower track and direction to west.
#define MAX_DAY
The number of days till the last day.
TrackdirBits
Enumeration of bitmasks for the TrackDirs.
Functions that have tunnels and bridges in common.
int32 Date
The type to store our dates in.
Upper track and direction to east.
Track y-axis, direction south-east.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
Track left, direction south.
GameCreationSettings game_creation
settings used during the creation of a game (map)
Track left, direction north.
Flag for invalid railtype.
Owner
Enum for all companies/owners.
Flag for an invalid trackdir.
RailType GetRailTypeByLabel(RailTypeLabel label, bool allow_alternate_labels)
Get the rail type for a given label.
Track lower, direction east.
byte climates
Climates supported by the engine.
Date _date
Current date in days (day counter)
X-axis and direction to north-east.
RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date)
Add the rail types that are to be introduced at the given date.
static RailType GetRailType(TileIndex t)
Gets the rail type of the given tile.