summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-16 14:50:01 +0000
committertron <tron@openttd.org>2005-01-16 14:50:01 +0000
commit022b8cea37b1ae1a3a1745c5373d202a7f267a2d (patch)
tree187e8c5437b91c17d0f652b2f0d01e30fbd131b4 /main_gui.c
parent8e404a26f65b8851b3dcf067fddf62f188005ee9 (diff)
downloadopenttd-022b8cea37b1ae1a3a1745c5373d202a7f267a2d.tar.xz
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
Replace some direct references to _map_type_and_height with TileHeight()/IsTileType()
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main_gui.c b/main_gui.c
index 5922c4557..00452e109 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -1147,18 +1147,18 @@ static void CommonRaiseLowerBigLand(uint tile, int mode)
/* Raise land */
h = 15;
BEGIN_TILE_LOOP(tile2, size, size, tile)
- h = min(h, _map_type_and_height[tile2]&0xF);
+ h = min(h, TileHeight(tile2));
END_TILE_LOOP(tile2, size, size, tile)
} else {
/* Lower land */
h = 0;
BEGIN_TILE_LOOP(tile2, size, size, tile)
- h = max(h, _map_type_and_height[tile2]&0xF);
+ h = max(h, TileHeight(tile2));
END_TILE_LOOP(tile2, size, size, tile)
}
BEGIN_TILE_LOOP(tile2, size, size, tile)
- if ((uint)(_map_type_and_height[tile2]&0xF) == h) {
+ if (TileHeight(tile2) == h) {
DoCommandP(tile2, 8, (uint32)mode, NULL, CMD_TERRAFORM_LAND | CMD_AUTO);
}
END_TILE_LOOP(tile2, size, size, tile)