diff --git a/SQCSim2021/chunk.cpp b/SQCSim2021/chunk.cpp index 776fc74..eae6805 100644 --- a/SQCSim2021/chunk.cpp +++ b/SQCSim2021/chunk.cpp @@ -2,11 +2,11 @@ #include "world.h" Chunk::Chunk(unsigned int x, unsigned int y) : m_posX(x), m_posY(y) { - std::ostringstream pos; // Vérifie l'existence d'un fichier .chunk avec sa position. - pos << CHUNK_PATH << x << '_' << y << ".chunk"; - std::ifstream input(pos.str(), std::fstream::binary); + //std::ostringstream pos; // Vérifie l'existence d'un fichier .chunk avec sa position. + //pos << CHUNK_PATH << x << '_' << y << ".chunk"; + //std::ifstream input(pos.str(), std::fstream::binary); - if (input.fail()) { + //if (input.fail()) { OpenSimplexNoise::Noise simplex = OpenSimplexNoise::Noise(SEED); m_blocks.Reset(BTYPE_AIR); @@ -61,7 +61,7 @@ Chunk::Chunk(unsigned int x, unsigned int y) : m_posX(x), m_posY(y) { // break; // } // } - } + /* } else { input.seekg(0, std::ios_base::end); int size = input.tellg(); @@ -75,11 +75,11 @@ Chunk::Chunk(unsigned int x, unsigned int y) : m_posX(x), m_posY(y) { for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) for (int iy = 0; iy < CHUNK_SIZE_Y; ++iy) m_blocks.Set(ix, iy, iz, data[ix + (iz * CHUNK_SIZE_X) + (iy * CHUNK_SIZE_Z * CHUNK_SIZE_X)]); - } + }*/ } Chunk::~Chunk() { - if (m_isModified) { + /*if (m_isModified) { char data[CHUNK_SIZE_X * CHUNK_SIZE_Y * CHUNK_SIZE_Z]; for (int x = 0; x < CHUNK_SIZE_X; ++x) @@ -93,7 +93,7 @@ Chunk::~Chunk() { std::ofstream output(pos.str(), std::fstream::binary); output.write(data, sizeof(data)); output.close(); - } + }*/ } void Chunk::RemoveBlock(int x, int y, int z, World* world) { diff --git a/SQCSim2021/define.h b/SQCSim2021/define.h index 891b6a8..49a39ec 100644 --- a/SQCSim2021/define.h +++ b/SQCSim2021/define.h @@ -36,8 +36,8 @@ #endif #ifdef NDEBUG -#define WORLD_SIZE_X 128 -#define WORLD_SIZE_Y 128 +#define WORLD_SIZE_X 8 +#define WORLD_SIZE_Y 8 #define FRAMES_RENDER_CHUNKS 1 #define FRAMES_UPDATE_CHUNKS 1 diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index 89ca926..256a61e 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -43,7 +43,7 @@ void Engine::Init() { m_skybox.Init(0.2f); // Objet de musique! - //m_audio.ToggleMusicState(); + m_audio.ToggleMusicState(); // Array pour les balles. for (int x = 0; x < MAX_BULLETS; ++x) diff --git a/SQCSim2021/world.cpp b/SQCSim2021/world.cpp index ce0d576..57b2bbe 100644 --- a/SQCSim2021/world.cpp +++ b/SQCSim2021/world.cpp @@ -131,7 +131,7 @@ void World::Update(int& rendercount, Bullet* bullets[MAX_BULLETS], Player& playe atlas.Bind(); RenderWorld(rendercount, player, world, shader); UpdateWorld(player, blockinfo); - TransposeWorld(player, bullets); + //TransposeWorld(player, bullets); shader.Disable(); glStencilFunc(GL_GREATER, 1, 0xFF); }