* Returns the number of trees on a tile. * * This function returns the number of trees of a tile (1-4). * The tile must be contains at least one tree or be more specific: it must be * of type MP_TREES. * * @param t The index to get the number of trees * @return The number of trees (1-4) * @pre Tile must be of type MP_TREES */
| 161 | * @pre Tile must be of type MP_TREES |
| 162 | */ |
| 163 | inline uint GetTreeCount(Tile t) |
| 164 | { |
| 165 | assert(IsTileType(t, MP_TREES)); |
| 166 | return GB(t.m5(), 6, 2) + 1; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * Add a amount to the tree-count value of a tile with trees. |
no test coverage detected