@@ -42,16 +42,16 @@ TileIndex GetOtherTunnelEnd(TileIndex ti
* Is there a tunnel in the way in the given direction?
* @param tile the tile to search from.
* @param z the 'z' to search on.
* @param dir the direction to start searching to.
* @return true if and only if there is a tunnel.
*/
bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir)
bool IsTunnelInWayDir(TileIndex tile, int z, DiagDirection dir)
{
TileIndexDiff delta = TileOffsByDiagDir(dir);
uint height;
int height;
do {
tile -= delta;
if (!IsValidTile(tile)) return false;
height = GetTileZ(tile);
} while (z < height);
@@ -62,11 +62,11 @@ bool IsTunnelInWayDir(TileIndex tile, ui
/**
* Is there a tunnel in the way in any direction?
bool IsTunnelInWay(TileIndex tile, uint z)
bool IsTunnelInWay(TileIndex tile, int z)
return IsTunnelInWayDir(tile, z, (TileX(tile) > (MapMaxX() / 2)) ? DIAGDIR_NE : DIAGDIR_SW) ||
IsTunnelInWayDir(tile, z, (TileY(tile) > (MapMaxY() / 2)) ? DIAGDIR_NW : DIAGDIR_SE);
}
@@ -35,14 +35,14 @@ static inline bool IsTunnel(TileIndex t)
static inline bool IsTunnelTile(TileIndex t)
return IsTileType(t, MP_TUNNELBRIDGE) && IsTunnel(t);
TileIndex GetOtherTunnelEnd(TileIndex);
bool IsTunnelInWay(TileIndex, uint z);
bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir);
bool IsTunnelInWay(TileIndex, int z);
bool IsTunnelInWayDir(TileIndex tile, int z, DiagDirection dir);
* Makes a road tunnel entrance
* @param t the entrance of the tunnel
* @param o the owner of the entrance
* @param d the direction facing out of the tunnel
Status change: