summaryrefslogtreecommitdiff
path: root/src/genworld.cpp
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-01-21 02:31:55 +0000
committerYexo <yexo@openttd.org>2009-01-21 02:31:55 +0000
commitdb3ee34b4468aa3448b64e339258760885c5d716 (patch)
tree272533ac91b7bc3ab16c3ee1a997e142f3170a2a /src/genworld.cpp
parent5e7669b539002cb9ec9e608f4601a827b5e9da57 (diff)
downloadopenttd-db3ee34b4468aa3448b64e339258760885c5d716.tar.xz
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
Diffstat (limited to 'src/genworld.cpp')
-rw-r--r--src/genworld.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp
index 1580dc410..a238853a1 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -28,6 +28,7 @@
#include "blitter/factory.hpp"
#include "tilehighlight_func.h"
#include "saveload/saveload.h"
+#include "void_map.h"
#include "table/sprites.h"
@@ -106,6 +107,12 @@ static void _GenerateWorld(void *arg)
if (_gw.mode == GW_EMPTY) {
SetGeneratingWorldProgress(GWP_UNMOVABLE, 1);
+ /* Make sure the tiles at the north border are void tiles if needed. */
+ if (_settings_game.construction.freeform_edges) {
+ for (uint row = 0; row < MapSizeY(); row++) MakeVoid(TileXY(0, row));
+ for (uint col = 0; col < MapSizeX(); col++) MakeVoid(TileXY(col, 0));
+ }
+
/* Make the map the height of the patch setting */
if (_game_mode != GM_MENU) FlatEmptyWorld(_settings_game.game_creation.se_flat_world_height);