summaryrefslogtreecommitdiff
path: root/viewport.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-23 19:35:36 +0000
committertron <tron@openttd.org>2006-04-23 19:35:36 +0000
commit6dbc9c9ced44d98abb8759593db92910f16292e4 (patch)
tree020949ed699a5b1e636d9d4da8e68db3751bf261 /viewport.c
parentaac74778c5020c2f101d9012ab988418a870d7c0 (diff)
downloadopenttd-6dbc9c9ced44d98abb8759593db92910f16292e4.tar.xz
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
Diffstat (limited to 'viewport.c')
-rw-r--r--viewport.c6
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)