diff -r 9185bf300199 src/genworld_gui.cpp
--- src/genworld_gui.cpp	Thu Jan 22 22:02:05 2009 +0000
+++ src/genworld_gui.cpp	Thu Jan 22 23:29:29 2009 +0100
@@ -99,13 +99,23 @@
 	GLAND_WATER_PULLDOWN,
 	GLAND_SMOOTHNESS_TEXT,
 	GLAND_SMOOTHNESS_PULLDOWN,
-	GLAND_WATER_BORDERS_PULLDOWN,
+	
+	GLAND_BORDER_TYPES,
+	GLAND_WATER_NW_TEXT,
+	GLAND_WATER_NE_TEXT,
+	GLAND_WATER_SE_TEXT,
+	GLAND_WATER_SW_TEXT,
+	GLAND_WATER_NW,
+	GLAND_WATER_NE,
+	GLAND_WATER_SE,
+	GLAND_WATER_SW,
+	GLAND_BORDERS_RANDOM,
 };
 
 static const Widget _generate_landscape_widgets[] = {
 {  WWT_CLOSEBOX,  RESIZE_NONE, COLOUR_BROWN,    0,  10,   0,  13, STR_00C5,                     STR_018B_CLOSE_WINDOW},
 {    WWT_CAPTION, RESIZE_NONE, COLOUR_BROWN,   11, 337,   0,  13, STR_WORLD_GENERATION_CAPTION, STR_NULL},
-{      WWT_PANEL, RESIZE_NONE, COLOUR_BROWN,    0, 337,  14, 285, 0x0,                          STR_NULL},
+{      WWT_PANEL, RESIZE_NONE, COLOUR_BROWN,    0, 337,  14, 313, 0x0,                          STR_NULL},
 
 /* Landscape selection */
 {   WWT_IMGBTN_2, RESIZE_NONE, COLOUR_ORANGE,  10,  86,  24,  78, SPR_SELECT_TEMPERATE,         STR_030E_SELECT_TEMPERATE_LANDSCAPE},    // GLAND_TEMPERATE
@@ -169,7 +179,16 @@
 {   WWT_DROPDOWN, RESIZE_NONE, COLOUR_ORANGE, 114, 231, 246, 257, 0x0,                          STR_NULL},                               // GLAND_SMOOTHNESS_PULLDOWN
 
 /* Water borders */
-{   WWT_DROPDOWN, RESIZE_NONE, COLOUR_ORANGE,  12, 326, 264, 275, 0x0,                          STR_NULL},                               // GLAND_WATER_BORDERS_PULLDOWN
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,   12, 210, 264, 275, STR_BORDER_TYPE,             STR_NULL},                               // GLAND_BORDER_TYPES
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,   12,  72, 281, 292, STR_NORTHWEST,               STR_NULL},                               // GLAND_WATER_NW_TEXT
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,  190, 250, 281, 292, STR_NORTHEAST,               STR_NULL},                               // GLAND_WATER_NE_TEXT
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,  190, 250, 295, 306, STR_SOUTHEAST,               STR_NULL},                               // GLAND_WATER_SE_TEXT
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,   12,  72, 295, 306, STR_SOUTHWEST,               STR_NULL},                               // GLAND_WATER_SW_TEXT
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE,   75, 130, 280, 291, STR_NORTHWEST,               STR_NORTHWEST},                          // GLAND_WATER_NW
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE,  130, 185, 280, 291, STR_NORTHEAST,               STR_NORTHEAST},                          // GLAND_WATER_NE
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE,  130, 185, 293, 305, STR_SOUTHEAST,               STR_SOUTHEAST},                          // GLAND_WATER_SE
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE,   75, 130, 293, 305, STR_SOUTHEAST,               STR_SOUTHEAST},                          // GLAND_WATER_SW
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE,  255, 326, 280, 305, STR_RANDOM,                  STR_NULL},                               // GLAND_BORDERS_RANDOM
 {   WIDGETS_END},
 };
 
