* Make a tree-tile. * * This functions change the tile to a tile with trees and all information which belongs to it. * * @param t The tile to make a tree-tile from * @param type The type of the tree * @param count the number of trees * @param growth the growth stage * @param ground the ground type * @param density the density (not the number of trees) */
| 242 | * @param density the density (not the number of trees) |
| 243 | */ |
| 244 | inline void MakeTree(Tile t, TreeType type, uint count, TreeGrowthStage growth, TreeGround ground, uint density) |
| 245 | { |
| 246 | SetTileType(t, MP_TREES); |
| 247 | SetTileOwner(t, OWNER_NONE); |
| 248 | SetWaterClass(t, ground == TREE_GROUND_SHORE ? WaterClass::Sea : WaterClass::Invalid); |
| 249 | t.m2() = ground << 6 | density << 4 | 0; |
| 250 | t.m3() = type; |
| 251 | t.m4() = 0 << 5 | 0 << 2; |
| 252 | t.m5() = count << 6 | to_underlying(growth); |
| 253 | SB(t.m6(), 2, 6, 0); |
| 254 | t.m7() = 0; |
| 255 | t.m8() = 0; |
| 256 | } |
| 257 | |
| 258 | #endif /* TREE_MAP_H */ |
no test coverage detected