* Set the density and ground type of a tile with trees. * * This functions saves the ground type and the density which belongs to it * for a given tile. * * @param t The tile to set the density and ground type * @param g The ground type to save * @param d The density to save with * @pre Tile must be of type MP_TREES */
| 142 | * @pre Tile must be of type MP_TREES |
| 143 | */ |
| 144 | inline void SetTreeGroundDensity(Tile t, TreeGround g, uint d) |
| 145 | { |
| 146 | assert(IsTileType(t, MP_TREES)); // XXX incomplete |
| 147 | SB(t.m2(), 4, 2, d); |
| 148 | SB(t.m2(), 6, 3, g); |
| 149 | SetWaterClass(t, g == TREE_GROUND_SHORE ? WaterClass::Sea : WaterClass::Invalid); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Returns the number of trees on a tile. |
no test coverage detected