debug_inline constexpr bool HasBit(const T x, const uint8_t y)
Checks if a bit in a value is set.
constexpr T SB(T &x, const uint8_t s, const uint8_t n, const U d)
Set n bits in x starting at bit s to d.
Wrapper class to abstract away the way the tiles are stored.
debug_inline uint16_t & m8()
General purpose.
debug_inline uint16_t & m2()
Primarily used for indices to towns, industries and stations.
debug_inline uint8_t & m7()
Primarily used for newgrf support.
debug_inline uint8_t & m4()
General purpose.
debug_inline uint8_t & m6()
General purpose.
debug_inline uint8_t & m3()
General purpose.
debug_inline uint8_t & m5()
General purpose.
Owner
Enum for all companies/owners.
@ OWNER_TOWN
A town owns the tile, or a town is expanding.
DiagDirection
Enumeration for diagonal directions.
Hides the direct accesses to the map array with map accessors.
void SetRailType(Tile t, RailType r)
Sets the rail type of the given tile.
RailType
Enumeration for all possible railtypes.
void SetRoadOwner(Tile t, RoadTramType rtt, Owner o)
Set the owner of a specific road type.
void SetRoadTypes(Tile t, RoadType road_rt, RoadType tram_rt)
Set the present road types of a tile.
RoadType
The different roadtypes we support.
@ INVALID_ROADTYPE
flag for invalid roadtype
void SetTileType(Tile tile, TileType type)
Set the type of a tile.
void SetTileOwner(Tile tile, Owner owner)
Sets the owner of a tile.
static debug_inline bool IsTileType(Tile tile, TileType type)
Checks if a tile is a given tiletype.
@ MP_TUNNELBRIDGE
Tunnel entry/exit and bridge heads.
@ TRANSPORT_RAIL
Transport by train.
@ TRANSPORT_ROAD
Transport by road vehicle.
void MakeRailTunnel(Tile t, Owner o, DiagDirection d, RailType r)
Makes a rail tunnel entrance.
bool IsTunnelInWay(TileIndex, int z)
Is there a tunnel in the way in any direction?
bool IsTunnelTile(Tile t)
Is this a tunnel (entrance)?
bool IsTunnel(Tile t)
Is this a tunnel (entrance)?
void MakeRoadTunnel(Tile t, Owner o, DiagDirection d, RoadType road_rt, RoadType tram_rt)
Makes a road tunnel entrance.
TileIndex GetOtherTunnelEnd(TileIndex)
Gets the other end of the tunnel.
bool IsTunnelInWayDir(TileIndex tile, int z, DiagDirection dir)
Is there a tunnel in the way in the given direction?