Merge pull request #36 from A-lex-Ra/main

Quickfix BLOCK_VOID constant
This commit is contained in:
MihailRis
2023-12-05 08:00:36 +03:00
committed by GitHub
+2 -2
View File
@@ -1,7 +1,7 @@
#ifndef SRC_CONSTANTS_H_
#define SRC_CONSTANTS_H_
#include <limits.h>
#include <limits>
#include "typedefs.h"
const int ENGINE_VERSION_MAJOR = 0;
@@ -15,7 +15,7 @@ const int CHUNK_D = 16;
const int CHUNK_VOL = (CHUNK_W * CHUNK_H * CHUNK_D);
/* BLOCK_VOID is block id used to mark non-existing voxel (voxel of missing chunk) */
const blockid_t BLOCK_VOID = UCHAR_MAX;
const blockid_t BLOCK_VOID = std::numeric_limits<blockid_t>::max();
inline uint vox_index(int x, int y, int z, int w=CHUNK_W, int d=CHUNK_D) {
return (y * d + z) * w + x;