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

Function SetTreeGrowth

src/tree_map.h:226–230  ·  view source on GitHub ↗

* Sets the tree growth stage of a tile. * * This function sets the tree growth stage of a tile directly with * the given value. * * @param t The tile to change the tree growth stage * @param g The new value * @pre Tile must be of type MP_TREES */

Source from the content-addressed store, hash-verified

224 * @pre Tile must be of type MP_TREES
225 */
226inline void SetTreeGrowth(Tile t, TreeGrowthStage g)
227{
228 assert(IsTileType(t, MP_TREES)); // XXX incomplete
229 SB(t.m5(), 0, 3, to_underlying(g));
230}
231
232/**
233 * Make a tree-tile.

Callers 2

PlaceTreeGroupAroundTileFunction · 0.85
TileLoop_TreesFunction · 0.85

Calls 3

IsTileTypeFunction · 0.85
SBFunction · 0.85
to_underlyingFunction · 0.85

Tested by

no test coverage detected