SQC-15_online #1

Merged
memartel merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
Showing only changes of commit b2c73c930e - 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()) { //if (input.fail()) {
OpenSimplexNoise::Noise simplex = OpenSimplexNoise::Noise(seed); OpenSimplexNoise::Noise simplex = OpenSimplexNoise::Noise(seed);
m_blocks.Reset(BTYPE_AIR); m_blocks.Reset(BTYPE_AIR);
int ratio = 0;
ratio = x * y % 7;
for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // Montagnes for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // Montagnes
for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) { 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; //int rnd = rand() % 15;
if (rnd == 4) if (ratio == 1)
for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // structure for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // structure
for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) { for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) {
for (int iy = 0; iy < 14; ++iy) { for (int iy = 0; iy < 14; ++iy) {
@@ -57,16 +61,16 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y
Structure(ix, iy, iz, 2); Structure(ix, iy, iz, 2);
} }
} }
if (rnd == 3) if (ratio == 3)
for (int ix = 0; ix < CHUNK_SIZE_Z; ++ix) // structure for (int ix = 0; ix < CHUNK_SIZE_Z; ++ix) // structure
for (int iz = 0; iz < CHUNK_SIZE_X; ++iz) { for (int iz = 0; iz < CHUNK_SIZE_X; ++iz) {
for (int iy = 0; iy < 14; ++iy) { for (int iy = 0; iy < 14; ++iy) {
if (iz == 4) if (iz == 4)
if (GetBlock(ix, iy, iz) == BTYPE_AIR) if (GetBlock(ix, iy, iz) == BTYPE_AIR)
Structure(ix, iy, iz, 2); Structure(ix, iy, iz, 1);
} }
} }
if (rnd == 6) if (ratio == 5)
for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // structure for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // structure
for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) { for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) {
for (int iy = 0; iy < 14; ++iy) { for (int iy = 0; iy < 14; ++iy) {