summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-08-06 16:32:49 +0000
committertron <tron@openttd.org>2006-08-06 16:32:49 +0000
commit3254155930feb807f81031ebfdc9acedbe33745e (patch)
treef588dd076c3c98d0c2983a7f5c9e5f5dcbc4447b /tunnelbridge_cmd.c
parent7c9165827eb64c74efbad0198e97fe1a77fdb258 (diff)
downloadopenttd-3254155930feb807f81031ebfdc9acedbe33745e.tar.xz
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 8380b0467..bddc02d2d 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -1089,13 +1089,13 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
}
}
-static uint GetSlopeZ_TunnelBridge(const TileInfo* ti)
+static uint GetSlopeZ_TunnelBridge(TileIndex tile, uint x, uint y)
{
- TileIndex tile = ti->tile;
- uint z = ti->z;
- uint x = ti->x & 0xF;
- uint y = ti->y & 0xF;
- Slope tileh = ti->tileh;
+ uint z;
+ Slope tileh = GetTileSlope(tile, &z);
+
+ x &= 0xF;
+ y &= 0xF;
if (IsTunnel(tile)) {
uint pos = (DiagDirToAxis(GetTunnelDirection(tile)) == AXIS_X ? y : x);