summaryrefslogtreecommitdiff
path: root/water_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 /water_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 'water_cmd.c')
-rw-r--r--water_cmd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/water_cmd.c b/water_cmd.c
index ca23cc84f..834cfd196 100644
--- a/water_cmd.c
+++ b/water_cmd.c
@@ -479,9 +479,12 @@ void DrawShipDepotSprite(int x, int y, int image)
}
-static uint GetSlopeZ_Water(const TileInfo *ti)
+static uint GetSlopeZ_Water(TileIndex tile, uint x, uint y)
{
- return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
+ uint z;
+ uint tileh = GetTileSlope(tile, &z);
+
+ return z + GetPartialZ(x & 0xF, y & 0xF, tileh);
}
static Slope GetSlopeTileh_Water(TileIndex tile, Slope tileh)