mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-10 12:28:38 +00:00
Use BYTE Win Typedef instead of byte typedef from Minecraft.World
This commit is contained in:
@@ -143,7 +143,7 @@ CompressedTileStorage::CompressedTileStorage(bool isEmpty)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CompressedTileStorage::isRenderChunkEmpty(int y) // y == 0, 16, 32... 112 (representing a 16 byte range)
|
||||
bool CompressedTileStorage::isRenderChunkEmpty(int y) // y == 0, 16, 32... 112 (representing a 16 BYTE range)
|
||||
{
|
||||
int block;
|
||||
unsigned char *localIndicesAndData = indicesAndData;
|
||||
@@ -170,7 +170,7 @@ bool CompressedTileStorage::isSameAs(CompressedTileStorage *other)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to compare as much as we can in 64-byte chunks (8 groups of 8 bytes)
|
||||
// Attempt to compare as much as we can in 64-BYTE chunks (8 groups of 8 bytes)
|
||||
int quickCount = allocatedSize / 64;
|
||||
int64_t *pOld = (int64_t *)indicesAndData;
|
||||
int64_t *pNew = (int64_t *)other->indicesAndData;
|
||||
@@ -199,7 +199,7 @@ bool CompressedTileStorage::isSameAs(CompressedTileStorage *other)
|
||||
pNew += 8;
|
||||
}
|
||||
|
||||
// Now test anything remaining just byte at a time
|
||||
// Now test anything remaining just BYTE at a time
|
||||
unsigned char *pucOld = (unsigned char *)pOld;
|
||||
unsigned char *pucNew = (unsigned char *)pNew;
|
||||
for( int i = 0; i < allocatedSize - (quickCount * 64); i++ )
|
||||
@@ -378,7 +378,7 @@ void CompressedTileStorage::setData(byteArray dataIn, unsigned int inOffset)
|
||||
else
|
||||
{
|
||||
_blockIndices[i] = INDEX_TYPE_0_OR_8_BIT;
|
||||
memToAlloc = ( memToAlloc + 3 ) & 0xfffc; // Make sure we are 4-byte aligned for 8-bit storage
|
||||
memToAlloc = ( memToAlloc + 3 ) & 0xfffc; // Make sure we are 4-BYTE aligned for 8-bit storage
|
||||
memToAlloc += 64;
|
||||
// type8++;
|
||||
}
|
||||
@@ -1005,7 +1005,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/)
|
||||
else
|
||||
{
|
||||
_blockIndices[i] = INDEX_TYPE_0_OR_8_BIT;
|
||||
memToAlloc = ( memToAlloc + 3 ) & 0xfffc; // Make sure we are 4-byte aligned for 8-bit storage
|
||||
memToAlloc = ( memToAlloc + 3 ) & 0xfffc; // Make sure we are 4-BYTE aligned for 8-bit storage
|
||||
memToAlloc += 64;
|
||||
}
|
||||
}
|
||||
@@ -1046,7 +1046,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/)
|
||||
memToAlloc += 48;
|
||||
break;
|
||||
case INDEX_TYPE_0_OR_8_BIT:
|
||||
memToAlloc = ( memToAlloc + 3 ) & 0xfffc; // Make sure we are 4-byte aligned for 8-bit storage
|
||||
memToAlloc = ( memToAlloc + 3 ) & 0xfffc; // Make sure we are 4-BYTE aligned for 8-bit storage
|
||||
memToAlloc += 64;
|
||||
break;
|
||||
// Note that INDEX_TYPE_8_BIT|INDEX_TYPE_0_BIT_FLAG not in here as it doesn't need any further allocation
|
||||
@@ -1178,7 +1178,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/)
|
||||
}
|
||||
else
|
||||
{
|
||||
usDataOffset = (usDataOffset + 3 ) & 0xfffc; // Make sure offset is 4 byte aligned
|
||||
usDataOffset = (usDataOffset + 3 ) & 0xfffc; // Make sure offset is 4 BYTE aligned
|
||||
XMemCpy( pucData + usDataOffset, unpacked_data, 64 );
|
||||
newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT;
|
||||
usDataOffset += 64;
|
||||
|
||||
Reference in New Issue
Block a user