summaryrefslogtreecommitdiff
path: root/src/systems/terrain.h
diff options
context:
space:
mode:
authoromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
committeromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
commitf74cf52946f4e569a26bc81105537b40be95c2c7 (patch)
tree1d000367350d0e28eb7cfbc800286a0ed30a4e6c /src/systems/terrain.h
parentfedba7ff68924ff50022405fc9103a5acf7013fe (diff)
wip: big makeover
Diffstat (limited to 'src/systems/terrain.h')
-rw-r--r--src/systems/terrain.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/systems/terrain.h b/src/systems/terrain.h
index a65ecec..890cb90 100644
--- a/src/systems/terrain.h
+++ b/src/systems/terrain.h
@@ -19,7 +19,7 @@ Future:
#include "str.h"
typedef struct Heightmap {
- str8 filepath;
+ Str8 filepath;
u32x2 size;
void* image_data;
bool is_uploaded;
@@ -32,9 +32,13 @@ PUB bool Terrain_Init(Terrain_Storage* storage);
PUB void Terrain_Shutdown(Terrain_Storage* storage);
PUB void Terrain_Run(Terrain_Storage* storage); // NOTE: For now it renders directly to main framebuffer
-PUB Heightmap Heightmap_FromImage(str8 filepath);
+/** @brief Sets the active heightmap to be rendered and collided against. */
+PUB Heightmap Terrain_LoadHeightmap(Heightmap hmap, bool free_on_upload);
+PUB Heightmap Heightmap_FromImage(Str8 filepath);
PUB Heightmap Heightmap_FromPerlin(/* TODO: perlin noise generation parameters */);
+PUB bool Terrain_IsActive(); // checks whether we have a loaded heightmap and it's being rendered
+
// --- Internal
// TODO: void terrain_system_render_hmap(renderer* rend, terrain_state* state);