summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2015-04-11 18:43:30 +0000
committeralberth <alberth@openttd.org>2015-04-11 18:43:30 +0000
commitf29842316e91ca8d020dc0ec26161f239769f7e7 (patch)
treeaa07e9ef477d2d839b36565437d1c0121d9cd94b
parent79c3bc081bfcf86262401d1816ddd6a5c7f4187c (diff)
downloadopenttd-f29842316e91ca8d020dc0ec26161f239769f7e7.tar.xz
(svn r27229) -Change: Generate more detailed curves at the coast (chillcore)
-rw-r--r--src/tgp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp
index af79e8d54..b4d1aa30c 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -725,7 +725,7 @@ static void HeightMapCoastLines(uint8 water_borders)
if (HasBit(water_borders, BORDER_NE)) {
/* Top right */
max_x = abs((perlin_coast_noise_2D(_height_map.size_y - y, y, 0.9, 53) + 0.25) * 5 + (perlin_coast_noise_2D(y, y, 0.35, 179) + 1) * 12);
- max_x = max((smallest_size * smallest_size / 16) + max_x, (smallest_size * smallest_size / 16) + margin - max_x);
+ max_x = max((smallest_size * smallest_size / 64) + max_x, (smallest_size * smallest_size / 64) + margin - max_x);
if (smallest_size < 8 && max_x > 5) max_x /= 1.5;
for (x = 0; x < max_x; x++) {
_height_map.height(x, y) = 0;
@@ -735,7 +735,7 @@ static void HeightMapCoastLines(uint8 water_borders)
if (HasBit(water_borders, BORDER_SW)) {
/* Bottom left */
max_x = abs((perlin_coast_noise_2D(_height_map.size_y - y, y, 0.85, 101) + 0.3) * 6 + (perlin_coast_noise_2D(y, y, 0.45, 67) + 0.75) * 8);
- max_x = max((smallest_size * smallest_size / 16) + max_x, (smallest_size * smallest_size / 16) + margin - max_x);
+ max_x = max((smallest_size * smallest_size / 64) + max_x, (smallest_size * smallest_size / 64) + margin - max_x);
if (smallest_size < 8 && max_x > 5) max_x /= 1.5;
for (x = _height_map.size_x; x > (_height_map.size_x - 1 - max_x); x--) {
_height_map.height(x, y) = 0;
@@ -748,7 +748,7 @@ static void HeightMapCoastLines(uint8 water_borders)
if (HasBit(water_borders, BORDER_NW)) {
/* Top left */
max_y = abs((perlin_coast_noise_2D(x, _height_map.size_y / 2, 0.9, 167) + 0.4) * 5 + (perlin_coast_noise_2D(x, _height_map.size_y / 3, 0.4, 211) + 0.7) * 9);
- max_y = max((smallest_size * smallest_size / 16) + max_y, (smallest_size * smallest_size / 16) + margin - max_y);
+ max_y = max((smallest_size * smallest_size / 64) + max_y, (smallest_size * smallest_size / 64) + margin - max_y);
if (smallest_size < 8 && max_y > 5) max_y /= 1.5;
for (y = 0; y < max_y; y++) {
_height_map.height(x, y) = 0;
@@ -758,7 +758,7 @@ static void HeightMapCoastLines(uint8 water_borders)
if (HasBit(water_borders, BORDER_SE)) {
/* Bottom right */
max_y = abs((perlin_coast_noise_2D(x, _height_map.size_y / 3, 0.85, 71) + 0.25) * 6 + (perlin_coast_noise_2D(x, _height_map.size_y / 3, 0.35, 193) + 0.75) * 12);
- max_y = max((smallest_size * smallest_size / 16) + max_y, (smallest_size * smallest_size / 16) + margin - max_y);
+ max_y = max((smallest_size * smallest_size / 64) + max_y, (smallest_size * smallest_size / 64) + margin - max_y);
if (smallest_size < 8 && max_y > 5) max_y /= 1.5;
for (y = _height_map.size_y; y > (_height_map.size_y - 1 - max_y); y--) {
_height_map.height(x, y) = 0;