summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-14 22:21:03 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-14 22:21:03 +0100
commitb974b1ea59efac4a14a929b917df152d06487201 (patch)
treee23c97a10cfde99c7ddcaa0960e459d8e9caaf16 /source/cChunk.cpp
parentAdded the new ChunkDef.h into VC2010 project (diff)
downloadcuberite-b974b1ea59efac4a14a929b917df152d06487201.tar
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.gz
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.bz2
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.lz
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.xz
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.zst
cuberite-b974b1ea59efac4a14a929b917df152d06487201.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index dad101204..2dde0cc0d 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -735,7 +735,7 @@ void cChunk::CalculateLighting()
-void cChunk::SpreadLight(char* a_LightBuffer)
+void cChunk::SpreadLight(BLOCKTYPE * a_LightBuffer)
{
// Spread the light
for(int x = 0; x < Width; x++) for(int z = 0; z < Width; z++) for(int y = 0; y < Height; y++)
@@ -762,7 +762,7 @@ void cChunk::SpreadLight(char* a_LightBuffer)
// Spread to neighbour chunks X-axis
cChunkPtr LeftChunk = m_ChunkMap->GetChunkNoGen( m_PosX - 1, m_PosY, m_PosZ );
cChunkPtr RightChunk = m_ChunkMap->GetChunkNoGen( m_PosX + 1, m_PosY, m_PosZ );
- char * LeftSky = NULL, *RightSky = NULL;
+ BLOCKTYPE * LeftSky = NULL, *RightSky = NULL;
if (LeftChunk->IsValid())
{
LeftSky = (a_LightBuffer == m_BlockSkyLight) ? LeftChunk->m_BlockSkyLight : LeftChunk->m_BlockLight;
@@ -779,8 +779,8 @@ void cChunk::SpreadLight(char* a_LightBuffer)
int index = MakeIndexNoCheck( 0, y, z );
if( g_BlockSpreadLightFalloff[ m_BlockTypes[index] ] > 0 )
{
- char CurrentLight = GetNibble( a_LightBuffer, 0, y, z );
- char LeftLight = GetNibble( LeftSky, Width-1, y, z );
+ BLOCKTYPE CurrentLight = GetNibble( a_LightBuffer, 0, y, z );
+ BLOCKTYPE LeftLight = GetNibble( LeftSky, Width-1, y, z );
if( LeftLight < CurrentLight-g_BlockSpreadLightFalloff[ m_BlockTypes[index] ] )
{
SetNibble( LeftSky, Width - 1, y, z, MAX(0, CurrentLight-g_BlockSpreadLightFalloff[ m_BlockTypes[index] ]) );
@@ -793,8 +793,8 @@ void cChunk::SpreadLight(char* a_LightBuffer)
int index = MakeIndexNoCheck( Width - 1, y, z );
if( g_BlockSpreadLightFalloff[ m_BlockTypes[index] ] > 0 )
{
- char CurrentLight = GetNibble( a_LightBuffer, Width-1, y, z );
- char RightLight = GetNibble( RightSky, 0, y, z );
+ BLOCKTYPE CurrentLight = GetNibble( a_LightBuffer, Width-1, y, z );
+ BLOCKTYPE RightLight = GetNibble( RightSky, 0, y, z );
if( RightLight < CurrentLight-g_BlockSpreadLightFalloff[ m_BlockTypes[index] ] )
{
SetNibble( RightSky, 0, y, z, MAX(0, CurrentLight-g_BlockSpreadLightFalloff[ m_BlockTypes[index] ]) );
@@ -807,7 +807,7 @@ void cChunk::SpreadLight(char* a_LightBuffer)
// Spread to neighbour chunks Z-axis
cChunkPtr FrontChunk = m_ChunkMap->GetChunkNoGen( m_PosX, m_PosY, m_PosZ - 1 );
cChunkPtr BackChunk = m_ChunkMap->GetChunkNoGen( m_PosX, m_PosY, m_PosZ + 1 );
- char * FrontSky = NULL, * BackSky = NULL;
+ BLOCKTYPE * FrontSky = NULL, * BackSky = NULL;
if (FrontChunk->IsValid())
{
FrontSky = (a_LightBuffer == m_BlockSkyLight) ? FrontChunk->m_BlockSkyLight : FrontChunk->m_BlockLight;