SQC-15_online #1

Merged
memartel_loc merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
Showing only changes of commit 114c1631a8 - Show all commits

View File

@ -9,6 +9,10 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y
//if (input.fail()) {
OpenSimplexNoise::Noise simplex = OpenSimplexNoise::Noise(seed);
m_blocks.Reset(BTYPE_AIR);
int ratio = 0;
ratio = x * y % 7;
for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // Montagnes
for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) {
@ -47,8 +51,8 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y
}
}
int rnd = rand() % 15;
if (rnd == 4)
//int rnd = rand() % 15;
if (ratio == 1)
for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // structure
for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) {
for (int iy = 0; iy < 14; ++iy) {
@ -57,7 +61,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y
Structure(ix, iy, iz, 2);
}
}
if (rnd == 3)
if (ratio == 3)
for (int ix = 0; ix < CHUNK_SIZE_Z; ++ix) // structure
for (int iz = 0; iz < CHUNK_SIZE_X; ++iz) {
for (int iy = 0; iy < 14; ++iy) {
@ -66,7 +70,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y
Structure(ix, iy, iz, 2);
}
}
if (rnd == 6)
if (ratio == 5)
for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // structure
for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) {
for (int iy = 0; iy < 14; ++iy) {