diff options
author | celestar <celestar@openttd.org> | 2006-06-02 13:05:41 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-06-02 13:05:41 +0000 |
commit | 25a63ec7af6fadb2d33ef84f79597c14b10e7f39 (patch) | |
tree | d5df4e2831609eca45d7ea4558e09a600089ead2 /terraform_gui.c | |
parent | d680fcec772d422b88ea4802add2e6195c6327a2 (diff) | |
download | openttd-25a63ec7af6fadb2d33ef84f79597c14b10e7f39.tar.xz |
(svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
Any railway track combination (excluding depots and waypoints)
Any road combination (excluding depots)
Clear tiles (duh), including fields
Tunnel entrances
Bridge heads
Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing
There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
Diffstat (limited to 'terraform_gui.c')
-rw-r--r-- | terraform_gui.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/terraform_gui.c b/terraform_gui.c index 72b2a53a7..571f1298e 100644 --- a/terraform_gui.c +++ b/terraform_gui.c @@ -2,6 +2,7 @@ #include "stdafx.h" #include "openttd.h" +#include "bridge_map.h" #include "clear_map.h" #include "table/sprites.h" #include "table/strings.h" @@ -81,11 +82,20 @@ static void GenerateRockyArea(TileIndex end, TileIndex start) size_y = (ey - sy) + 1; BEGIN_TILE_LOOP(tile, size_x, size_y, TileXY(sx, sy)) { - if (IsTileType(tile, MP_CLEAR) || IsTileType(tile, MP_TREES)) { - MakeClear(tile, CLEAR_ROCKS, 3); - MarkTileDirtyByTile(tile); - success = true; + switch (GetTileType(tile)) { + case MP_CLEAR: + MakeClear(tile, CLEAR_ROCKS, 3); + break; + + case MP_TREES: + MakeClear(tile, CLEAR_ROCKS, 3); + ClearBridgeMiddle(tile); + break; + + default: continue; } + MarkTileDirtyByTile(tile); + success = true; } END_TILE_LOOP(tile, size_x, size_y, 0); if (success) SndPlayTileFx(SND_1F_SPLAT, end); |