Changeset - r18321:8dc1c147192c
[Not reviewed]
master
0 2 0
rubidium - 13 years ago 2011-11-08 19:44:41
rubidium@openttd.org
(svn r23167) -Codechange [FS#4818]: make IsTunnelInWay z parameters signed as well (hackalittlebit)
2 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/tunnel_map.cpp
Show inline comments
 
@@ -45,10 +45,10 @@ TileIndex GetOtherTunnelEnd(TileIndex ti
 
 * @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;
 
@@ -65,7 +65,7 @@ bool IsTunnelInWayDir(TileIndex tile, ui
 
 * @param z the 'z' to search on.
 
 * @return true if and only if there is a tunnel.
 
 */
 
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);
src/tunnel_map.h
Show inline comments
 
@@ -38,8 +38,8 @@ static inline bool IsTunnelTile(TileInde
 
}
 

	
 
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
0 comments (0 inline, 0 general)