1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-01 23:25:09 +02:00

optimize world generation

This commit is contained in:
p2r3
2025-08-30 16:56:00 +03:00
parent 4a7f9554a8
commit 759399dac8
2 changed files with 145 additions and 74 deletions

View File

@@ -21,10 +21,17 @@ typedef struct {
uint8_t biome;
} ChunkAnchor;
typedef struct {
short x;
uint8_t y;
short z;
uint8_t variant;
} ChunkFeature;
uint32_t getChunkHash (short x, short z);
uint8_t getChunkBiome (short x, short z);
int getHeightAtFromHash (int rx, int rz, int _x, int _z, uint32_t chunk_hash, uint8_t biome);
int getHeightAt (int x, int z);
uint8_t getHeightAtFromHash (int rx, int rz, int _x, int _z, uint32_t chunk_hash, uint8_t biome);
uint8_t getHeightAt (int x, int z);
uint8_t getTerrainAt (int x, int y, int z, ChunkAnchor anchor);
uint8_t getBlockAt (int x, int y, int z);