diff --git a/cubes.h b/cubes.h index 4242247..4241531 100644 --- a/cubes.h +++ b/cubes.h @@ -6,7 +6,7 @@ #define CHUNK_RADIUS_H 4 // 8 #define CHUNK_RADIUS_V 4 // 4 -#define TEXT_GAP_H 1 / 3.0 +#define TEXT_GAP_H 1 / 6.0 #define TEXT_GAP_V 1 / 6.0 #define CHUNK_DIAMETER_H (CHUNK_RADIUS_H * 2 + 1) diff --git a/noise.c b/noise.c index 7a271d0..1e0c3a7 100644 --- a/noise.c +++ b/noise.c @@ -61,12 +61,15 @@ struct chunk noise_chunk(struct chunk chunk, int x, int y, int z) { int z3 = z2 + z * CHUNK_LENGTH; double hp = noise_perlin(x3, z3, 128.0, default_seed); hp = ((hp > 0.0) ? -1.0 : 1.0) * (pow(fabs(hp), 0.7)); - hp *= 32.0; - int h = hp + 32; + hp *= 128.0; + int h = hp + 64; for (int y2 = 0; y2 < CHUNK_LENGTH; y2++) { int y3 = y2 + y * CHUNK_LENGTH; - chunk.blocks[c] = (y3 < h) ? (((int)((hp + 64.0) * 2.98) % 3) + 1) : 0; + chunk.blocks[c] = 0; + if (y3 < h) chunk.blocks[c] = 4; + if (y3 < h - 1) chunk.blocks[c] = 5; + if (y3 < h - 2) chunk.blocks[c] = 6; c++; } } diff --git a/noise.h b/noise.h index e3beb15..5e12347 100644 --- a/noise.h +++ b/noise.h @@ -3,10 +3,5 @@ #define V_NOISE_H #include "cubes.h" #include -double noise_interpolate(double a0, double a1, double w); -int noise_hash(int a, int b); -struct v2f noise_perlin_grad(int x, int y, int seed); -double noise_perlin_dot(double ix, double iy, double x, double y, int seed); -double noise_perlin(double x, double y, double s, int seed); struct chunk noise_chunk(struct chunk chunk, int x, int y, int z); #endif \ No newline at end of file diff --git a/test.png b/test.png index a53d88b..a6a41c8 100644 Binary files a/test.png and b/test.png differ