@@ -273,25 +292,6 @@
 static const StringID _landscape[]   = {STR_CONFIG_PATCHES_LAND_GENERATOR_ORIGINAL, STR_CONFIG_PATCHES_LAND_GENERATOR_TERRA_GENESIS, INVALID_STRING_ID};
 static const StringID _num_towns[]   = {STR_NUM_VERY_LOW, STR_6816_LOW, STR_6817_NORMAL, STR_6818_HIGH, INVALID_STRING_ID};
 static const StringID _num_inds[]    = {STR_NONE, STR_NUM_VERY_LOW, STR_6816_LOW, STR_6817_NORMAL, STR_6818_HIGH, INVALID_STRING_ID};
-static const StringID _water_borders[] = {
-	STR_CONFIG_PATCHES_WATER_BORDER_NONE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SE_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE,
-	INVALID_STRING_ID
-};
 
 struct GenerateLandscapeWindow : public QueryStringBaseWindow {
 	uint widget_id;
@@ -311,6 +311,7 @@
 		this->afilter = CS_NUMERAL;
 
 		this->mode = (glwp_modes)this->window_number;
+		if (_settings_newgame.game_creation.water_borders == BORDERS_RANDOM) _settings_newgame.game_creation.water_borders = GB(Random(), 0, 4);
 
 		this->FindWindowPlacementAndResize(desc);
 	}
@@ -320,7 +321,8 @@
 		/* You can't select smoothness / non-water borders if not terragenesis */
 		if (mode == GLWP_GENERATE) {
 			this->SetWidgetDisabledState(GLAND_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
-			this->SetWidgetDisabledState(GLAND_WATER_BORDERS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
+			this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges,
+					GLAND_WATER_NW, GLAND_WATER_NE, GLAND_WATER_SE, GLAND_WATER_SW, GLAND_BORDERS_RANDOM, WIDGET_LIST_END);
 		}
 		/* Disable snowline if not hilly */
 		this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_TEXT, _settings_newgame.game_creation.landscape != LT_ARCTIC);
@@ -339,6 +341,11 @@
 		this->SetWidgetLoweredState(GLAND_TROPICAL,  _settings_newgame.game_creation.landscape == LT_TROPIC);
 		this->SetWidgetLoweredState(GLAND_TOYLAND,   _settings_newgame.game_creation.landscape == LT_TOYLAND);
 
+		this->SetWidgetLoweredState(GLAND_WATER_NW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_NW));
+		this->SetWidgetLoweredState(GLAND_WATER_NE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_NE));
+		this->SetWidgetLoweredState(GLAND_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SE));
+		this->SetWidgetLoweredState(GLAND_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SW));
+
 		if (_game_mode == GM_EDITOR) {
 			this->widget[GLAND_TOWN_PULLDOWN].data     = STR_6836_OFF;
 			this->widget[GLAND_INDUSTRY_PULLDOWN].data = STR_6836_OFF;
@@ -353,7 +360,10 @@
 			this->widget[GLAND_TERRAIN_PULLDOWN].data       = _elevations[_settings_newgame.difficulty.terrain_type];
 			this->widget[GLAND_WATER_PULLDOWN].data         = _sea_lakes[_settings_newgame.difficulty.quantity_sea_lakes];
 			this->widget[GLAND_SMOOTHNESS_PULLDOWN].data    = _smoothness[_settings_newgame.game_creation.tgen_smoothness];
-			this->widget[GLAND_WATER_BORDERS_PULLDOWN].data = _settings_newgame.construction.freeform_edges ? _water_borders[_settings_newgame.game_creation.water_borders] : STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE;
+			this->widget[GLAND_WATER_NE].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_NE) ? STR_BORDER_WATER : STR_BORDER_LAND;
+			this->widget[GLAND_WATER_NW].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_NW) ? STR_BORDER_WATER : STR_BORDER_LAND;
+			this->widget[GLAND_WATER_SE].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_SE) ? STR_BORDER_WATER : STR_BORDER_LAND;
+			this->widget[GLAND_WATER_SW].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_SW) ? STR_BORDER_WATER : STR_BORDER_LAND;
 		} else {
 			this->widget[GLAND_TREE_PULLDOWN].data               = _tree_placer[_settings_newgame.game_creation.tree_placer];
 			this->widget[GLAND_HEIGHTMAP_ROTATION_PULLDOWN].data = _rotation[_settings_newgame.game_creation.heightmap_rotation];
@@ -509,8 +519,26 @@
 				ShowDropDownMenu(this, _smoothness, _settings_newgame.game_creation.tgen_smoothness, GLAND_SMOOTHNESS_PULLDOWN, 0, 0);
 				break;
 
-			case GLAND_WATER_BORDERS_PULLDOWN: // Water borders
-				ShowDropDownMenu(this, _water_borders, _settings_newgame.game_creation.water_borders, GLAND_WATER_BORDERS_PULLDOWN, 0, 0);
+			/* Freetype map borders */
+			case GLAND_WATER_NW:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders, BORDER_NW);	
+				break;
+
+			case GLAND_WATER_NE:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders, BORDER_NE);
+				break;
+
+			case GLAND_WATER_SE:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders, BORDER_SE);
+				break;
+
+			case GLAND_WATER_SW:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders, BORDER_SW);
+				break;
+
+			case GLAND_BORDERS_RANDOM:
+				_settings_newgame.game_creation.water_borders = GB(InteractiveRandom(), 0, 4);
+				this->SetDirty();
 				break;
 		}
 	}
