summaryrefslogtreecommitdiff
path: root/src/tgp.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-08-12 21:36:43 +0000
committeryexo <yexo@openttd.org>2010-08-12 21:36:43 +0000
commit241d705406572d512710cf29316d7603210a6ecf (patch)
tree59314fc8cb6d6b97e425f36626da716ac9c3f4a5 /src/tgp.cpp
parent089fc97387af79a8023677ac60ca1f6623da1dc5 (diff)
downloadopenttd-241d705406572d512710cf29316d7603210a6ecf.tar.xz
(svn r20474) -Cleanup: remove some unused code
Diffstat (limited to 'src/tgp.cpp')
-rw-r--r--src/tgp.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp
index 691765304..368fd3af0 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -890,26 +890,6 @@ static double int_noise(const long x, const long y, const int prime)
/**
- * Hj. Malthaner's routine included 2 different noise smoothing methods.
- * We now use the "raw" int_noise one.
- * However, it may be useful to move to the other routine in future.
- * So it is included too.
- */
-static double smoothed_noise(const int x, const int y, const int prime)
-{
-#if 0
- /* A hilly world (four corner smooth) */
- const double sides = int_noise(x - 1, y) + int_noise(x + 1, y) + int_noise(x, y - 1) + int_noise(x, y + 1);
- const double center = int_noise(x, y);
- return (sides + sides + center * 4) / 8.0;
-#endif
-
- /* This gives very hilly world */
- return int_noise(x, y, prime);
-}
-
-
-/**
* This routine determines the interpolated value between a and b
*/
static inline double linear_interpolate(const double a, const double b, const double x)
@@ -930,10 +910,10 @@ static double interpolated_noise(const double x, const double y, const int prime
const double fractional_X = x - (double)integer_X;
const double fractional_Y = y - (double)integer_Y;
- const double v1 = smoothed_noise(integer_X, integer_Y, prime);
- const double v2 = smoothed_noise(integer_X + 1, integer_Y, prime);
- const double v3 = smoothed_noise(integer_X, integer_Y + 1, prime);
- const double v4 = smoothed_noise(integer_X + 1, integer_Y + 1, prime);
+ const double v1 = int_noise(integer_X, integer_Y, prime);
+ const double v2 = int_noise(integer_X + 1, integer_Y, prime);
+ const double v3 = int_noise(integer_X, integer_Y + 1, prime);
+ const double v4 = int_noise(integer_X + 1, integer_Y + 1, prime);
const double i1 = linear_interpolate(v1, v2, fractional_X);
const double i2 = linear_interpolate(v3, v4, fractional_X);