From 6dbc9c9ced44d98abb8759593db92910f16292e4 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 23 Apr 2006 19:35:36 +0000 Subject: (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} --- elrail.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'elrail.c') diff --git a/elrail.c b/elrail.c index 6a1a70580..ada534046 100644 --- a/elrail.c +++ b/elrail.c @@ -290,7 +290,7 @@ static void DrawCatenaryRailway(const TileInfo *ti) sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]]; AddSortableSpriteToDraw( sss->image, ti->x + sss->x_offset, ti->y + sss->y_offset, - sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x + min(sss->x_offset, 15), ti->y + min(sss->y_offset, 15)) + sss->z_offset); + sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x + min(sss->x_offset, TILE_SIZE - 1), ti->y + min(sss->y_offset, TILE_SIZE - 1)) + sss->z_offset); } } } @@ -325,18 +325,18 @@ static void DrawCatenaryOnBridge(const TileInfo *ti) /* every other tile needs a pylon on the northern end */ if (num % 2) { if (axis == AXIS_X) { - AddSortableSpriteToDraw( pylons_bridge[0 + HASBIT(tlg, 0)], ti->x, ti->y + 4 + 8 * HASBIT(tlg, 0), 1, 1, 10, GetBridgeHeight(ti->tile) + 8); + AddSortableSpriteToDraw( pylons_bridge[0 + HASBIT(tlg, 0)], ti->x, ti->y + 4 + 8 * HASBIT(tlg, 0), 1, 1, 10, GetBridgeHeight(ti->tile) + TILE_HEIGHT); } else { - AddSortableSpriteToDraw( pylons_bridge[2 + HASBIT(tlg, 1)], ti->x + 4 + 8 * HASBIT(tlg, 1), ti->y, 1, 1, 10, GetBridgeHeight(ti->tile) + 8); + AddSortableSpriteToDraw( pylons_bridge[2 + HASBIT(tlg, 1)], ti->x + 4 + 8 * HASBIT(tlg, 1), ti->y, 1, 1, 10, GetBridgeHeight(ti->tile) + TILE_HEIGHT); } } /* need a pylon on the southern end of the bridge */ if (DistanceMax(ti->tile, start) == length) { if (axis == AXIS_X) { - AddSortableSpriteToDraw( pylons_bridge[0 + HASBIT(tlg, 0)], ti->x + 16, ti->y + 4 + 8 * HASBIT(tlg, 0), 1, 1, 10, GetBridgeHeight(ti->tile) + 8); + AddSortableSpriteToDraw( pylons_bridge[0 + HASBIT(tlg, 0)], ti->x + 16, ti->y + 4 + 8 * HASBIT(tlg, 0), 1, 1, 10, GetBridgeHeight(ti->tile) + TILE_HEIGHT); } else { - AddSortableSpriteToDraw( pylons_bridge[2 + HASBIT(tlg, 1)], ti->x + 4 + 8 * HASBIT(tlg, 1), ti->y + 16, 1, 1, 10, GetBridgeHeight(ti->tile) + 8); + AddSortableSpriteToDraw( pylons_bridge[2 + HASBIT(tlg, 1)], ti->x + 4 + 8 * HASBIT(tlg, 1), ti->y + 16, 1, 1, 10, GetBridgeHeight(ti->tile) + TILE_HEIGHT); } } } -- cgit v1.2.3-70-g09d2