Time is better.

This commit is contained in:
2025-11-09 18:32:33 -06:00
parent b9ec6523d6
commit 943e775364
17 changed files with 293 additions and 146 deletions

View File

@@ -16,4 +16,18 @@
typedef struct chunk_s {
int16_t x, y, z;
tile_t tiles[CHUNK_TILE_COUNT];
} chunk_t;
} chunk_t;
/**
* Gets the tile index for a tile position within a chunk.
*
* @param relativeTileX The X coordinate of the tile within the chunk.
* @param relativeTileY The Y coordinate of the tile within the chunk.
* @param relativeTileZ The Z coordinate of the tile within the chunk.
* @return The tile index within the chunk.
*/
uint32_t chunkGetTileIndex(
const uint8_t relativeTileX,
const uint8_t relativeTileY,
const uint8_t relativeTileZ
);