|
OpenTTD Source 20260218-master-g2123fca5ea
|
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. | |
| bool | HasRailCatenaryDrawn (RailType rt) |
| Test if we should draw rail catenary. | |
| void | DrawRailCatenary (const TileInfo *ti) |
| Draws overhead wires and pylons for electric railways. | |
| void | DrawRailCatenaryOnTunnel (const TileInfo *ti) |
| Draws wires on a tunnel tile. | |
| void | DrawRailCatenaryOnBridge (const TileInfo *ti) |
| Draws wires on a tunnel tile. | |
| void | SettingsDisableElrail (int32_t new_value) |
| Callback for changes to the electrified rails setting. | |
| 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 559 of file elrail.cpp.
References AddSortableSpriteToDraw(), DrawRailCatenaryRailway(), GetRailDepotDirection(), GetTileMaxPixelZ(), GetTileType(), GetWireBase(), IsRailDepot(), IsTransparencySet(), Railway, Road, Station, TileInfo::tile, TO_CATENARY, TunnelBridge, Coord3D< T >::x, and Coord3D< T >::y.
Referenced by DrawTile_Road(), and DrawTile_TunnelBridge().
| 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 499 of file elrail.cpp.
References AddSortableSpriteToDraw(), AXIS_X, BB_HEIGHT_UNDER_BRIDGE, DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_SE, DIAGDIR_SW, DIR_NE, DIR_NW, GetBridgeAxis(), GetBridgePixelHeight(), GetOtherBridgeEnd(), GetPylonBase(), GetSouthernBridgeEnd(), GetTileLocationGroup(), GetTunnelBridgeLength(), GetWireBase(), HasBit(), IsTransparencySet(), ReverseDir(), TCX_ON_BRIDGE, TileInfo::tile, TO_CATENARY, Coord3D< T >::x, and Coord3D< T >::y.
| 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 258 of file elrail.cpp.
References AddSortableSpriteToDraw(), GetTilePixelZ(), GetTunnelBridgeDirection(), GetWireBase(), IsTransparencySet(), TileInfo::tile, TO_CATENARY, Coord3D< T >::x, and Coord3D< T >::y.
Referenced by DrawTile_TunnelBridge().
|
inline |
Test if a rail type has catenary.
| rt | Rail type to test. |
true iff the rail type has catenary. Definition at line 22 of file elrail_func.h.
References Catenary, RailTypeInfo::flags, GetRailTypeInfo(), and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().
Referenced by DrawRailCatenaryRailway(), GetRailTrackBitsUniversal(), HasRailCatenaryDrawn(), and MaskWireBits().
|
inline |
Test if we should draw rail catenary.
| rt | Rail type to test. |
true iff catenary should be drawn for this rail type. Definition at line 32 of file elrail_func.h.
References _settings_game, HasRailCatenary(), IsInvisibilitySet(), and TO_CATENARY.
Referenced by DrawTile_Road(), and DrawTile_TunnelBridge().
| void SettingsDisableElrail | ( | int32_t | new_value | ) |
Callback for changes to the electrified rails setting.
A callback to denote that a setting has been changed.
| new_value | The new value for the setting. |
Definition at line 585 of file elrail.cpp.
| void UpdateDisableElrailSettingState | ( | bool | disable, |
| bool | update_vehicles ) |
Definition at line 591 of file elrail.cpp.