From ca6ef58b1ee8521e4b940ee4883dee714960e413 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Fri, 5 Feb 2016 23:45:45 +0200 Subject: Bulk clearing of whitespace --- src/ChunkStay.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/ChunkStay.h') diff --git a/src/ChunkStay.h b/src/ChunkStay.h index 6572a3a98..a7c038a9c 100644 --- a/src/ChunkStay.h +++ b/src/ChunkStay.h @@ -36,42 +36,42 @@ class cChunkStay { public: cChunkStay(void); - + /** Deletes the object. Note that this calls Clear(), which means that the ChunkStay needs to be disabled. */ virtual ~cChunkStay(); - + /** Clears all the chunks that have been added. To be used only while the ChunkStay object is not enabled. */ void Clear(void); - + /** Adds a chunk to be locked from unloading. To be used only while the ChunkStay object is not enabled. */ void Add(int a_ChunkX, int a_ChunkZ); - + /** Releases the chunk so that it's no longer locked from unloading. To be used only while the ChunkStay object is not enabled. */ void Remove(int a_ChunkX, int a_ChunkZ); - + /** Enables the ChunkStay on the specified chunkmap, causing it to load and generate chunks. All the contained chunks are queued for loading / generating. */ void Enable (cChunkMap & a_ChunkMap); - + /** Disables the ChunkStay, the chunks are released and the ChunkStay object can be edited with Add() and Remove() again */ virtual void Disable(void); - + /** Returns all the chunks that should be kept */ const cChunkCoordsVector & GetChunks(void) const { return m_Chunks; } - + /** Called when a specific chunk become available. */ virtual void OnChunkAvailable(int a_ChunkX, int a_ChunkZ) = 0; - + /** Caled once all of the contained chunks are available. If returns true, the ChunkStay is automatically disabled by the ChunkMap; if it returns false, the ChunkStay is kept. */ virtual bool OnAllChunksAvailable(void) = 0; - + /** Called by the ChunkMap when the ChunkStay is disabled. The object may choose to delete itself. */ virtual void OnDisabled(void) = 0; - + protected: friend class cChunkMap; @@ -80,14 +80,14 @@ protected: /** The chunkmap where the object is enabled. Valid only after call to Enable() and before Disable(). */ cChunkMap * m_ChunkMap; - + /** The list of chunks to lock from unloading. */ cChunkCoordsVector m_Chunks; - + /** The chunks that still need loading */ cChunkCoordsVector m_OutstandingChunks; - - + + /** Called by cChunkMap when a chunk is available, checks m_NumLoaded and triggers the appropriate callbacks. May be called for chunks outside this ChunkStay. Returns true if the ChunkStay is to be automatically disabled by the ChunkMap; returns false to keep the ChunkStay. */ -- cgit v1.2.3