@@ -540,7 +568,6 @@
 			case GLAND_MAPSIZE_Y_PULLDOWN:     _settings_newgame.game_creation.map_y = index; break;
 			case GLAND_TREE_PULLDOWN:          _settings_newgame.game_creation.tree_placer = index; break;
 			case GLAND_SMOOTHNESS_PULLDOWN:    _settings_newgame.game_creation.tgen_smoothness = index;  break;
-			case GLAND_WATER_BORDERS_PULLDOWN: _settings_newgame.game_creation.water_borders = index;  break;
 
 			case GLAND_TOWN_PULLDOWN:
 				_settings_newgame.difficulty.number_towns = index;
@@ -601,7 +628,7 @@
 };
 
 static const WindowDesc _generate_landscape_desc = {
-	WDP_CENTER, WDP_CENTER, 338, 286, 338, 286,
+	WDP_CENTER, WDP_CENTER, 338, 313, 338, 313,
 	WC_GENERATE_LANDSCAPE, WC_NONE,
 	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 	_generate_landscape_widgets,
diff -r 9185bf300199 src/landscape_type.h
--- src/landscape_type.h	Thu Jan 22 22:02:05 2009 +0000
+++ src/landscape_type.h	Thu Jan 22 23:29:29 2009 +0100
@@ -17,4 +17,15 @@
 	NUM_LANDSCAPE = 4,
 };
 
+/**
+ * For storing the water borders which shall be retained.
+ */
+enum Borders {
+	BORDER_NE = 0,
+	BORDER_SE = 1,
+	BORDER_SW = 2,
+	BORDER_NW = 3,
+	BORDERS_RANDOM = 16,
+};
+
 #endif /* LANDSCAPE_TYPE_H */
diff -r 9185bf300199 src/lang/czech.txt
--- src/lang/czech.txt	Thu Jan 22 22:02:05 2009 +0000
+++ src/lang/czech.txt	Thu Jan 22 23:29:29 2009 +0100
@@ -1161,26 +1161,6 @@
 STR_CONFIG_PATCHES_ENABLE_FREEFORM_EDGES                        :{LTBLUE}Umožnit terénní úpravy dílků na okrajích mapy: {ORANGE}{STRING1}
 STR_CONFIG_PATCHES_EDGES_NOT_EMPTY                              :{WHITE}Alespoň jeden dílek na severním okraji není prázdný
 STR_CONFIG_PATCHES_EDGES_NOT_WATER                              :{WHITE}Alespoň jeden dílek na jednom z okrajů není zaplaven
-
-# Start of map water border strings.
-# DON'T ADD OR REMOVE LINES HERE
-STR_CONFIG_PATCHES_WATER_BORDER_NONE                            :Země na všech okrajích
-STR_CONFIG_PATCHES_WATER_BORDER_NE                              :Voda pouze na severovýchodním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_SE                              :Voda pouze na jihovýchodním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_SE_NE                           :Voda na severovýchodním a jihovýchodním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_SW                              :Voda pouze na jihozápadním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_SW_NE                           :Voda na severovýchodním a jihozápadním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE                           :Voda na jihovýchodním a jihozápadním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE                        :Země pouze na severozápadním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW                              :Voda pouze na severozápadním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW_NE                           :Voda na severozápadním a severovýchodním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE                           :Voda na severozápadním a jihovýchodním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE                        :Země pouze na jihozápadním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW                           :Voda na severozápadním a jihozápadním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE                        :Země pouze na jihovýchodním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE                        :Země pouze na severovýchodním okraji
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE                     :Voda na všech okrajích
-# End of map water border strings.
 
 STR_CONFIG_PATCHES_STATION_SPREAD                               :{LTBLUE}Největší rozsah stanice: {ORANGE}{STRING} {RED}Pozor: Vysoké nastavení zpomalí hru
 STR_CONFIG_PATCHES_SERVICEATHELIPAD                             :{LTBLUE}Údržba vrtulníků na heliportech: {ORANGE}{STRING}
