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

Function GetPylonBase

src/elrail.cpp:187–192  ·  view source on GitHub ↗

* Get the base pylon sprite to use. */

Source from the content-addressed store, hash-verified

185 * Get the base pylon sprite to use.
186 */
187static inline SpriteID GetPylonBase(TileIndex tile, TileContext context = TCX_NORMAL)
188{
189 const RailTypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
190 SpriteID pylons = GetCustomRailSprite(rti, tile, RTSG_PYLONS, context);
191 return pylons == 0 ? SPR_PYLON_BASE : pylons;
192}
193
194/**
195 * Corrects the tileh for certain tile types. Returns an effective tileh for the track on the tile.

Callers 2

DrawRailCatenaryRailwayFunction · 0.85
DrawRailCatenaryOnBridgeFunction · 0.85

Calls 3

GetRailTypeInfoFunction · 0.85
GetRailTypeFunction · 0.85
GetCustomRailSpriteFunction · 0.85

Tested by

no test coverage detected