Quickfix BLOCK_VOID constant

This commit is contained in:
Ara 2023-12-05 08:19:39 +06:00
parent 20ff8f71bf
commit 1f5f2e5fb2

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;