diff -r 9185bf300199 src/lang/dutch.txt
--- src/lang/dutch.txt	Thu Jan 22 22:02:05 2009 +0000
+++ src/lang/dutch.txt	Thu Jan 22 23:29:29 2009 +0100
@@ -1093,26 +1093,6 @@
 STR_CONFIG_PATCHES_ENABLE_FREEFORM_EDGES                        :{LTBLUE}Aanpassen van de vakjes op de map rand toestaan: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_EDGES_NOT_EMPTY                              :{WHITE}Een of meer vakjes in de in de noordelijke rand zijn niet leeg
 STR_CONFIG_PATCHES_EDGES_NOT_WATER                              :{WHITE}Een of meer vakjes op de rand zijn geen water
-
-# Start of map water border strings.
-# DON'T ADD OR REMOVE LINES HERE
-STR_CONFIG_PATCHES_WATER_BORDER_NONE                            :Land op alle randen
-STR_CONFIG_PATCHES_WATER_BORDER_NE                              :Water alleen aan de  noordoost rand
-STR_CONFIG_PATCHES_WATER_BORDER_SE                              :Water alleen aan de  zuidoost rand
-STR_CONFIG_PATCHES_WATER_BORDER_SE_NE                           :Water aan de  noordoost en zuidoost rand
-STR_CONFIG_PATCHES_WATER_BORDER_SW                              :Water alleen aan de  zuidwest rand
-STR_CONFIG_PATCHES_WATER_BORDER_SW_NE                           :Water aan de  noordoost  en zuidwest rand
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE                           :Water aan de  zuioost  en zuidwest rand
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE                        :Land alleen aan de  noordwest  rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW                              :Water alleen aan de  noordwest  rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW_NE                           :Water aan de  noordwest  en noordoost rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE                           :Water aan de  noordwest  en zuidoost rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE                        :Land alleen aan de  zuidwest rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW                           :Water aan de  noordwest  en zuidwest rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE                        :Land alleen aan de zuidoost rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE                        :Land alleen aan de noordoost rand
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE                     :Water aan alle randen
-# End of map water border strings.
 
 STR_CONFIG_PATCHES_STATION_SPREAD                               :{LTBLUE}Maximale stationsomvang: {ORANGE}{STRING} {RED}Pas op: Hoge waarde vertraagt spel
 STR_CONFIG_PATCHES_SERVICEATHELIPAD                             :{LTBLUE}Helikopters automatisch repareren op helipads: {ORANGE}{STRING}
diff -r 9185bf300199 src/lang/english.txt
--- src/lang/english.txt	Thu Jan 22 22:02:05 2009 +0000
+++ src/lang/english.txt	Thu Jan 22 23:29:29 2009 +0100
@@ -1093,26 +1093,6 @@
 STR_CONFIG_PATCHES_ENABLE_FREEFORM_EDGES                        :{LTBLUE}Enable terraforming the tiles at the map borders: {ORANGE}{STRING1}
 STR_CONFIG_PATCHES_EDGES_NOT_EMPTY                              :{WHITE}One or more tiles at the northern edge are not empty
 STR_CONFIG_PATCHES_EDGES_NOT_WATER                              :{WHITE}One or more tiles at one of the edges is not water
