mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
Introduced Content, ContentIndices, no more integer ids hardcoded, common refactor
This commit is contained in:
parent
f2f9343737
commit
3b03464d27
35 changed files with 472 additions and 279 deletions
|
|
@ -14,7 +14,7 @@
|
|||
/* 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) {
|
||||
inline uint vox_index(int x, int y, int z, int w=CHUNK_W, int d=CHUNK_D) {
|
||||
return (y * d + z) * w + x;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue