OpenTTD
Functions
elrail_func.h File Reference

header file for electrified rail specific functions More...

#include "rail.h"
#include "tile_cmd.h"
#include "transparency.h"

Go to the source code of this file.

Functions

static bool HasRailCatenary (RailType rt)
 Test if a rail type has catenary. More...
 
static 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...
 
bool SettingsDisableElrail (int32 p1)
 _settings_game.disable_elrail callback
 

Detailed Description

header file for electrified rail specific functions

Definition in file elrail_func.h.

Function Documentation

◆ DrawRailCatenary()

void DrawRailCatenary ( const TileInfo ti)

Draws overhead wires and pylons for electric railways.

Parameters
tiThe TileInfo struct of the tile being drawn
See also
DrawRailCatenaryRailway

Definition at line 564 of file elrail.cpp.

References GetTileType(), IsRailDepot(), MP_RAILWAY, and TileInfo::tile.

Referenced by HasRailCatenaryDrawn().

◆ DrawRailCatenaryOnBridge()

void DrawRailCatenaryOnBridge ( const TileInfo ti)

Draws wires on a tunnel tile.

DrawTile_TunnelBridge() calls this function to draw the wires on the bridge.

Parameters
tiThe Tileinfo to draw the tile for

Definition at line 502 of file elrail.cpp.

References GetOtherBridgeEnd(), GetSouthernBridgeEnd(), GetTunnelBridgeLength(), and TileInfo::tile.

Referenced by HasRailCatenaryDrawn().

◆ DrawRailCatenaryOnTunnel()

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.

Parameters
tiThe Tileinfo to draw the tile for

Definition at line 245 of file elrail.cpp.

References GetTunnelBridgeDirection(), GetWireBase(), and TileInfo::tile.

Referenced by HasRailCatenaryDrawn().

◆ HasRailCatenary()

static bool HasRailCatenary ( RailType  rt)
inlinestatic

Test if a rail type has catenary.

Parameters
rtRail type to test

Definition at line 23 of file elrail_func.h.

References GetRailTypeInfo(), HasBit(), and RTF_CATENARY.

Referenced by GetRailTrackBitsUniversal(), HasRailCatenaryDrawn(), and MaskWireBits().

◆ HasRailCatenaryDrawn()

static bool HasRailCatenaryDrawn ( RailType  rt)
inlinestatic