88 return GB(
_m[t].m5, 0, 2);
112 SB(
_m[t].m5, 0, 2, d);
125 return GB(
_m[t].m5, 5, 3);
149 SB(
_m[t].m5, 5, 3, c);
163 _m[t].
m5 = 0 << 5 | type << 2 | density;
176 return GB(
_m[t].m3, 0, 4);
188 SB(
_m[t].m3, 0, 4, f);
200 return(IndustryID)
_m[t].
m2;
227 default: NOT_REACHED();
246 default: NOT_REACHED();
268 _m[t].
m4 = 0 << 5 | 0 << 2;
287 _m[t].
m3 = field_type;
288 _m[t].
m4 = 0 << 5 | 0 << 2;
290 SB(
_me[t].m6, 2, 4, 0);
Types related to the industry.
static void SetTileOwner(TileIndex tile, Owner owner)
Sets the owner of a tile.
static bool IsSnowTile(TileIndex t)
Test if a tile is covered with snow.
byte m7
Primarily used for newgrf support.
uint16 m2
Primarily used for indices to towns, industries and stations.
static T SetBit(T &x, const uint8 y)
Set a bit in a variable.
Tile * _m
Tiles of the map.
Northeast, upper right on your monitor.
static bool IsClearGround(TileIndex t, ClearGround ct)
Set the type of clear tile.
static IndustryID GetIndustryIndexOfField(TileIndex t)
Get the industry (farm) that made the field.
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.
byte m1
Primarily used for ownership information.
static uint GetFence(TileIndex t, DiagDirection side)
Is there a fence at the given border?
static uint GetFieldType(TileIndex t)
Get the field type (production stage) of the field.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a give tiletype.
static void MakeField(TileIndex t, uint field_type, IndustryID industry)
Make a (farm) field tile.
TileExtended * _me
Extended Tiles of the map.
static void SetClearGroundDensity(TileIndex t, ClearGround type, uint density)
Sets ground type and density in one go, also sets the counter to 0.
static void SetFieldType(TileIndex t, uint f)
Set the field type (production stage) of the field.
Map accessor functions for bridges.
The tile has no ownership.
static void SetClearDensity(TileIndex t, uint d)
Set the density of a non-field clear tile.
DiagDirection
Enumeration for diagonal directions.
static ClearGround GetClearGround(TileIndex t)
Get the type of clear tile.
static void AddClearDensity(TileIndex t, int d)
Increment the density of a non-field clear tile.
static uint GetClearDensity(TileIndex t)
Get the density of a non-field clear tile.
static T ClrBit(T &x, const uint8 y)
Clears a bit in a variable.
static uint GetClearCounter(TileIndex t)
Get the counter used to advance to the next clear density/field type.
uint32 TileIndex
The index/ID of a Tile.
static void MakeSnow(TileIndex t, uint density=0)
Make a snow tile.
static void MakeClear(TileIndex t, ClearGround g, uint density)
Make a clear tile.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
static ClearGround GetRawClearGround(TileIndex t)
Get the type of clear tile but never return CLEAR_SNOW.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
static void AddClearCounter(TileIndex t, int c)
Increments the counter used to advance to the next clear density/field type.
static void SetIndustryIndexOfField(TileIndex t, IndustryID i)
Set the industry (farm) that made the field.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
static void SetClearCounter(TileIndex t, uint c)
Sets the counter used to advance to the next clear density/field type.
static void SetFence(TileIndex t, DiagDirection side, uint h)
Sets the type of fence (and whether there is one) for the given border.
A tile without any structures, i.e. grass, rocks, farm fields etc.
static void ClearSnow(TileIndex t)
Clear the snow from a tile and return it to its previous type.