aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.h
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2025-07-29 01:18:25 +0000
committernathan <nathansmith@disroot.org>2025-07-29 01:18:25 +0000
commit2aae6dcb8e4ab7261f4449e99b7724e665db3e3b (patch)
treef39df5db9d4bbaaf4ae9fc4bde26ab790e8be985 /src/world.h
parented3b4610cf773de562b3c55f452fbf7bf5b12b00 (diff)
downloadFindThings-2aae6dcb8e4ab7261f4449e99b7724e665db3e3b.tar.gz
FindThings-2aae6dcb8e4ab7261f4449e99b7724e665db3e3b.tar.bz2
FindThings-2aae6dcb8e4ab7261f4449e99b7724e665db3e3b.zip
Cant focus lmao
Diffstat (limited to 'src/world.h')
-rw-r--r--src/world.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/world.h b/src/world.h
index 606ae46..3b1ca4d 100644
--- a/src/world.h
+++ b/src/world.h
@@ -5,24 +5,33 @@
#ifndef WORLD_H
#define WORLD_H
-#define BVH_MAX 4 // Max entities per node.
-#define BVH_MAX_BRANCH_COUNT 8
-#define BVH_BOX_MAX 100.0
-
#define WORLD_ENTITY_MAX 1500
-#define WORLD_SIZE (Vector3){1000.0, 100.0, 1000.0}
-#define WORLD_IMAGE_WIDTH 100
-#define WORLD_IMAGE_HEIGHT 100
-#define WORLD_IMAGE_SCALE 5.0
#define WORLD_PLANT_COUNT 500
+#define WORLD_PLACE_COUNT 1
+
+#define WORLD_SIZE (Vector3){4096.0, 256.0, 4096.0}
+#define WORLD_IMAGE_WIDTH 512
+#define WORLD_IMAGE_HEIGHT 512
+#define WORLD_IMAGE_SCALE 5.0
#define WORLD_GROUND_COLOR GREEN
-#define WORLD_GROUND_BLUR 4
+#define WORLD_GROUND_BLUR 2
+#define WORLD_GROUND_CONTRAST -30
+#define WORLD_GROUND_IMAGE_NOISE 0.3
+
+#define BVH_MAX 4 // Max entities per node.
+#define BVH_MAX_BRANCH_COUNT 8
+#define BVH_BOX_MAX 100.0
// UID for anything in the world.
typedef int16_t WorldUID;
typedef int Seed;
+// Places.
+enum {
+ PLACE_POND
+};
+
typedef struct BVHNode {
BoundingBox box;
Vector3 position;
@@ -33,10 +42,11 @@ typedef struct BVHNode {
struct World {
Vector3 size;
- Texture texture;
+ Texture heightmapTexture;
Model heightmap;
Entity entities[WORLD_ENTITY_MAX];
BVHNode bvh;
+ WorldUID places[WORLD_PLACE_COUNT];
int bvhDebugSelect;
};