summaryrefslogtreecommitdiffstats
path: root/src/Noise
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-11-27 23:13:40 +0100
committerMattes D <github@xoft.cz>2014-11-27 23:13:40 +0100
commit4545b8eed9262d1748410b18f62da0e2cdbd39d5 (patch)
tree1e9db247fbb38f9cef80c8a02221b15652d7ba1d /src/Noise
parentMinecart.h: Fixed integral conversion warning. (diff)
downloadcuberite-4545b8eed9262d1748410b18f62da0e2cdbd39d5.tar
cuberite-4545b8eed9262d1748410b18f62da0e2cdbd39d5.tar.gz
cuberite-4545b8eed9262d1748410b18f62da0e2cdbd39d5.tar.bz2
cuberite-4545b8eed9262d1748410b18f62da0e2cdbd39d5.tar.lz
cuberite-4545b8eed9262d1748410b18f62da0e2cdbd39d5.tar.xz
cuberite-4545b8eed9262d1748410b18f62da0e2cdbd39d5.tar.zst
cuberite-4545b8eed9262d1748410b18f62da0e2cdbd39d5.zip
Diffstat (limited to '')
-rw-r--r--src/Noise/OctavedNoise.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Noise/OctavedNoise.h b/src/Noise/OctavedNoise.h
index 4af18bd1b..efb9a0167 100644
--- a/src/Noise/OctavedNoise.h
+++ b/src/Noise/OctavedNoise.h
@@ -66,17 +66,19 @@ public:
}
// Generate the first octave directly into array:
- const cOctave & FirstOctave = m_Octaves.front();
int ArrayCount = a_SizeX * a_SizeY;
- FirstOctave.m_Noise.Generate2D(
- a_Workspace, a_SizeX, a_SizeY,
- a_StartX * FirstOctave.m_Frequency, a_EndX * FirstOctave.m_Frequency,
- a_StartY * FirstOctave.m_Frequency, a_EndY * FirstOctave.m_Frequency
- );
- NOISE_DATATYPE Amplitude = FirstOctave.m_Amplitude;
- for (int i = 0; i < ArrayCount; i++)
{
- a_Array[i] = a_Workspace[i] * Amplitude;
+ const cOctave & FirstOctave = m_Octaves.front();
+ FirstOctave.m_Noise.Generate2D(
+ a_Workspace, a_SizeX, a_SizeY,
+ a_StartX * FirstOctave.m_Frequency, a_EndX * FirstOctave.m_Frequency,
+ a_StartY * FirstOctave.m_Frequency, a_EndY * FirstOctave.m_Frequency
+ );
+ NOISE_DATATYPE Amplitude = FirstOctave.m_Amplitude;
+ for (int i = 0; i < ArrayCount; i++)
+ {
+ a_Array[i] = a_Workspace[i] * Amplitude;
+ }
}
// Add each octave: