OpenTTD Source
20241120-master-g6d3adc6169
|
header file for electrified rail specific functions More...
Go to the source code of this file.
Functions | |
bool | HasRailCatenary (RailType rt) |
Test if a rail type has catenary. More... | |
bool | HasRailCatenaryDrawn (RailType rt) |
Test if we should draw rail catenary. More... | |
void | DrawRailCatenary (const TileInfo *ti) |
Draws overhead wires and pylons for electric railways. More... | |
void | DrawRailCatenaryOnTunnel (const TileInfo *ti) |
Draws wires on a tunnel tile. More... | |
void | DrawRailCatenaryOnBridge (const TileInfo *ti) |
Draws wires on a tunnel tile. More... | |
void | SettingsDisableElrail (int32_t new_value) |
_settings_game.disable_elrail callback | |
void | UpdateDisableElrailSettingState (bool disable, bool update_vehicles) |
header file for electrified rail specific functions
Definition in file elrail_func.h.
void DrawRailCatenary | ( | const TileInfo * | ti | ) |
Draws overhead wires and pylons for electric railways.
ti | The TileInfo struct of the tile being drawn |
Definition at line 568 of file elrail.cpp.
References GetTileType(), IsRailDepot(), MP_RAILWAY, and TileInfo::tile.
void DrawRailCatenaryOnBridge | ( | const TileInfo * | ti | ) |
Draws wires on a tunnel tile.
DrawTile_TunnelBridge() calls this function to draw the wires on the bridge.
ti | The Tileinfo to draw the tile for |
Definition at line 506 of file elrail.cpp.
References AXIS_X, GetBridgeAxis(), GetOtherBridgeEnd(), GetSouthernBridgeEnd(), GetTLG(), GetTunnelBridgeLength(), and TileInfo::tile.
void DrawRailCatenaryOnTunnel | ( | const TileInfo * | ti | ) |
Draws wires on a tunnel tile.
DrawTile_TunnelBridge() calls this function to draw the wires as SpriteCombine with the tunnel roof.
ti | The Tileinfo to draw the tile for |
Definition at line 249 of file elrail.cpp.
References GetTunnelBridgeDirection(), GetWireBase(), and TileInfo::tile.
|
inline |
Test if a rail type has catenary.
rt | Rail type to test |
Definition at line 21 of file elrail_func.h.
References GetRailTypeInfo(), HasBit(), and RTF_CATENARY.
Referenced by GetRailTrackBitsUniversal(), HasRailCatenaryDrawn(), and MaskWireBits().
|
inline |
Test if we should draw rail catenary.
rt | Rail type to test |
Definition at line 30 of file elrail_func.h.
References _settings_game, VehicleSettings::disable_elrails, HasRailCatenary(), IsInvisibilitySet(), TO_CATENARY, and GameSettings::vehicle.