117 return GB(
_m[t].m2, 4, 2);
134 SB(
_m[t].m2, 4, 2, d);
135 SB(
_m[t].m2, 6, 3, g);
152 return GB(
_m[t].m5, 6, 2) + 1;
184 return GB(
_m[t].m5, 0, 3);
215 SB(
_m[t].m5, 0, 3, g);
229 return GB(
_m[t].m2, 0, 4);
259 SB(
_m[t].m2, 0, 4, c);
278 _m[t].
m2 = ground << 6 | density << 4 | 0;
280 _m[t].
m4 = 0 << 5 | 0 << 2;
281 _m[t].
m5 = count << 6 | growth;
282 SB(
_me[t].m6, 2, 4, 0);
static const uint TREE_COUNT_TEMPERATE
number of tree types on a temperate map.
static const uint TREE_COUNT_SUB_TROPICAL
number of tree types for the 'sub-tropic part' of a sub-tropic map.
static void AddTreeCounter(TileIndex t, int a)
Add a value on the tick counter of a tree-tile.
static void SetTileOwner(TileIndex tile, Owner owner)
Sets the owner of a tile.
static const uint TREE_COUNT_TOYLAND
number of tree types on a toyland map.
static void SetTreeCounter(TileIndex t, uint c)
Set the tick counter for a tree-tile.
static uint GetTreeCounter(TileIndex t)
Get the tick counter of a tree tile.
byte m7
Primarily used for newgrf support.
uint16 m2
Primarily used for indices to towns, industries and stations.
Tile * _m
Tiles of the map.
A snow tile that is rough underneath.
static void SetTreeGroundDensity(TileIndex t, TreeGround g, uint d)
Set the density and ground type of a tile with trees.
static void MakeTree(TileIndex t, TreeType type, uint count, uint growth, TreeGround ground, uint density)
Make a tree-tile.
static const uint TREE_COUNT_RAINFOREST
number of tree types for the 'rainforest part' of a sub-tropic map.
static TreeType GetTreeType(TileIndex t)
Returns the treetype of a tile.
static T SB(T &x, const uint8 s, const uint8 n, const U d)
Set n bits in x starting at bit s to d.
static uint GetTreeGrowth(TileIndex t)
Returns the tree growth status.
static void SetTreeGrowth(TileIndex t, uint g)
Sets the tree growth status of a tile.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a give tiletype.
TileExtended * _me
Extended Tiles of the map.
static uint GetTreeDensity(TileIndex t)
Returns the 'density' of a tile with trees.
tree on a sub_arctic landscape
The tile has no ownership.
a desert or snow tile, depend on landscape
a cactus for the 'desert part' on a sub-tropical map
static void AddTreeCount(TileIndex t, int c)
Add a amount to the tree-count value of a tile with trees.
uint32 TileIndex
The index/ID of a Tile.
static TreeGround GetTreeGround(TileIndex t)
Returns the groundtype for tree tiles.
static uint GetTreeCount(TileIndex t)
Returns the number of trees on a tile.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
TreeType
List of tree types along all landscape types.
static void AddTreeGrowth(TileIndex t, int a)
Add a value to the tree growth status.
tree on a sub-tropical map, non-rainforest, non-desert
TreeGround
Enumeration for ground types of tiles with trees.
Map writing/reading functions for tiles.
static const uint TREE_COUNT_SUB_ARCTIC
number of tree types on a sub arctic map.
tree on the 'green part' on a sub-tropical map