summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPluginInterface.h6
-rw-r--r--src/Item.h2
-rw-r--r--src/LightingThread.h6
-rw-r--r--src/World.h6
4 files changed, 13 insertions, 7 deletions
diff --git a/src/Blocks/BlockPluginInterface.h b/src/Blocks/BlockPluginInterface.h
index 7428c9a7a..3a36c40b1 100644
--- a/src/Blocks/BlockPluginInterface.h
+++ b/src/Blocks/BlockPluginInterface.h
@@ -1,8 +1,14 @@
#pragma once
+/** This interface is used to decouple block handlers from the cPluginManager dependancy through cWorld.
+The block handlers call this interface, which is then implemented by the specific classes that
+the caller provides.
+*/
class cBlockPluginInterface
{
public:
+ virtual ~cBlockPluginInterface() {}
+
virtual bool CallHookBlockToPickups(cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) = 0;
};
diff --git a/src/Item.h b/src/Item.h
index 4bdfb12dd..910ecb382 100644
--- a/src/Item.h
+++ b/src/Item.h
@@ -209,7 +209,7 @@ public:
void Add (const cItem & a_Item) {push_back(a_Item); }
void Delete(int a_Idx);
void Clear (void) {clear(); }
- int Size (void) {return size(); }
+ size_t Size (void) {return size(); }
void Set (int a_Idx, short a_ItemType, char a_ItemCount, short a_ItemDamage);
void Add (short a_ItemType, char a_ItemCount, short a_ItemDamage)
diff --git a/src/LightingThread.h b/src/LightingThread.h
index 198f27248..3209ad9b2 100644
--- a/src/LightingThread.h
+++ b/src/LightingThread.h
@@ -160,14 +160,14 @@ protected:
inline void PropagateLight(
NIBBLETYPE * a_Light,
- int a_SrcIdx, int a_DstIdx,
+ unsigned int a_SrcIdx, unsigned int a_DstIdx,
int & a_NumSeedsOut, unsigned char * a_IsSeedOut, unsigned int * a_SeedIdxOut
)
{
ASSERT(a_SrcIdx >= 0);
- ASSERT(a_SrcIdx < (int)ARRAYCOUNT(m_SkyLight));
+ ASSERT(a_SrcIdx < ARRAYCOUNT(m_SkyLight));
ASSERT(a_DstIdx >= 0);
- ASSERT(a_DstIdx < (int)ARRAYCOUNT(m_BlockTypes));
+ ASSERT(a_DstIdx < ARRAYCOUNT(m_BlockTypes));
if (a_Light[a_SrcIdx] <= a_Light[a_DstIdx] + cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx]))
{
diff --git a/src/World.h b/src/World.h
index bb2eb0b21..b3ee94a27 100644
--- a/src/World.h
+++ b/src/World.h
@@ -646,9 +646,9 @@ public:
// Various queues length queries (cannot be const, they lock their CS):
inline int GetGeneratorQueueLength (void) { return m_Generator.GetQueueLength(); } // tolua_export
- inline int GetLightingQueueLength (void) { return m_Lighting.GetQueueLength(); } // tolua_export
- inline int GetStorageLoadQueueLength(void) { return m_Storage.GetLoadQueueLength(); } // tolua_export
- inline int GetStorageSaveQueueLength(void) { return m_Storage.GetSaveQueueLength(); } // tolua_export
+ inline size_t GetLightingQueueLength (void) { return m_Lighting.GetQueueLength(); } // tolua_export
+ inline size_t GetStorageLoadQueueLength(void) { return m_Storage.GetLoadQueueLength(); } // tolua_export
+ inline size_t GetStorageSaveQueueLength(void) { return m_Storage.GetSaveQueueLength(); } // tolua_export
void InitializeSpawn(void);