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

Function GetRoadTileType

src/road_map.h:36–40  ·  view source on GitHub ↗

* Get the type of the road tile. * @param t Tile to query. * @pre IsTileType(t, MP_ROAD) * @return The road tile type. */

Source from the content-addressed store, hash-verified

34 * @return The road tile type.
35 */
36[[debug_inline]] inline static RoadTileType GetRoadTileType(Tile t)
37{
38 assert(IsTileType(t, MP_ROAD));
39 return static_cast<RoadTileType>(GB(t.m5(), 6, 2));
40}
41
42/**
43 * Return whether a tile is a normal road.

Callers 15

IsNormalRoadFunction · 0.85
IsLevelCrossingFunction · 0.85
IsRoadDepotFunction · 0.85
GetAnyRoadBitsFunction · 0.85
RemoveRoadFunction · 0.85
CmdBuildRoadFunction · 0.85
ClearTile_RoadFunction · 0.85
DrawTile_RoadFunction · 0.85
GetTileTrackStatus_RoadFunction · 0.85
GetTileDesc_RoadFunction · 0.85
VehicleEnter_RoadFunction · 0.85
TerraformTile_RoadFunction · 0.85

Calls 2

IsTileTypeFunction · 0.85
GBFunction · 0.85

Tested by

no test coverage detected