diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-25 20:57:38 +0200 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-25 20:57:38 +0200 |
commit | 625c30d8bdee4f60c8437dc6004368f685435775 (patch) | |
tree | 3e56ea838a3231c363493ca75e3ad0486bff295c /source/cChunk.cpp | |
parent | Abstracted sockets some more to ensure the same behavior over the entire program and on multiple platforms. (diff) | |
download | cuberite-625c30d8bdee4f60c8437dc6004368f685435775.tar cuberite-625c30d8bdee4f60c8437dc6004368f685435775.tar.gz cuberite-625c30d8bdee4f60c8437dc6004368f685435775.tar.bz2 cuberite-625c30d8bdee4f60c8437dc6004368f685435775.tar.lz cuberite-625c30d8bdee4f60c8437dc6004368f685435775.tar.xz cuberite-625c30d8bdee4f60c8437dc6004368f685435775.tar.zst cuberite-625c30d8bdee4f60c8437dc6004368f685435775.zip |
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r-- | source/cChunk.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp index a8e8938a0..8e03ff6c7 100644 --- a/source/cChunk.cpp +++ b/source/cChunk.cpp @@ -678,13 +678,13 @@ void cChunk::SpreadLight(char* a_LightBuffer) float GetNoise( float x, float y, cNoise & a_Noise )
{
- float oct1 = a_Noise.CubicNoise2D( x*cGenSettings::HeightFreq1, y*cGenSettings::HeightFreq1 )*cGenSettings::HeightAmp1;
- float oct2 = a_Noise.CubicNoise2D( x*cGenSettings::HeightFreq2, y*cGenSettings::HeightFreq2 )*cGenSettings::HeightAmp2;
- float oct3 = a_Noise.CubicNoise2D( x*cGenSettings::HeightFreq3, y*cGenSettings::HeightFreq3 )*cGenSettings::HeightAmp3;
+ float oct1 = a_Noise.SSE_CubicNoise2D( x*cGenSettings::HeightFreq1, y*cGenSettings::HeightFreq1 )*cGenSettings::HeightAmp1;
+ float oct2 = a_Noise.SSE_CubicNoise2D( x*cGenSettings::HeightFreq2, y*cGenSettings::HeightFreq2 )*cGenSettings::HeightAmp2;
+ float oct3 = a_Noise.SSE_CubicNoise2D( x*cGenSettings::HeightFreq3, y*cGenSettings::HeightFreq3 )*cGenSettings::HeightAmp3;
- float height = a_Noise.CubicNoise2D( x*0.1f, y*0.1f )*2;
+ float height = a_Noise.SSE_CubicNoise2D( x*0.1f, y*0.1f )*2;
- float flatness = ((a_Noise.CubicNoise2D( x*0.5f, y*0.5f ) + 1.f ) * 0.5f) * 1.1f; // 0 ... 1.5
+ float flatness = ((a_Noise.SSE_CubicNoise2D( x*0.5f, y*0.5f ) + 1.f ) * 0.5f) * 1.1f; // 0 ... 1.5
flatness *= flatness * flatness;
return (oct1 + oct2 + oct3) * flatness + height;
@@ -836,8 +836,8 @@ void cChunk::GenerateTerrain() // int yy = TopY;
int zz = z + m_PosZ*16;
- float val1 = m_Noise.CubicNoise2D( xx*0.1f, zz*0.1f );
- float val2 = m_Noise.CubicNoise2D( xx*0.01f, zz*0.01f );
+ float val1 = m_Noise.SSE_CubicNoise2D( xx*0.1f, zz*0.1f );
+ float val2 = m_Noise.SSE_CubicNoise2D( xx*0.01f, zz*0.01f );
if( m_BlockType[index] == SandID )
{
if( (val1 + val2 > 0.f) && (rand()%128) > 124 && m_BlockType[index] == E_BLOCK_SAND )
@@ -852,8 +852,8 @@ void cChunk::GenerateTerrain() }
else if( m_BlockType[index] == GrassID )
{
- float val3 = m_Noise.CubicNoise2D( xx*0.01f+10, zz*0.01f+10 );
- float val4 = m_Noise.CubicNoise2D( xx*0.05f+20, zz*0.05f+20 );
+ float val3 = m_Noise.SSE_CubicNoise2D( xx*0.01f+10, zz*0.01f+10 );
+ float val4 = m_Noise.SSE_CubicNoise2D( xx*0.05f+20, zz*0.05f+20 );
if( val1 + val2 > 0.2f && (rand()%128) > 124 )
cRoot::Get()->GetWorld()->GrowTree( xx, TopY, zz );
else if( val3 > 0.2f && (rand()%128) > 124 )
|