summaryrefslogtreecommitdiff
path: root/src/elrail.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 11:52:19 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 11:52:19 +0000
commit2a2c102b0b173d6ebcfb90291eb56e82c4e935a7 (patch)
treeeea14ef6e9fcafd4cb4fb4a1a4aec8cbf1f928b7 /src/elrail.cpp
parent459c9523e8acdf314ce697460f4768eec228daac (diff)
downloadopenttd-2a2c102b0b173d6ebcfb90291eb56e82c4e935a7.tar.xz
(svn r23108) -Codechange: more uint -> int / byte -> int conversions for Z related variables
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r--src/elrail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp
index 4232b190a..3734b919b 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -209,7 +209,7 @@ static void AdjustTileh(TileIndex tile, Slope *tileh)
* @param PCPpos The PCP of the tile.
* @return The Z position of the PCP.
*/
-static byte GetPCPElevation(TileIndex tile, DiagDirection PCPpos)
+static int GetPCPElevation(TileIndex tile, DiagDirection PCPpos)
{
/* The elevation of the "pylon"-sprite should be the elevation at the PCP.
* PCPs are always on a tile edge.
@@ -225,7 +225,7 @@ static byte GetPCPElevation(TileIndex tile, DiagDirection PCPpos)
* Also note that the result of GetSlopePixelZ() is very special on bridge-ramps.
*/
- byte z = GetSlopePixelZ(TileX(tile) * TILE_SIZE + min(x_pcp_offsets[PCPpos], TILE_SIZE - 1), TileY(tile) * TILE_SIZE + min(y_pcp_offsets[PCPpos], TILE_SIZE - 1));
+ int z = GetSlopePixelZ(TileX(tile) * TILE_SIZE + min(x_pcp_offsets[PCPpos], TILE_SIZE - 1), TileY(tile) * TILE_SIZE + min(y_pcp_offsets[PCPpos], TILE_SIZE - 1));
return (z + 2) & ~3; // this means z = (z + TILE_HEIGHT / 4) / (TILE_HEIGHT / 2) * (TILE_HEIGHT / 2);
}