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

Function GetTreeGrowth

src/tree_map.h:195–199  ·  view source on GitHub ↗

* Returns the tree growth stage. * * This function returns the tree growth stage of a tile with trees. * * @param t The tile to get the tree growth stage * @return The tree growth stage * @pre Tile must be of type MP_TREES */

Source from the content-addressed store, hash-verified

193 * @pre Tile must be of type MP_TREES
194 */
195inline TreeGrowthStage GetTreeGrowth(Tile t)
196{
197 assert(IsTileType(t, MP_TREES));
198 return static_cast<TreeGrowthStage>(GB(t.m5(), 0, 3));
199}
200
201/**
202 * Add a value to the tree growth stage.

Callers 3

ChopLumberMillTreesFunction · 0.85
DrawTile_TreesFunction · 0.85
TileLoop_TreesFunction · 0.85

Calls 2

IsTileTypeFunction · 0.85
GBFunction · 0.85

Tested by

no test coverage detected