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

Function GetTileLocationGroup

src/elrail.cpp:75–78  ·  view source on GitHub ↗

* Get the tile location group of a tile. * @param t The tile to get the tile location group of. * @return The tile location group. */

Source from the content-addressed store, hash-verified

73 * @return The tile location group.
74 */
75static inline TileLocationGroup GetTileLocationGroup(TileIndex t)
76{
77 return static_cast<TileLocationGroup>((GB(TileX(t), 0, 1) << 1) + GB(TileY(t), 0, 1));
78}
79
80/**
81 * Finds which Electrified Rail Bits are present on a given tile.

Callers 2

DrawRailCatenaryRailwayFunction · 0.85
DrawRailCatenaryOnBridgeFunction · 0.85

Calls 3

GBFunction · 0.85
TileXFunction · 0.85
TileYFunction · 0.85

Tested by

no test coverage detected