Go to the documentation of this file.
116 return GB(
_m[t].m2, 4, 2);
133 SB(
_m[t].m2, 4, 2, d);
134 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);
279 _m[t].
m2 = ground << 6 | density << 4 | 0;
281 _m[t].
m4 = 0 << 5 | 0 << 2;
282 _m[t].
m5 = count << 6 | growth;
283 SB(
_me[t].m6, 2, 4, 0);
static TreeType GetTreeType(TileIndex t)
Returns the treetype of a tile.
uint32 TileIndex
The index/ID of a Tile.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
static uint GetTreeGrowth(TileIndex t)
Returns the tree growth status.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
static void SetTreeGrowth(TileIndex t, uint g)
Sets the tree growth status of a tile.
@ TREE_RAINFOREST
tree on the 'green part' on a sub-tropical map
static uint GetTreeDensity(TileIndex t)
Returns the 'density' of a tile with trees.
TileExtended * _me
Extended Tiles of the map.
uint16 m2
Primarily used for indices to towns, industries and stations.
static const uint TREE_COUNT_TEMPERATE
number of tree types on a temperate 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.
static uint GetTreeCount(TileIndex t)
Returns the number of trees on a tile.
@ WATER_CLASS_INVALID
Used for industry tiles on land (also for oilrig if newgrf says so).
@ TREE_GROUND_ROUGH
some rough tile
@ TREE_SUB_ARCTIC
tree on a sub_arctic landscape
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.
@ TREE_CACTUS
a cactus for the 'desert part' on a sub-tropical map
@ TREE_INVALID
An invalid tree.
@ TREE_TOYLAND
tree on a toyland map
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
@ TREE_GROUND_GRASS
normal grass
@ MP_TREES
Tile got trees.
@ TREE_SUB_TROPICAL
tree on a sub-tropical map, non-rainforest, non-desert
static const uint TREE_COUNT_RAINFOREST
number of tree types for the 'rainforest part' of a sub-tropic map.
TreeGround
Enumeration for ground types of tiles with trees.
static const uint TREE_COUNT_TOYLAND
number of tree types on a toyland map.
static void AddTreeGrowth(TileIndex t, int a)
Add a value to the tree growth status.
static const uint TREE_COUNT_SUB_TROPICAL
number of tree types for the 'sub-tropic part' of a sub-tropic map.
static void AddTreeCount(TileIndex t, int c)
Add a amount to the tree-count value of a tile with trees.
@ OWNER_NONE
The tile has no ownership.
static void MakeTree(TileIndex t, TreeType type, uint count, uint growth, TreeGround ground, uint density)
Make a tree-tile.
static TreeGround GetTreeGround(TileIndex t)
Returns the groundtype for tree tiles.
byte m7
Primarily used for newgrf support.
@ TREE_TEMPERATE
temperate tree
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.
@ TREE_GROUND_SNOW_DESERT
a desert or snow tile, depend on landscape
static const uint TREE_COUNT_SUB_ARCTIC
number of tree types on a sub arctic map.
static void SetWaterClass(TileIndex t, WaterClass wc)
Set the water class at a tile.
Tile * _m
Tiles of the map.
TreeType
List of tree types along all landscape types.
static void SetTreeGroundDensity(TileIndex t, TreeGround g, uint d)
Set the density and ground type of a tile with trees.
@ TREE_GROUND_ROUGH_SNOW
A snow tile that is rough underneath.