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

move headers to separate directory

This commit is contained in:
p2r3
2025-08-20 13:42:56 +03:00
parent 837ce1e463
commit 5f3dcc56f9
8 changed files with 2 additions and 2 deletions

27
include/worldgen.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef H_WORLDGEN
#define H_WORLDGEN
#include <stdint.h>
// For best performance, CHUNK_SIZE should be a power of 2
#define CHUNK_SIZE 8
// Terrain low point - should start a bit below sea level for rivers/lakes
#define TERRAIN_BASE_HEIGHT 60
// Center point of cave generation
#define CAVE_BASE_DEPTH 24
typedef struct {
short x;
short z;
uint32_t hash;
} ChunkAnchor;
uint32_t getChunkHash (short x, short z);
int getHeightAt (int rx, int rz, int _x, int _z, uint32_t chunk_hash);
uint8_t getTerrainAt (int x, int y, int z, ChunkAnchor anchor);
uint8_t getBlockAt (int x, int y, int z);
extern uint8_t chunk_section[4096];
void buildChunkSection (int x, int y, int z);
#endif