-
-# Start of map water border strings.
-# DON'T ADD OR REMOVE LINES HERE
-STR_CONFIG_PATCHES_WATER_BORDER_NONE                            :Land at all borders
-STR_CONFIG_PATCHES_WATER_BORDER_NE                              :Water at north-east border only
-STR_CONFIG_PATCHES_WATER_BORDER_SE                              :Water at south-east border only
-STR_CONFIG_PATCHES_WATER_BORDER_SE_NE                           :Water at north-east and south-east borders
-STR_CONFIG_PATCHES_WATER_BORDER_SW                              :Water at south-west border only
-STR_CONFIG_PATCHES_WATER_BORDER_SW_NE                           :Water at north-east and south-west borders
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE                           :Water at south-east and south-west borders
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE                        :Land only at north-west border
-STR_CONFIG_PATCHES_WATER_BORDER_NW                              :Water at north-west border only
-STR_CONFIG_PATCHES_WATER_BORDER_NW_NE                           :Water at north-west and north-east borders
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE                           :Water at north-west and south-east borders
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE                        :Land only at south-west border
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW                           :Water at north-west and south-west borders
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE                        :Land only at south-east border
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE                        :Land only at north-east border
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE                     :Water at all borders
-# End of map water border strings.
 
 STR_CONFIG_PATCHES_STATION_SPREAD                               :{LTBLUE}Max station spread: {ORANGE}{STRING1} {RED}Warning: High setting slows game
 STR_CONFIG_PATCHES_SERVICEATHELIPAD                             :{LTBLUE}Service helicopters at helipads automatically: {ORANGE}{STRING1}
@@ -3510,6 +3490,17 @@
 STR_SMALLMAP_CENTER                                             :{BLACK}Center the smallmap on the current position
 STR_SMALLMAP_INDUSTRY                                           :{TINYFONT}{STRING} ({NUM})
 
+# Strings for map borders at game generation
+STR_BORDER_TYPE                                                 :{BLACK}Map edges:
+STR_NORTHWEST                                                   :{BLACK}Northwest
+STR_NORTHEAST                                                   :{BLACK}Northeast
+STR_SOUTHEAST                                                   :{BLACK}Southeast
+STR_SOUTHWEST                                                   :{BLACK}Southwest
+STR_BORDER_LAND                                                 :{BLACK}Freeform
+STR_BORDER_WATER                                                :{BLACK}Water
+STR_SET_BORDERS_MANUALLY                                        :{BLACK}Set manually
+
+
 ########### String for new airports
 STR_SMALL_AIRPORT                                               :{BLACK}Small
 STR_CITY_AIRPORT                                                :{BLACK}City
diff -r 9185bf300199 src/lang/french.txt
--- src/lang/french.txt	Thu Jan 22 22:02:05 2009 +0000
+++ src/lang/french.txt	Thu Jan 22 23:29:29 2009 +0100
@@ -1094,26 +1094,6 @@
 STR_CONFIG_PATCHES_ENABLE_FREEFORM_EDGES                        :{LTBLUE}Autoriser le terrassement sur les bords de la carte: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_EDGES_NOT_EMPTY                              :{WHITE}Une ou plusieurs cases sur le bord nord ne sont pas vides
 STR_CONFIG_PATCHES_EDGES_NOT_WATER                              :{WHITE}Une ou plusieurs cases sur l'un des bords ne sont pas de l'eau
-
-# Start of map water border strings.
-# DON'T ADD OR REMOVE LINES HERE
-STR_CONFIG_PATCHES_WATER_BORDER_NONE                            :Terre sur tous les bords
-STR_CONFIG_PATCHES_WATER_BORDER_NE                              :Eau sur le bord nord-est uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_SE                              :Eau sur le bord sud-est uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_SE_NE                           :Eau sur les bords nord-est et sud-est
-STR_CONFIG_PATCHES_WATER_BORDER_SW                              :Eau sur le bord sud-ouest uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_SW_NE                           :Eau sur les bords nord-est et sud-ouest
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE                           :Eau sur les bords sud-est et sud-ouest
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE                        :Terre sur le bord nord-ouest uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_NW                              :Eau sur le bord nord-ouest uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_NW_NE                           :Eau sur les bords nord-ouest et nord-est
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE                           :Eau sur les bords nord-ouest et sud-est
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE                        :Terre sur le bord sud-ouest uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW                           :Eau sur les bords nord-ouest et sud-ouest
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE                        :Terre sur le bord sud-est uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE                        :Terre sur le bord  nord-est uniquement
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE                     :Eau sur tous les bords
-# End of map water border strings.
 
 STR_CONFIG_PATCHES_STATION_SPREAD                               :{LTBLUE}Etendue max. des stations: {ORANGE}{STRING} {RED}Attention: Valeur élevée = jeu lent
 STR_CONFIG_PATCHES_SERVICEATHELIPAD                             :{LTBLUE}Entretenir automatiquement les hélicoptères à l'héliport: {ORANGE}{STRING}
