MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetWireBase

Function GetWireBase

src/elrail.cpp:177–182  ·  view source on GitHub ↗

* Get the base wire sprite to use. */

Source from the content-addressed store, hash-verified

175 * Get the base wire sprite to use.
176 */
177static inline SpriteID GetWireBase(TileIndex tile, TileContext context = TCX_NORMAL)
178{
179 const RailTypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
180 SpriteID wires = GetCustomRailSprite(rti, tile, RTSG_WIRES, context);
181 return wires == 0 ? SPR_WIRE_BASE : wires;
182}
183
184/**
185 * Get the base pylon sprite to use.

Callers 4

DrawRailCatenaryOnTunnelFunction · 0.85
DrawRailCatenaryRailwayFunction · 0.85
DrawRailCatenaryOnBridgeFunction · 0.85
DrawRailCatenaryFunction · 0.85

Calls 3

GetRailTypeInfoFunction · 0.85
GetRailTypeFunction · 0.85
GetCustomRailSpriteFunction · 0.85

Tested by

no test coverage detected