From f0eb6a7b101afba52f33c5286e15a862ee68c64e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sat, 7 May 2011 16:06:08 +0200 Subject: Replace static heightmap with perlin noise using libnoise and noiseutils. --- noiseutils/warnings.diff | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 noiseutils/warnings.diff (limited to 'noiseutils/warnings.diff') diff --git a/noiseutils/warnings.diff b/noiseutils/warnings.diff new file mode 100644 index 0000000..24fc13c --- /dev/null +++ b/noiseutils/warnings.diff @@ -0,0 +1,56 @@ +diff -u /home/snakebite/noiseutils/noiseutils.cpp ./noiseutils.cpp +--- /home/snakebite/noiseutils/noiseutils.cpp 2005-06-07 21:49:24.000000000 +0200 ++++ ./noiseutils.cpp 2011-05-07 14:32:36.000000000 +0200 +@@ -671,7 +671,6 @@ + int height = m_pSourceNoiseMap->GetHeight (); + + int bufferSize = CalcWidthByteCount (width); +- int destSize = bufferSize * height; + + // This buffer holds one horizontal line in the destination file. + noise::uint8* pLineBuffer = NULL; +diff -u /home/snakebite/noiseutils/noiseutils.h ./noiseutils.h +--- /home/snakebite/noiseutils/noiseutils.h 2005-06-07 21:46:42.000000000 +0200 ++++ ./noiseutils.h 2011-05-07 14:32:06.000000000 +0200 +@@ -134,17 +134,17 @@ + { + } + +- /// Value of the alpha (transparency) channel. +- noise::uint8 alpha; +- +- /// Value of the blue channel. +- noise::uint8 blue; ++ /// Value of the red channel. ++ noise::uint8 red; + + /// Value of the green channel. + noise::uint8 green; + +- /// Value of the red channel. +- noise::uint8 red; ++ /// Value of the blue channel. ++ noise::uint8 blue; ++ ++ /// Value of the alpha (transparency) channel. ++ noise::uint8 alpha; + + }; + +@@ -1296,13 +1296,13 @@ + /// Name of the file to write. + std::string m_destFilename; + ++ /// A pointer to the noise map that will be written to the file. ++ NoiseMap* m_pSourceNoiseMap; ++ + /// The distance separating adjacent points in the noise map, in + /// meters. + float m_metersPerPoint; + +- /// A pointer to the noise map that will be written to the file. +- NoiseMap* m_pSourceNoiseMap; +- + }; + + /// Abstract base class for a noise-map builder -- cgit v1.2.3