diff -r 9185bf300199 src/lang/hungarian.txt
--- src/lang/hungarian.txt	Thu Jan 22 22:02:05 2009 +0000
+++ src/lang/hungarian.txt	Thu Jan 22 23:29:30 2009 +0100
@@ -1159,6 +1159,26 @@
 STR_CONFIG_PATCHES_ENABLE_FREEFORM_EDGES                        :{LTBLUE}A térkép határain lévő táj rendezésének engedélyezése: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_EDGES_NOT_EMPTY                              :{WHITE}Az északi határnál egy vagy több mező nem üres
 STR_CONFIG_PATCHES_EDGES_NOT_WATER                              :{WHITE}Az egyik határnál egy vagy több mező nem víz
+
+# Start of map water border strings.
+# DON'T ADD OR REMOVE LINES HERE
+STR_CONFIG_PATCHES_WATER_BORDER_NONE                            :Szárazföld minden határnál
+STR_CONFIG_PATCHES_WATER_BORDER_NE                              :Víz csak az északkeleti határnál
+STR_CONFIG_PATCHES_WATER_BORDER_SE                              :Víz csal a délkeleti határnál
+STR_CONFIG_PATCHES_WATER_BORDER_SE_NE                           :Víz az északkeleti és délkeleti határoknál
+STR_CONFIG_PATCHES_WATER_BORDER_SW                              :Víz csak a délnyugati határnál
+STR_CONFIG_PATCHES_WATER_BORDER_SW_NE                           :Víz az északkeleti és délnyugati határoknál
+STR_CONFIG_PATCHES_WATER_BORDER_SW_SE                           :Víz a délkeleti és délnyugati határoknál
+STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE                        :Szárazföld csak az északnyugati határnál
+STR_CONFIG_PATCHES_WATER_BORDER_NW                              :Víz csak az északnyugati határnál
+STR_CONFIG_PATCHES_WATER_BORDER_NW_NE                           :Víz az északnyugati és északkeleti határoknál
+STR_CONFIG_PATCHES_WATER_BORDER_NW_SE                           :Víz az északnyugati és délkeleti határoknál
+STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE                        :Szárazföld csak a délnyugati határnál
+STR_CONFIG_PATCHES_WATER_BORDER_NW_SW                           :Víz az északnyugati és délnyugati határoknál
+STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE                        :Szárazföld csak a délkeleti határnál
+STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE                        :Szárazföld csak az északkeleti határnál
+STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE                     :Víz mindegyik határnál
+# End of map water border strings.
 
 # Start of map water border strings.
 # DON'T ADD OR REMOVE LINES HERE
diff -r 9185bf300199 src/lang/romanian.txt
--- src/lang/romanian.txt	Thu Jan 22 22:02:05 2009 +0000
+++ src/lang/romanian.txt	Thu Jan 22 23:29:30 2009 +0100
@@ -1093,26 +1093,6 @@
 STR_CONFIG_PATCHES_ENABLE_FREEFORM_EDGES                        :{LTBLUE}Permite terraformarea suprafeţelor din marginea hărţii: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_EDGES_NOT_EMPTY                              :{WHITE}Una sau ma multe suprafeţe din marginea nordică nu sunt goale
 STR_CONFIG_PATCHES_EDGES_NOT_WATER                              :{WHITE}Una sau mai multe suprafeţe din marginea hărţii nu contin apă
