diff options
author | nathan <nathansmith@disroot.org> | 2025-07-06 17:11:56 +0000 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-07-06 17:11:56 +0000 |
commit | 255c938a77f8a73229b1867aadd10f3bf9c44f2e (patch) | |
tree | 7972e9a81d5e1a221bb160c7d82397c80b07fac7 /src/world.h | |
parent | b00544e8f0e77c149d44dca3ab81d97a07fcea3f (diff) | |
download | FindThings-255c938a77f8a73229b1867aadd10f3bf9c44f2e.tar.gz FindThings-255c938a77f8a73229b1867aadd10f3bf9c44f2e.tar.bz2 FindThings-255c938a77f8a73229b1867aadd10f3bf9c44f2e.zip |
Playing around with world generating a bit
Diffstat (limited to 'src/world.h')
-rw-r--r-- | src/world.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/world.h b/src/world.h index 6a214b6..81512d0 100644 --- a/src/world.h +++ b/src/world.h @@ -1,16 +1,33 @@ #include "utils.h" #include "assets.h" +#include "entity.h" // This file is likely completely change. #ifndef WORLD_H #define WORLD_H +// Max entities per node. +#define BVH_MAX 4 + +#define WORLD_ENTITY_MAX 1000 + +// UID for anything in the world.x +typedef int16_t WorldUID; + +typedef struct BVHNode { + BoundingBox box; + WorldUID entities[BVH_MAX]; + struct BVHNode* branch1; + struct BVHNode* branch2; +} BVHNode; + typedef struct { Vector3 size; - Model heightmap; const Image* image; - Color* heightmapColors; + Model heightmap; + Entity entities[WORLD_ENTITY_MAX]; + BVHNode bvh; } World; World createWorld(const Assets* assets); |