Skip to content

Commit

Permalink
Noise: Make buffer size parameters unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed May 15, 2015
1 parent eaef678 commit 5d1d7c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/noise.cpp
Expand Up @@ -460,7 +460,7 @@ float NoisePerlin3D(NoiseParams *np, float x, float y, float z, int seed)
}


Noise::Noise(NoiseParams *np_, int seed, int sx, int sy, int sz)
Noise::Noise(NoiseParams *np_, int seed, u32 sx, u32 sy, u32 sz)
{
memcpy(&np, np_, sizeof(np));
this->seed = seed;
Expand Down Expand Up @@ -512,7 +512,7 @@ void Noise::allocBuffers()
}


void Noise::setSize(int sx, int sy, int sz)
void Noise::setSize(u32 sx, u32 sy, u32 sz)
{
this->sx = sx;
this->sy = sy;
Expand Down
10 changes: 5 additions & 5 deletions src/noise.h
Expand Up @@ -149,18 +149,18 @@ class Noise {
public:
NoiseParams np;
int seed;
int sx;
int sy;
int sz;
u32 sx;
u32 sy;
u32 sz;
float *noise_buf;
float *gradient_buf;
float *persist_buf;
float *result;

Noise(NoiseParams *np, int seed, int sx, int sy, int sz=1);
Noise(NoiseParams *np, int seed, u32 sx, u32 sy, u32 sz=1);
~Noise();

void setSize(int sx, int sy, int sz=1);
void setSize(u32 sx, u32 sy, u32 sz=1);
void setSpreadFactor(v3f spread);
void setOctaves(int octaves);

Expand Down

0 comments on commit 5d1d7c1

Please sign in to comment.