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

Function GetStationTileLayout

src/station_cmd.cpp:3115–3120  ·  view source on GitHub ↗

* Get station tile layout for a station type and its station gfx. * @param st Station type to draw. * @param gfx StationGfx of tile to draw. * @return Tile layout to draw. */

Source from the content-addressed store, hash-verified

3113 * @return Tile layout to draw.
3114 */
3115const DrawTileSprites *GetStationTileLayout(StationType st, uint8_t gfx)
3116{
3117 const auto &layouts = _station_display_datas[to_underlying(st)];
3118 if (gfx >= layouts.size()) gfx &= 1;
3119 return layouts.data() + gfx;
3120}
3121
3122/**
3123 * Check whether a sprite is a track sprite, which can be replaced by a non-track ground sprite and a rail overlay.

Callers 3

DrawStationTileFunction · 0.85
DrawTile_StationFunction · 0.85
StationPickerDrawSpriteFunction · 0.85

Calls 3

to_underlyingFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected