OpenTTD
|
header file for electrified rail specific functions More...
Go to the source code of this file.
Functions | |
static bool | HasCatenary (RailType rt) |
Test if a rail type has catenary. | |
static bool | HasCatenaryDrawn (RailType rt) |
Test if we should draw rail catenary. | |
void | DrawCatenary (const TileInfo *ti) |
Draws overhead wires and pylons for electric railways. | |
void | DrawCatenaryOnTunnel (const TileInfo *ti) |
Draws wires on a tunnel tile. | |
void | DrawCatenaryOnBridge (const TileInfo *ti) |
Draws wires on a tunnel tile. | |
bool | SettingsDisableElrail (int32 p1) |
_settings_game.disable_elrail callback |
header file for electrified rail specific functions
Definition in file elrail_func.h.
void DrawCatenary | ( | const TileInfo * | ti | ) |
Draws overhead wires and pylons for electric railways.
ti | The TileInfo struct of the tile being drawn |
Definition at line 563 of file elrail.cpp.
References AddSortableSpriteToDraw(), DrawCatenaryRailway(), GetRailDepotDirection(), GetTileMaxPixelZ(), GetTileType(), GetWireBase(), IsRailDepot(), IsTransparencySet(), MP_RAILWAY, MP_ROAD, MP_STATION, MP_TUNNELBRIDGE, TileInfo::tile, TO_CATENARY, TileInfo::x, and TileInfo::y.
Referenced by DrawTile_Road(), and DrawTile_TunnelBridge().
void DrawCatenaryOnBridge | ( | 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 501 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(), GetTLG(), GetTunnelBridgeLength(), GetWireBase(), HasBit(), IsTransparencySet(), ReverseDir(), TCX_ON_BRIDGE, TileInfo::tile, TO_CATENARY, TileInfo::x, and TileInfo::y.
Referenced by DrawBridgeMiddle().
void DrawCatenaryOnTunnel | ( | 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 244 of file elrail.cpp.
References AddSortableSpriteToDraw(), BB_Z_SEPARATOR, GetTilePixelZ(), GetTunnelBridgeDirection(), GetWireBase(), IsTransparencySet(), TileInfo::tile, TO_CATENARY, TileInfo::x, and TileInfo::y.
Referenced by DrawTile_TunnelBridge().
|
inlinestatic |
Test if a rail type has catenary.
rt | Rail type to test |
Definition at line 23 of file elrail_func.h.
References GetRailTypeInfo(), HasBit(), and RTF_CATENARY.
Referenced by DrawCatenaryRailway(), GetRailTrackBitsUniversal(), HasCatenaryDrawn(), and MaskWireBits().
|
inlinestatic |
Test if we should draw rail catenary.
rt | Rail type to test |
Definition at line 32 of file elrail_func.h.
References _settings_game, VehicleSettings::disable_elrails, HasCatenary(), IsInvisibilitySet(), TO_CATENARY, and GameSettings::vehicle.
Referenced by DrawBridgeMiddle(), DrawTile_Road(), and DrawTile_TunnelBridge().