summaryrefslogtreecommitdiff
path: root/clear_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-04-03 09:07:21 +0000
committercelestar <celestar@openttd.org>2006-04-03 09:07:21 +0000
commitcc87f682b9cd9c25ee58cec1b63792e4ef786aa9 (patch)
treee106242c0ac31fc61254791e0f6fcfe95db2baad /clear_cmd.c
parent3aa1e38be6e0a3c01346fe4db1bb92b148d0f2a9 (diff)
downloadopenttd-cc87f682b9cd9c25ee58cec1b63792e4ef786aa9.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 'clear_cmd.c')
-rw-r--r--clear_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clear_cmd.c b/clear_cmd.c
index d859a9823..39d253a28 100644
--- a/clear_cmd.c
+++ b/clear_cmd.c
@@ -577,14 +577,14 @@ static void TileLoopClearAlps(TileIndex tile)
/* distance from snow line, in steps of 8 */
int k = GetTileZ(tile) - _opt.snow_line;
- if (k < -8) { // well below the snow line
+ if (k < -TILE_HEIGHT) { // well below the snow line
if (!IsClearGround(tile, CL_SNOW)) return;
if (GetClearDensity(tile) == 0) SetClearGroundDensity(tile, CL_GRASS, 3);
} else {
if (!IsClearGround(tile, CL_SNOW)) {
SetClearGroundDensity(tile, CL_SNOW, 0);
} else {
- uint density = min((uint)(k + 8) / 8, 3);
+ uint density = min((uint)(k + TILE_HEIGHT) / TILE_HEIGHT, 3);
if (GetClearDensity(tile) < density) {
AddClearDensity(tile, 1);
@@ -738,7 +738,7 @@ static void ChangeTileOwner_Clear(TileIndex tile, PlayerID old_player, PlayerID
void InitializeClearLand(void)
{
- _opt.snow_line = _patches.snow_line_height * 8;
+ _opt.snow_line = _patches.snow_line_height * TILE_HEIGHT;
}
const TileTypeProcs _tile_type_clear_procs = {