diff options
author | celestar <celestar@openttd.org> | 2006-04-03 09:07:21 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-03 09:07:21 +0000 |
commit | 69e1c716e86a855b4379504bbb94a5483a63f43e (patch) | |
tree | e106242c0ac31fc61254791e0f6fcfe95db2baad /tree_cmd.c | |
parent | 6443c14ebd7ed0f9920673c218eaaa1172076a5f (diff) | |
download | openttd-69e1c716e86a855b4379504bbb94a5483a63f43e.tar.xz |
(svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty
Diffstat (limited to 'tree_cmd.c')
-rw-r--r-- | tree_cmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tree_cmd.c b/tree_cmd.c index eb87d7766..aeaf4d988 100644 --- a/tree_cmd.c +++ b/tree_cmd.c @@ -143,7 +143,8 @@ int32 CmdPlantTree(int ex, int ey, uint32 flags, uint32 p1, uint32 p2) // make sure sx,sy are smaller than ex,ey sx = TileX(p2); sy = TileY(p2); - ex /= 16; ey /= 16; + ex /= TILE_SIZE; + ey /= TILE_SIZE; if (ex < sx) intswap(ex, sx); if (ey < sy) intswap(ey, sy); @@ -405,11 +406,11 @@ static void TileLoopTreesAlps(TileIndex tile) { int k = GetTileZ(tile) - _opt.snow_line; - if (k < -8) { + if (k < -TILE_HEIGHT) { if (GetTreeGround(tile) != TR_SNOW_DESERT) return; SetTreeGroundDensity(tile, TR_GRASS, 0); } else { - uint density = min((uint)(k + 8) / 8, 3); + uint density = min((uint)(k + TILE_HEIGHT) / TILE_HEIGHT, 3); if (GetTreeGround(tile) != TR_SNOW_DESERT || GetTreeDensity(tile) != density) { SetTreeGroundDensity(tile, TR_SNOW_DESERT, density); |