47 return GB(
_m[t].type, 2, 2) != 0;
59 return GB(
_me[t].m6, 2, 4);
71 return (
Axis)(
GB(
_m[t].type, 2, 2) - 1);
136 _m[t].
m5 = 1 << 7 | tt << 2 | d;
137 SB(
_me[t].m6, 2, 4, bridgetype);
Owner
Enum for all companies/owners.
static void ClearBridgeMiddle(TileIndex t)
Removes bridges from the given, that is bridges along the X and Y axis.
static void SetTileOwner(TileIndex tile, Owner owner)
Sets the owner of a tile.
static bool IsBridgeTile(TileIndex t)
checks if there is a bridge on this tile
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.
A town owns the tile, or a town is expanding.
Tile * _m
Tiles of the map.
TileIndex GetSouthernBridgeEnd(TileIndex t)
Finds the southern end of a bridge starting at a middle tile.
static void MakeRailBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, DiagDirection d, RailType rt)
Make a bridge ramp for rails.
flag for invalid roadtype
TileIndex GetOtherBridgeEnd(TileIndex t)
Starting at one bridge end finds the other bridge end.
static void ClearSingleBridgeMiddle(TileIndex t, Axis a)
Remove the bridge over the given axis.
RoadType
The different roadtypes we support.
static void SetRoadTypes(TileIndex t, RoadType road_rt, RoadType tram_rt)
Set the present road types 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 void MakeRoadBridgeRamp(TileIndex t, Owner o, Owner owner_road, Owner owner_tram, BridgeType bridgetype, DiagDirection d, RoadType road_rt, RoadType tram_rt)
Make a bridge ramp for roads.
static bool IsBridgeAbove(TileIndex t)
checks if a bridge is set above the ground of this tile
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
TileIndex GetNorthernBridgeEnd(TileIndex t)
Finds the northern end of a bridge starting at a middle tile.
Map accessors for water tiles.
TileExtended * _me
Extended Tiles of the map.
static const uint TILE_HEIGHT
Height of a height level in world coordinate AND in pixels in #ZOOM_LVL_BASE.
int GetBridgeHeight(TileIndex tile)
Get the height ('z') of a bridge.
static void SetBridgeMiddle(TileIndex t, Axis a)
Set that there is a bridge over the given axis.
static void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, DiagDirection d, TransportType tt)
Generic part to make a bridge ramp for both roads and rails.
static Axis GetBridgeAxis(TileIndex t)
Get the axis of the bridge that goes over the tile.
static void SetRoadOwner(TileIndex t, RoadTramType rtt, Owner o)
Set the owner of a specific road type.
static BridgeType GetBridgeType(TileIndex t)
Determines the type of bridge on a tile.
RailType
Enumeration for all possible railtypes.
static T ClrBit(T &x, const uint8 y)
Clears a bit in a variable.
Tunnel entry/exit and bridge heads.
uint32 TileIndex
The index/ID of a Tile.
static int GetBridgePixelHeight(TileIndex tile)
Get the height ('z') of a bridge in pixels.
TransportType
Available types of transport.
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.
Transport by road vehicle.
uint16 m8
General purpose.
uint BridgeType
Bridge spec number.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
DiagDirection
Enumeration for diagonal directions.
static void MakeAqueductBridgeRamp(TileIndex t, Owner o, DiagDirection d)
Make a bridge ramp for aqueducts.
static void SetDockingTile(TileIndex t, bool b)
Set the docking tile state of a tile.
Hides the direct accesses to the map array with map accessors.
Axis
Allow incrementing of DiagDirDiff variables.
static bool IsBridge(TileIndex t)
Checks if this is a bridge, instead of a tunnel.
static void SetRailType(TileIndex t, RailType r)
Sets the rail type of the given tile.