-
-# Start of map water border strings.
-# DON'T ADD OR REMOVE LINES HERE
-STR_CONFIG_PATCHES_WATER_BORDER_NONE                            :Pământ pe  toate marginile
-STR_CONFIG_PATCHES_WATER_BORDER_NE                              :Apă doar la marginea nord-estică
-STR_CONFIG_PATCHES_WATER_BORDER_SE                              :Apă doar la marginea sud-estică
-STR_CONFIG_PATCHES_WATER_BORDER_SE_NE                           :Apă la marginile nord-estice si sud-estice
-STR_CONFIG_PATCHES_WATER_BORDER_SW                              :Apă doar la marginea sud-vestică
-STR_CONFIG_PATCHES_WATER_BORDER_SW_NE                           :Apă la marginile nord-estice si sud-vestice
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE                           :Apă la marginile sud-estice si sud-vestice
-STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE                        :Pământ doar la marginea nord+vestică
-STR_CONFIG_PATCHES_WATER_BORDER_NW                              :Apă doar la marginea nord+vestică
-STR_CONFIG_PATCHES_WATER_BORDER_NW_NE                           :Apă la marginile nord-vestice si nord-estice
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE                           :Apă la marginile nord-vestice si sud-estice
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE                        :Pământ doar la marginea sud-vestică
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW                           :Apă la marginile nord-vestice si sud-vestice
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE                        :Pământ doar la marginea sud-estică
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE                        :Pământ doar la marginea nord-estică
-STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE                     :Apă pe marginea hărţii
-# End of map water border strings.
 
 STR_CONFIG_PATCHES_STATION_SPREAD                               :{LTBLUE}Distanţarea maximă a staţiilor: {ORANGE}{STRING} {RED}Atenţie: Valorile mari încetinesc jocul!
 STR_CONFIG_PATCHES_SERVICEATHELIPAD                             :{LTBLUE}Service automat pentru elicoptere la helipaduri: {ORANGE}{STRING}
diff -r 9185bf300199 src/settings.cpp
--- src/settings.cpp	Thu Jan 22 22:02:05 2009 +0000
+++ src/settings.cpp	Thu Jan 22 23:29:30 2009 +0100
@@ -1466,7 +1466,7 @@
 	     SDT_VAR(GameSettings, game_creation.map_x,                           SLE_UINT8,                     S, 0,     8,                     6,      11, 0, STR_CONFIG_PATCHES_MAP_X,                 NULL),
 	     SDT_VAR(GameSettings, game_creation.map_y,                           SLE_UINT8,                     S, 0,     8,                     6,      11, 0, STR_CONFIG_PATCHES_MAP_Y,                 NULL),
 	SDT_CONDBOOL(GameSettings, construction.freeform_edges,                             111, SL_MAX_VERSION, 0, 0, false,                                    STR_CONFIG_PATCHES_ENABLE_FREEFORM_EDGES, CheckFreeformEdges),
-	 SDT_CONDVAR(GameSettings, game_creation.water_borders,                   SLE_UINT8,111, SL_MAX_VERSION, 0, 0,    15,                     0,      15, 0, STR_NULL,                                 NULL),
+	 SDT_CONDVAR(GameSettings, game_creation.water_borders,                   SLE_UINT8,111, SL_MAX_VERSION, 0, 0,    15,                     0,      16, 0, STR_NULL,                                 NULL),
 
  SDT_CONDOMANY(GameSettings, locale.currency,                               SLE_UINT8, 97, SL_MAX_VERSION, N, 0, 0, CUSTOM_CURRENCY_ID, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SIT|SEK|YTL|SKK|BRR|custom", STR_NULL, NULL, NULL),
  SDT_CONDOMANY(GameSettings, locale.units,                                  SLE_UINT8, 97, SL_MAX_VERSION, N, 0, 1, 2, "imperial|metric|si", STR_NULL, NULL, NULL),
diff -r 9185bf300199 src/tgp.cpp
--- src/tgp.cpp	Thu Jan 22 22:02:05 2009 +0000
+++ src/tgp.cpp	Thu Jan 22 23:29:30 2009 +0100
@@ -552,13 +552,6 @@
 
 static double perlin_coast_noise_2D(const double x, const double y, const double p, const int prime);
 
-enum Borders {
-	BORDER_NE = 0,
-	BORDER_SE = 1,
-	BORDER_SW = 2,
-	BORDER_NW = 3,
-};
-
 /**
  * This routine sculpts in from the edge a random amount, again a Perlin
  * sequence, to avoid the rigid flat-edge slopes that were present before. The
@@ -725,6 +718,7 @@
 	HeightMapAdjustWaterLevel(water_percent, h_max_new);
 
 	byte water_borders = _settings_game.construction.freeform_edges ? _settings_game.game_creation.water_borders : 0xF;
+	if (water_borders == BORDERS_RANDOM) water_borders = GB(Random(), 0, 4);
 
 	HeightMapCoastLines(water_borders);
 	HeightMapSmoothSlopes(roughness);
