From d73cdba1f66a92f011ac881b581595c0959139ef Mon Sep 17 00:00:00 2001 From: andrew Date: Sat, 1 Mar 2014 21:34:19 +0200 Subject: g_BlockXXX => cBlockInfo::XXX --- src/LightingThread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/LightingThread.h') diff --git a/src/LightingThread.h b/src/LightingThread.h index 72d561348..198f27248 100644 --- a/src/LightingThread.h +++ b/src/LightingThread.h @@ -169,13 +169,13 @@ protected: ASSERT(a_DstIdx >= 0); ASSERT(a_DstIdx < (int)ARRAYCOUNT(m_BlockTypes)); - if (a_Light[a_SrcIdx] <= a_Light[a_DstIdx] + g_BlockSpreadLightFalloff[m_BlockTypes[a_DstIdx]]) + if (a_Light[a_SrcIdx] <= a_Light[a_DstIdx] + cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx])) { // We're not offering more light than the dest block already has return; } - a_Light[a_DstIdx] = a_Light[a_SrcIdx] - g_BlockSpreadLightFalloff[m_BlockTypes[a_DstIdx]]; + a_Light[a_DstIdx] = a_Light[a_SrcIdx] - cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx]); if (!a_IsSeedOut[a_DstIdx]) { a_IsSeedOut[a_DstIdx] = true; -- cgit v1.2.3 From a5c0600e6c69c329fcafc2f9138b9439cf5f65ce Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 30 Mar 2014 20:02:30 +0200 Subject: Fixed a few clang warnings. --- src/LightingThread.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/LightingThread.h') 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])) { -- cgit v1.2.3 From 1b78bef4b355c84ee86688eb4f802e5f8a8ccd78 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 2 Apr 2014 17:57:14 +0200 Subject: Removed unneeded asserts. --- src/LightingThread.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/LightingThread.h') diff --git a/src/LightingThread.h b/src/LightingThread.h index 3209ad9b2..770ae809f 100644 --- a/src/LightingThread.h +++ b/src/LightingThread.h @@ -164,9 +164,7 @@ protected: int & a_NumSeedsOut, unsigned char * a_IsSeedOut, unsigned int * a_SeedIdxOut ) { - ASSERT(a_SrcIdx >= 0); ASSERT(a_SrcIdx < ARRAYCOUNT(m_SkyLight)); - ASSERT(a_DstIdx >= 0); ASSERT(a_DstIdx < ARRAYCOUNT(m_BlockTypes)); if (a_Light[a_SrcIdx] <= a_Light[a_DstIdx] + cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx])) -- cgit v1.2.3