|
@@ -54,13 +54,13 @@ static void GenerateDesertArea(TileIndex
|
|
|
{
|
|
|
if (_game_mode != GM_EDITOR) return;
|
|
|
|
|
|
_generating_world = true;
|
|
|
|
|
|
TileArea ta(start, end);
|
|
|
TILE_AREA_LOOP(tile, ta) {
|
|
|
for (TileIndex tile : ta) {
|
|
|
SetTropicZone(tile, (_ctrl_pressed) ? TROPICZONE_NORMAL : TROPICZONE_DESERT);
|
|
|
DoCommandP(tile, 0, 0, CMD_LANDSCAPE_CLEAR);
|
|
|
MarkTileDirtyByTile(tile);
|
|
|
}
|
|
|
_generating_world = false;
|
|
|
InvalidateWindowClassesData(WC_TOWN_VIEW, 0);
|
|
@@ -71,13 +71,13 @@ static void GenerateRockyArea(TileIndex
|
|
|
{
|
|
|
if (_game_mode != GM_EDITOR) return;
|
|
|
|
|
|
bool success = false;
|
|
|
TileArea ta(start, end);
|
|
|
|
|
|
TILE_AREA_LOOP(tile, ta) {
|
|
|
for (TileIndex tile : ta) {
|
|
|
switch (GetTileType(tile)) {
|
|
|
case MP_TREES:
|
|
|
if (GetTreeGround(tile) == TREE_GROUND_SHORE) continue;
|
|
|
FALLTHROUGH;
|
|
|
|
|
|
case MP_CLEAR:
|
|
@@ -405,24 +405,24 @@ static void CommonRaiseLowerBigLand(Tile
|
|
|
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_CONSTRUCTION_OTHER, tile);
|
|
|
|
|
|
uint h;
|
|
|
if (mode != 0) {
|
|
|
/* Raise land */
|
|
|
h = MAX_TILE_HEIGHT;
|
|
|
TILE_AREA_LOOP(tile2, ta) {
|
|
|
for (TileIndex tile2 : ta) {
|
|
|
h = std::min(h, TileHeight(tile2));
|
|
|
}
|
|
|
} else {
|
|
|
/* Lower land */
|
|
|
h = 0;
|
|
|
TILE_AREA_LOOP(tile2, ta) {
|
|
|
for (TileIndex tile2 : ta) {
|
|
|
h = std::max(h, TileHeight(tile2));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
TILE_AREA_LOOP(tile2, ta) {
|
|
|
for (TileIndex tile2 : ta) {
|
|
|
if (TileHeight(tile2) == h) {
|
|
|
DoCommandP(tile2, SLOPE_N, (uint32)mode, CMD_TERRAFORM_LAND);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|