summaryrefslogtreecommitdiff
path: root/world.h
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2025-06-05 03:43:25 +0200
committerOrangerot <purple@orangerot.dev>2025-06-05 03:43:25 +0200
commitfe42371c8c5b80b174372de846fafb7590fc3ff1 (patch)
treea4ef72b8fea9634d8374bf420865507878086a33 /world.h
parentaf5ee99682db1ca8c3d82810ff90499d5c040f61 (diff)
refactor: move terrain generation and drawing to own file
Diffstat (limited to 'world.h')
-rw-r--r--world.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/world.h b/world.h
new file mode 100644
index 0000000..2740887
--- /dev/null
+++ b/world.h
@@ -0,0 +1,21 @@
+#include <raylib.h>
+#include "assets.h"
+#include <stddef.h>
+
+#ifndef WORLD_H
+#define WORLD_H
+
+struct World {
+ Image map;
+ Texture map_texture;
+ Color *map_data;
+ size_t size;
+ Model floor;
+ Model wall;
+ struct Decoration {} decoration[256];
+};
+
+void gen_terrain(struct World *world);
+void draw_world(struct World *world);
+#endif
+