diff options
| author | 0undefined <oscar@nelin.dk> | 2025-03-27 15:11:20 +0000 |
|---|---|---|
| committer | 0undefined <oscar@nelin.dk> | 2025-04-09 09:42:38 +0000 |
| commit | ccc93530fe9f1578e2bf98071631db3459ba6bb0 (patch) | |
| tree | 8b9e7ed55dee221c40df971df6371da90bc58c85 /include/worldgen.h | |
| parent | 0651aeb8f2c5d02a5dc23ac0254721c2a9609161 (diff) | |
Add some worldgen
Diffstat (limited to 'include/worldgen.h')
| -rw-r--r-- | include/worldgen.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/worldgen.h b/include/worldgen.h new file mode 100644 index 0000000..5e3601e --- /dev/null +++ b/include/worldgen.h @@ -0,0 +1,24 @@ +#ifndef STATES_WORLDGEN_H +#define STATES_WORLDGEN_H +#ifdef __cplusplus +extern "C" { +#endif + +#include <engine/core/types.h> + +// first 4 bits for material type +#define BLOCK_none 0 +#define BLOCK_grass 1 +#define BLOCK_rock 2 + +// next 4 bits for shape type +#define SHAPE_filled (1 << 4) +#define SHAPE_slope (2 << 4) + +void gen_terrain(u8 *world, usize height, usize length, usize width); + + +#ifdef __cplusplus +} +#endif +#endif |
