Added Flecs, license comments and created the project outline.

This commit is contained in:
Lorenzo Torres 2025-11-01 17:32:01 +01:00
parent d716b6cea7
commit 7be714b81f
16 changed files with 127682 additions and 5 deletions

21
world/chunk.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef CHUNK_H
#define CHUNK_H
#include "block.h"
#define CHUNK_SIZE 16
#define CHUNK_INDEX(x, y, z) (CHUNK_SIZE * CHUNK_SIZE * (x) + CHUNK_SIZE * (y) + (z))
typedef usize chunk_position[2];
/*
* Chunk are a group of blocks with
* size 16x16x16. The world is composed
* of infinite chunks in each axis.
*/
struct chunk {
block_id blocks[CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE];
chunk_position position;
};
#endif