Codechange: Don't store tree counter in the map array
(cherry picked from commit 6c3f351d5a4b0d19a1a265f04f44c70c24c19cd2) See: https://github.com/OpenTTD/OpenTTD/pull/10018
This commit is contained in:
@@ -215,50 +215,6 @@ static inline void SetTreeGrowth(TileIndex t, uint g)
|
||||
SB(_m[t].m5, 0, 3, g);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tick counter of a tree tile.
|
||||
*
|
||||
* Returns the saved tick counter of a given tile.
|
||||
*
|
||||
* @param t The tile to get the counter value from
|
||||
* @pre Tile must be of type MP_TREES
|
||||
*/
|
||||
static inline uint GetTreeCounter(TileIndex t)
|
||||
{
|
||||
assert_tile(IsTileType(t, MP_TREES), t);
|
||||
return GB(_m[t].m2, 0, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a value on the tick counter of a tree-tile
|
||||
*
|
||||
* This function adds a value on the tick counter of a tree-tile.
|
||||
*
|
||||
* @param t The tile to add the value on
|
||||
* @param a The value to add on the tick counter
|
||||
* @pre Tile must be of type MP_TREES
|
||||
*/
|
||||
static inline void AddTreeCounter(TileIndex t, int a)
|
||||
{
|
||||
assert_tile(IsTileType(t, MP_TREES), t); // XXX incomplete
|
||||
_m[t].m2 += a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the tick counter for a tree-tile
|
||||
*
|
||||
* This function sets directly the tick counter for a tree-tile.
|
||||
*
|
||||
* @param t The tile to set the tick counter
|
||||
* @param c The new tick counter value
|
||||
* @pre Tile must be of type MP_TREES
|
||||
*/
|
||||
static inline void SetTreeCounter(TileIndex t, uint c)
|
||||
{
|
||||
assert_tile(IsTileType(t, MP_TREES), t); // XXX incomplete
|
||||
SB(_m[t].m2, 0, 4, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a tree-tile.
|
||||
*
|
||||
|
Reference in New Issue
Block a user