all was broken :\

This commit is contained in:
2026-04-27 23:43:36 +02:00
parent 0645905fc6
commit de72a9a3b7
20 changed files with 141 additions and 127 deletions

View File

@@ -33,18 +33,18 @@ public:
unsigned char* blockIds = chunk->getBlockData();
DataLayer& blockData = chunk->data;
const int setSize = LEVEL_HEIGHT / 8;
const int setShift = 4; // power of LEVEL_HEIGHT / 8
const int setSize = LevelConstants::LEVEL_HEIGHT / 8;
const int setShift = 4; // power of LevelConstants::LEVEL_HEIGHT / 8
chunkData.Reset();
for (int i = 0; i < CHUNK_COLUMNS; i++)
for (int i = 0; i < LevelConstants::CHUNK_COLUMNS; i++)
{
unsigned char updateBits = chunk->updateMap[i];
chunkData.Write(updateBits);
if (updateBits > 0)
{
int colDataPosition = (i % CHUNK_WIDTH) << 11 | (i / CHUNK_WIDTH) << 7;
int colDataPosition = (i % LevelConstants::CHUNK_WIDTH) << 11 | (i / LevelConstants::CHUNK_WIDTH) << 7;
for (int set = 0; set < 8; set++)
{