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} --- viewport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'viewport.c') diff --git a/viewport.c b/viewport.c index cc3863cde..239a77d14 100644 --- a/viewport.c +++ b/viewport.c @@ -611,8 +611,8 @@ static void DrawTileSelection(const TileInfo *ti) // Figure out the Z coordinate for the single dot. byte z = ti->z; if (ti->tileh & SLOPE_N) { - z += 8; - if (ti->tileh == SLOPE_STEEP_N) z += 8; + z += TILE_HEIGHT; + if (ti->tileh == SLOPE_STEEP_N) z += TILE_HEIGHT; } DrawGroundSpriteAt(_cur_dpi->zoom != 2 ? SPR_DOT : SPR_DOT_SMALL, ti->x, ti->y, z); } else if (_thd.drawstyle & HT_RAIL /*&& _thd.place_mode == VHM_RAIL*/) { @@ -1759,7 +1759,7 @@ bool ScrollMainWindowTo(int x, int y) bool ScrollMainWindowToTile(TileIndex tile) { - return ScrollMainWindowTo(TileX(tile) * TILE_SIZE + 8, TileY(tile) * TILE_SIZE + 8); + return ScrollMainWindowTo(TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2); } void SetRedErrorSquare(TileIndex tile) -- cgit v1.2.3-54-g00ecf