changeset 18331:91df70e03ed5 draft

(svn r23167) -Codechange [FS#4818]: make IsTunnelInWay z parameters signed as well (hackalittlebit)
author rubidium <rubidium@openttd.org>
date Tue, 08 Nov 2011 19:44:41 +0000
parents 8663ea9a0fe0
children d1598ff3329e
files src/tunnel_map.cpp src/tunnel_map.h
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/tunnel_map.cpp
+++ b/src/tunnel_map.cpp
@@ -45,10 +45,10 @@
  * @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 @@
  * @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);
--- a/src/tunnel_map.h
+++ b/src/tunnel_map.h
@@ -38,8 +38,8 @@
 }
 
 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