OctavedNoise: Another unshadowed local variable.
This commit is contained in:
parent
12ad2a07c0
commit
4545b8eed9
@ -66,17 +66,19 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the first octave directly into array:
|
// Generate the first octave directly into array:
|
||||||
const cOctave & FirstOctave = m_Octaves.front();
|
|
||||||
int ArrayCount = a_SizeX * a_SizeY;
|
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:
|
// Add each octave:
|
||||||
|
Loading…
Reference in New Issue
Block a user