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

Function GetTreeType

src/tree_map.h:87–91  ·  view source on GitHub ↗

* Returns the treetype of a tile. * * This function returns the treetype of a given tile. As there are more * possible treetypes for a tile in a game as the enumeration #TreeType defines * this function may be return a value which isn't catch by an entry of the * enumeration #TreeType. But there is no problem known about it. * * @param t The tile to get the treetype from * @return The tree

Source from the content-addressed store, hash-verified

85 * @pre Tile t must be of type MP_TREES
86 */
87inline TreeType GetTreeType(Tile t)
88{
89 assert(IsTileType(t, MP_TREES));
90 return (TreeType)t.m3();
91}
92
93/**
94 * Returns the groundtype for tree tiles.

Callers 4

DrawTile_TreesFunction · 0.85
ClearTile_TreesFunction · 0.85
GetTileDesc_TreesFunction · 0.85
TileLoop_TreesFunction · 0.85

Calls 1

IsTileTypeFunction · 0.85

Tested by

no test coverage detected