From 3c1c073714e2b0542c9a79db962b6fc9e6ddd352 Mon Sep 17 00:00:00 2001 From: LO1ZB Date: Thu, 28 Aug 2014 11:36:35 +0200 Subject: remove y-coord from chunks --- src/Generating/ChunkGenerator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Generating/ChunkGenerator.h') diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h index 88d71f3f9..17ca8adce 100644 --- a/src/Generating/ChunkGenerator.h +++ b/src/Generating/ChunkGenerator.h @@ -116,7 +116,7 @@ public: void Stop(void); /// Queues the chunk for generation; removes duplicate requests - void QueueGenerateChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ); + void QueueGenerateChunk(int a_ChunkX, int a_ChunkZ); /// Generates the biomes for the specified chunk (directly, not in a separate thread). Used by the world loader if biomes failed loading. void GenerateBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap); @@ -154,7 +154,7 @@ private: // cIsThread override: virtual void Execute(void) override; - void DoGenerate(int a_ChunkX, int a_ChunkY, int a_ChunkZ); + void DoGenerate(int a_ChunkX, int a_ChunkZ); }; -- cgit v1.2.3 From a600e3bdfef5514d28475b6574f1c78ee74ed214 Mon Sep 17 00:00:00 2001 From: LO1ZB Date: Wed, 3 Sep 2014 00:14:51 +0200 Subject: hopefully the last commit for removing y-coord from chunks. :) --- src/Generating/ChunkGenerator.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Generating/ChunkGenerator.h') diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h index 17ca8adce..0737834c9 100644 --- a/src/Generating/ChunkGenerator.h +++ b/src/Generating/ChunkGenerator.h @@ -116,7 +116,7 @@ public: void Stop(void); /// Queues the chunk for generation; removes duplicate requests - void QueueGenerateChunk(int a_ChunkX, int a_ChunkZ); + void QueueGenerateChunk(int a_ChunkX, int a_ChunkZ, bool a_ForceGenerate); /// Generates the biomes for the specified chunk (directly, not in a separate thread). Used by the world loader if biomes failed loading. void GenerateBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap); @@ -137,10 +137,10 @@ private: int m_Seed; - cCriticalSection m_CS; - cChunkCoordsList m_Queue; - cEvent m_Event; ///< Set when an item is added to the queue or the thread should terminate - cEvent m_evtRemoved; ///< Set when an item is removed from the queue + cCriticalSection m_CS; + cChunkCoordWithBoolList m_Queue; + cEvent m_Event; ///< Set when an item is added to the queue or the thread should terminate + cEvent m_evtRemoved; ///< Set when an item is removed from the queue cGenerator * m_Generator; ///< The actual generator engine used to generate chunks -- cgit v1.2.3 From 554f58501733f00f54e88190bc8ad85bfb11b84f Mon Sep 17 00:00:00 2001 From: LO1ZB Date: Wed, 3 Sep 2014 00:28:08 +0200 Subject: re-add the missing "s" too cChunkCoordsWithBoolList --- src/Generating/ChunkGenerator.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Generating/ChunkGenerator.h') diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h index 0737834c9..e880a6766 100644 --- a/src/Generating/ChunkGenerator.h +++ b/src/Generating/ChunkGenerator.h @@ -137,10 +137,10 @@ private: int m_Seed; - cCriticalSection m_CS; - cChunkCoordWithBoolList m_Queue; - cEvent m_Event; ///< Set when an item is added to the queue or the thread should terminate - cEvent m_evtRemoved; ///< Set when an item is removed from the queue + cCriticalSection m_CS; + cChunkCoordsWithBoolList m_Queue; + cEvent m_Event; ///< Set when an item is added to the queue or the thread should terminate + cEvent m_evtRemoved; ///< Set when an item is removed from the queue cGenerator * m_Generator; ///< The actual generator engine used to generate chunks -- cgit v1.2.3 From 137b021d26d47b11fc27df1c0b52f408f0ef5257 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 5 Sep 2014 22:16:48 +0200 Subject: Rewritten chunk status to specify whether the chunk is in queue. This fixes #1370. --- src/Generating/ChunkGenerator.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Generating/ChunkGenerator.h') diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h index e880a6766..190d9e616 100644 --- a/src/Generating/ChunkGenerator.h +++ b/src/Generating/ChunkGenerator.h @@ -106,6 +106,10 @@ public: If this callback returns false, the chunk is not generated. */ virtual bool HasChunkAnyClients(int a_ChunkX, int a_ChunkZ) = 0; + + /** Called to check whether the specified chunk is in the queued state. + Currently used only in Debug-mode asserts. */ + virtual bool IsChunkQueued(int a_ChunkX, int a_ChunkZ) = 0; } ; -- cgit v1.2.3