summaryrefslogtreecommitdiff
path: root/src/world.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.h')
-rw-r--r--src/world.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/world.h b/src/world.h
new file mode 100644
index 0000000..5be1cf2
--- /dev/null
+++ b/src/world.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "chunk.h"
+#include <stdint.h>
+#define WORLD_LENGTH 32
+#define WORLD_WIDTH 32
+struct world {
+ struct chunk* chunks[WORLD_WIDTH][WORLD_LENGTH];
+ int32_t seed;
+};
+
+int world_init(int32_t seed);
+int world_save(int32_t seed);
+int world_get_chunk(struct world* world, vec2 coord, struct chunk* chunk);