From fcd3d1bfedbfbe535f406e3db933486bad913ab4 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 10 Dec 2014 22:35:16 +0100 Subject: Added a cWorld:PrepareChunk function. It prepares the chunk - loads or generates it and lights it. The spawn prepare process uses this function. --- src/ChunkDef.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/ChunkDef.h') diff --git a/src/ChunkDef.h b/src/ChunkDef.h index 260aace58..8f1d416ad 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -410,7 +410,7 @@ typedef std::list cChunkCoordsWithBoolList; -/// Interface class used as a callback for operations that involve chunk coords +/** Interface class used as a callback for operations that involve chunk coords */ class cChunkCoordCallback { public: @@ -424,6 +424,27 @@ public: +/** Provides storage for a set of chunk coords together with a callback. +Used for chunk queues that notify about processed items. */ +class cChunkCoordsWithCallback +{ +public: + cChunkCoordsWithCallback(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * a_Callback): + m_ChunkX(a_ChunkX), + m_ChunkZ(a_ChunkZ), + m_Callback(a_Callback) + { + } + + int m_ChunkX; + int m_ChunkZ; + cChunkCoordCallback * m_Callback; +}; + + + + + /** Generic template that can store any kind of data together with a triplet of 3 coords*/ template class cCoordWithData { -- cgit v1.2.3