summaryrefslogtreecommitdiff
path: root/include/worldgen.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/worldgen.h')
-rw-r--r--include/worldgen.h24
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