mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
New world format, fixes
This commit is contained in:
parent
0c65b13f4e
commit
0cf8382e95
21 changed files with 350 additions and 173 deletions
|
|
@ -6,9 +6,12 @@
|
|||
#define CHUNK_W 16
|
||||
#define CHUNK_H 256
|
||||
#define CHUNK_D 16
|
||||
|
||||
/* Chunk volume (count of voxels per Chunk) */
|
||||
#define CHUNK_VOL (CHUNK_W * CHUNK_H * CHUNK_D)
|
||||
|
||||
#define BLOCK_VOID (blockid_t)((2 << (sizeof(blockid_t)*8)) - 1)
|
||||
/* BLOCK_VOID is block id used to mark non-existing voxel (voxel of missing chunk) */
|
||||
#define BLOCK_VOID (blockid_t)((2 << (sizeof(blockid_t)*CHAR_BIT)) - 1)
|
||||
|
||||
inline uint vox_index(int x, int y, int z, int w, int d) {
|
||||
return (y * d + z) * w + x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue