summaryrefslogtreecommitdiff
path: root/src/tree_map.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-11-23 16:45:53 +0000
committersmatz <smatz@openttd.org>2008-11-23 16:45:53 +0000
commitd0e4cc5ee057b8262adf99c3383114295776c3ca (patch)
treee479f1e64af9b12409e169e94724aff6d723fe04 /src/tree_map.h
parente35be92a3a1bb75a8bd4f063b4d3cb3a435a6794 (diff)
downloadopenttd-d0e4cc5ee057b8262adf99c3383114295776c3ca.tar.xz
(svn r14614) -Codechange [FS#2423]: GetTreeCount() should behave as its name and documentation imply. Remove unused SetTreeCount() (PhilSophus)
Diffstat (limited to 'src/tree_map.h')
-rw-r--r--src/tree_map.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/tree_map.h b/src/tree_map.h
index fd3d60194..f63c53f2f 100644
--- a/src/tree_map.h
+++ b/src/tree_map.h
@@ -144,7 +144,7 @@ static inline void SetTreeGroundDensity(TileIndex t, TreeGround g, uint d)
static inline uint GetTreeCount(TileIndex t)
{
assert(IsTileType(t, MP_TREES));
- return GB(_m[t].m5, 6, 2);
+ return GB(_m[t].m5, 6, 2) + 1;
}
/**
@@ -165,21 +165,6 @@ static inline void AddTreeCount(TileIndex t, int c)
}
/**
- * Sets the tree amount of a tile.
- *
- * This function directly sets the amount of trees of a tile.
- *
- * @param t The tile to set the amount of trees
- * @param c The number of trees
- * @pre Tile must be of type MP_TREES
- */
-static inline void SetTreeCount(TileIndex t, uint c)
-{
- assert(IsTileType(t, MP_TREES)); // XXX incomplete
- SB(_m[t].m5, 6, 2, c);
-}
-
-/**
* Returns the tree growth status.
*
* This function returns the tree growth status of a tile with trees.