Woups. Erratas.

This commit is contained in:
MarcEricMartel 2023-08-28 16:23:34 -04:00
parent 8666aceb39
commit 2f8a5893f0
4 changed files with 22 additions and 10 deletions

View File

@ -36,8 +36,8 @@
#endif
#ifdef NDEBUG
#define WORLD_SIZE_X 64
#define WORLD_SIZE_Y 64
#define WORLD_SIZE_X 128
#define WORLD_SIZE_Y 128
#define FRAMES_RENDER_CHUNKS 1
#define FRAMES_UPDATE_CHUNKS 1
@ -56,9 +56,14 @@
typedef uint8_t BlockType;
enum BLOCK_TYPE { BTYPE_AIR, BTYPE_DIRT, BTYPE_GRASS, BTYPE_METAL, BTYPE_ICE, BTYPE_LAST };
#define TEXTURE_PATH "../SQCSim2021/media/textures/"
#define SHADER_PATH "../SQCSim2021/media/shaders/"
#define AUDIO_PATH "../SQCSim2021/media/audio/"
#define CHUNK_PATH "../SQCSim2021/media/chunks/"
//#define TEXTURE_PATH "../SQCSim2021/media/textures/"
//#define SHADER_PATH "../SQCSim2021/media/shaders/"
//#define AUDIO_PATH "../SQCSim2021/media/audio/"
//#define CHUNK_PATH "../SQCSim2021/media/chunks/"
#define TEXTURE_PATH "./media/textures/"
#define SHADER_PATH "./media/shaders/"
#define AUDIO_PATH "./media/audio/"
#define CHUNK_PATH "./media/chunks/"
#endif // DEFINE_H__

View File

@ -4,6 +4,6 @@
int main() {
Engine engine;
engine.SetMaxFps(10000);
engine.Start("Syndicat Quebecois de la Construction Simulator 2021", 1920, 1080, true);
engine.SetMaxFps(60);
engine.Start("Syndicat Quebecois de la Construction Simulator 2023", 640, 480, false);
}

View File

@ -454,7 +454,14 @@ void World::UpdateWorld(Player& player, BlockInfo* blockinfo[BTYPE_LAST]) {
threads = 0;
while (!m_tbDeleted.empty() && !frameDelete) {
int del = THREADS_DELETE_CHUNKS;
while (!m_tbDeleted.empty() && del--) { // Moins rapide que le bout en dessous, mais -beaucoup- plus stable.
m_tbDeleted.back()->FlushVBO();
m_tbDeleted.back()->~Chunk();
m_tbDeleted.pop_back();
}
/*while (!m_tbDeleted.empty() && !frameDelete) {
if (m_tbDeleted.back()) {
m_tbDeleted.back()->FlushVBO();
delThList[threads] =
@ -464,7 +471,7 @@ void World::UpdateWorld(Player& player, BlockInfo* blockinfo[BTYPE_LAST]) {
if (++threads > THREADS_DELETE_CHUNKS) frameDelete = FRAMES_DELETE_CHUNKS;
}
else m_tbDeleted.pop_back();
}
}*/
for (int x = 0; x < threads; ++x) {
delThList[x].wait();