diff options
Diffstat (limited to 'src/world.h')
-rw-r--r-- | src/world.h | 30 |
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; }; |