OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
85 default: NOT_REACHED();
121 SB(
_m[t].m1, 5, 2, wc);
288 return t < tile2 ? t : tile2;
358 SB(
_m[t].m1, 7, 1, b ? 1 : 0);
385 SB(
_me[t].m6, 2, 4, 0);
404 _m[t].
m4 = random_bits;
406 SB(
_me[t].m6, 2, 4, 0);
460 SB(
_me[t].m6, 2, 4, 0);
483 SB(
_me[t].m6, 2, 4, 0);
@ WBL_TYPE_COUNT
Length of the 'type' bitfield.
@ LOCK_PART_UPPER
Upper part of a lock.
uint32 TileIndex
The index/ID of a Tile.
static bool IsSea(TileIndex t)
Is it a sea water tile?
static TileIndexDiff TileOffsByDiagDir(DiagDirection dir)
Convert a DiagDirection to a TileIndexDiff.
static bool IsCanal(TileIndex t)
Is it a canal tile?
static TileIndex GetOtherShipDepotTile(TileIndex t)
Get the other tile of the ship depot.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
static bool HasTileWaterClass(TileIndex t)
Checks whether the tile has an waterclass associated.
@ WBL_TYPE_LOCK
Lock ('type' bitfield).
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
static DiagDirection GetLockDirection(TileIndex t)
Get the direction of the water lock.
@ WBL_LOCK_ORIENT_COUNT
Length of lock orientation bitfield.
static void MakeSea(TileIndex t)
Make a sea tile.
uint16 DepotID
Type for the unique identifier of depots.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
TileExtended * _me
Extended Tiles of the map.
LockPart
Sections of the water lock.
@ WBL_TYPE_NORMAL
Clear water or coast ('type' bitfield).
uint16 m2
Primarily used for indices to towns, industries and stations.
WaterClass
classes of water (for WATER_TILE_CLEAR water tile type).
static bool IsCoastTile(TileIndex t)
Is it a coast tile.
@ WBL_LOCK_ORIENT_BEGIN
Start of lock orientation bitfield.
static bool IsCoast(TileIndex t)
Is it a coast tile?
@ MP_INDUSTRY
Part of an industry.
@ WATER_CLASS_RIVER
River.
@ WATER_TILE_DEPOT
Water Depot.
Owner
Enum for all companies/owners.
static DiagDirection GetShipDepotDirection(TileIndex t)
Get the direction of the ship depot.
static byte GetLockPart(TileIndex t)
Get the part of a lock.
@ DEPOT_PART_NORTH
Northern part of a depot.
static bool IsTileOnWater(TileIndex t)
Tests if the tile was built on water.
static TileIndex GetShipDepotNorthTile(TileIndex t)
Get the most northern tile of a ship depot.
@ WATER_CLASS_INVALID
Used for industry tiles on land (also for oilrig if newgrf says so).
Informative template class exposing basic enumeration properties used by several other templates belo...
static bool HasTileWaterGround(TileIndex t)
Checks whether the tile has water at the ground.
@ WATER_TILE_CLEAR
Plain water.
static void MakeLock(TileIndex t, Owner o, DiagDirection d, WaterClass wc_lower, WaterClass wc_upper, WaterClass wc_middle)
Make a water lock.
static DiagDirection XYNSToDiagDir(Axis xy, uint ns)
Convert an axis and a flag for north/south into a DiagDirection.
int32 TileIndexDiff
An offset value between to tiles.
@ MP_OBJECT
Contains objects such as transmitters and owned land.
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 bool IsShipDepot(TileIndex t)
Is it a water tile with a ship depot on it?
@ LOCK_PART_MIDDLE
Middle part of a lock.
@ WBL_TYPE_DEPOT
Depot ('type' bitfield).
static void SetDockingTile(TileIndex t, bool b)
Set the docking tile state of a tile.
@ LOCK_PART_LOWER
Lower part of a lock.
WaterTileTypeBitLayout
Bit field layout of m5 for water tiles.
@ MP_TUNNELBRIDGE
Tunnel entry/exit and bridge heads.
DiagDirection
Enumeration for diagonal directions.
static void MakeLockTile(TileIndex t, Owner o, LockPart part, DiagDirection dir, WaterClass original_water_class)
Make a lock section.
@ WATER_CLASS_CANAL
Canal.
static DepotPart GetShipDepotPart(TileIndex t)
Get the part of a ship depot.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
static Owner GetTileOwner(TileIndex tile)
Returns the owner of a tile.
@ MP_TREES
Tile got trees.
@ WBL_COAST_FLAG
Flag for coast.
@ DEPOT_PART_SOUTH
Southern part of a depot.
WaterTileType
Available water tile types.
static WaterClass GetWaterClass(TileIndex t)
Get the water class at a tile.
static WaterTileType GetWaterTileType(TileIndex t)
Get the water tile type at a tile.
static byte GetWaterTileRandomBits(TileIndex t)
Get the random bits of the water tile.
static void MakeShipDepot(TileIndex t, Owner o, DepotID did, DepotPart part, Axis a, WaterClass original_water_class)
Make a ship depot section.
static bool IsWaterTile(TileIndex t)
Is it a water tile with plain water?
static void MakeShore(TileIndex t)
Helper function to make a coast tile.
static TileIndexDiff TileDiffXY(int x, int y)
Calculates an offset for the given coordinate(-offset).
@ WBL_LOCK_PART_COUNT
Length of lock part bitfield.
@ MP_STATION
A tile of a station.
static bool IsLock(TileIndex t)
Is there a lock on a given water tile?
static Axis GetShipDepotAxis(TileIndex t)
Get the axis of the ship depot.
static bool IsRiver(TileIndex t)
Is it a river water tile?
Helper template class that makes basic properties of given enumeration type visible from outsize.
static bool IsDockingTile(TileIndex t)
Checks whether the tile is marked as a dockling tile.
static void MakeCanal(TileIndex t, Owner o, uint8 random_bits)
Make a canal tile.
byte m7
Primarily used for newgrf support.
Axis
Allow incrementing of DiagDirDiff variables.
static void SetTileOwner(TileIndex tile, Owner owner)
Sets the owner of a tile.
@ WBL_TYPE_BEGIN
Start of the 'type' bitfield.
@ WBL_DEPOT_AXIS
Depot axis flag.
static void MakeWater(TileIndex t, Owner o, WaterClass wc, uint8 random_bits)
Helper function for making a watery tile.
static void SetWaterClass(TileIndex t, WaterClass wc)
Set the water class at a tile.
@ WBL_LOCK_PART_BEGIN
Start of lock part bitfield.
static bool IsWater(TileIndex t)
Is it a plain water tile?
@ WATER_TILE_LOCK
Water lock.
static bool IsShipDepotTile(TileIndex t)
Is it a ship depot tile?
DepotPart
Sections of the water depot.
@ OWNER_WATER
The tile/execution is done by "water".
Tile * _m
Tiles of the map.
@ WBL_DEPOT_PART
Depot part flag.
static void MakeRiver(TileIndex t, uint8 random_bits)
Make a river tile.