diff options
author | tron <tron@openttd.org> | 2006-04-23 19:35:36 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-04-23 19:35:36 +0000 |
commit | c1dc517dab10acb049f35e80f94508bbcecf3193 (patch) | |
tree | 020949ed699a5b1e636d9d4da8e68db3751bf261 /viewport.c | |
parent | 8ef2c13c65498dfc39cb80bd1c07589b747fe1e6 (diff) | |
download | openttd-c1dc517dab10acb049f35e80f94508bbcecf3193.tar.xz |
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
Diffstat (limited to 'viewport.c')
-rw-r--r-- | viewport.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |