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

Function GetStationTileFlags

src/station_cmd.cpp:1404–1409  ·  view source on GitHub ↗

* Get station tile flags for the given StationGfx. * @param gfx StationGfx of station tile. * @param statspec Station spec of station tile. * @return Tile flags to apply. */

Source from the content-addressed store, hash-verified

1402 * @return Tile flags to apply.
1403 */
1404static StationSpec::TileFlags GetStationTileFlags(StationGfx gfx, const StationSpec *statspec)
1405{
1406 /* Default stations do not draw pylons under roofs (gfx >= 4) */
1407 if (statspec == nullptr || gfx >= statspec->tileflags.size()) return gfx < 4 ? StationSpec::TileFlag::Pylons : StationSpec::TileFlags{};
1408 return statspec->tileflags[gfx];
1409}
1410
1411/**
1412 * Set rail station tile flags for the given tile.

Callers 1

SetRailStationTileFlagsFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected