diff options
author | kwolekr <kwolekr@minetest.net> | 2015-05-15 13:21:23 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-05-15 16:20:30 -0400 |
commit | 5d1d7c17ea234a01af3a16f31bc0e363ffd150ba (patch) | |
tree | 6e708efa18475d1334bde38f42d7a73e1629a322 | |
parent | eaef678e0b298632ef03957c7bdd8ebfe839b9d4 (diff) | |
download | minetest-5d1d7c17ea234a01af3a16f31bc0e363ffd150ba.tar.gz minetest-5d1d7c17ea234a01af3a16f31bc0e363ffd150ba.tar.bz2 minetest-5d1d7c17ea234a01af3a16f31bc0e363ffd150ba.zip |
Noise: Make buffer size parameters unsigned
-rw-r--r-- | src/noise.cpp | 4 | ||||
-rw-r--r-- | src/noise.h | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/noise.cpp b/src/noise.cpp index 7a23819c8..f5d985fff 100644 --- a/src/noise.cpp +++ b/src/noise.cpp @@ -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; @@ -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; diff --git a/src/noise.h b/src/noise.h index 5757cbc99..0e4252dd4 100644 --- a/src/noise.h +++ b/src/noise.h @@ -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); |