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);
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.
RailType
Enumeration for all possible railtypes.
static void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, DiagDirection d, TransportType tt, uint rt)
Generic part to make a bridge ramp for both roads and rails.
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.
Tile * _m
Tiles of the map.
TileIndex GetSouthernBridgeEnd(TileIndex t)
Finds the southern end of a bridge starting at a middle tile.
TileIndex GetOtherBridgeEnd(TileIndex t)
Starting at one bridge end finds the other bridge end.
static void MakeRoadBridgeRamp(TileIndex t, Owner o, Owner owner_road, Owner owner_tram, BridgeType bridgetype, DiagDirection d, RoadTypes r)
Make a bridge ramp for roads.
static void ClearSingleBridgeMiddle(TileIndex t, Axis a)
Remove the bridge over the given axis.
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 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 give tiletype.
TileIndex GetNorthernBridgeEnd(TileIndex t)
Finds the northern end of a bridge starting at a middle tile.
static void SetRoadOwner(TileIndex t, RoadType rt, Owner o)
Set the owner of a specific road type.
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.
DiagDirection
Enumeration for diagonal directions.
static void MakeRailBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, DiagDirection d, RailType r)
Make a bridge ramp for rails.
static void SetBridgeMiddle(TileIndex t, Axis a)
Set that there is a bridge over the given axis.
RoadTypes
The different roadtypes we support, but then a bitmask of them.
static Axis GetBridgeAxis(TileIndex t)
Get the axis of the bridge that goes over the tile.
static BridgeType GetBridgeType(TileIndex t)
Determines the type of bridge on a tile.
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.
A town owns the tile, or a town is expanding.
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.
uint BridgeType
Bridge spec number.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
static void MakeAqueductBridgeRamp(TileIndex t, Owner o, DiagDirection d)
Make a bridge ramp for aqueducts.
Owner
Enum for all companies/owners.
static void SetRoadTypes(TileIndex t, RoadTypes rt)
Set the present road types of a tile.
Axis
Allow incrementing of DiagDirDiff variables.
static bool IsBridge(TileIndex t)
Checks if this is a bridge, instead of a tunnel.