OpenTTD Source
12.0-beta2
|
static bool IsTunnelTile(TileIndex t)
Is this a tunnel (entrance)?
uint32 TileIndex
The index/ID of a Tile.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
@ TRANSPORT_RAIL
Transport by train.
@ INVALID_ROADTYPE
flag for invalid roadtype
static void MakeRailTunnel(TileIndex t, Owner o, DiagDirection d, RailType r)
Makes a rail tunnel entrance.
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.
uint16 m2
Primarily used for indices to towns, industries and stations.
static void SetRoadOwner(TileIndex t, RoadTramType rtt, Owner o)
Set the owner of a specific road type.
static void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d, RoadType road_rt, RoadType tram_rt)
Makes a road tunnel entrance.
bool IsTunnelInWay(TileIndex, int z)
Is there a tunnel in the way in any direction?
static void SetRoadTypes(TileIndex t, RoadType road_rt, RoadType tram_rt)
Set the present road types of a tile.
Owner
Enum for all companies/owners.
bool IsTunnelInWayDir(TileIndex tile, int z, DiagDirection dir)
Is there a tunnel in the way in the given direction?
@ TRANSPORT_ROAD
Transport by road vehicle.
RailType
Enumeration for all possible railtypes.
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.
@ MP_TUNNELBRIDGE
Tunnel entry/exit and bridge heads.
DiagDirection
Enumeration for diagonal directions.
RoadType
The different roadtypes we support.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
static bool IsTunnel(TileIndex t)
Is this a tunnel (entrance)?
byte m7
Primarily used for newgrf support.
static void SetTileOwner(TileIndex tile, Owner owner)
Sets the owner of a tile.
uint16 m8
General purpose.
static void SetRailType(TileIndex t, RailType r)
Sets the rail type of the given tile.
Tile * _m
Tiles of the map.
@ OWNER_TOWN
A town owns the tile, or a town is expanding.
TileIndex GetOtherTunnelEnd(TileIndex)
Gets the other end of the tunnel.