diff options
Diffstat (limited to 'src/systems/terrain.h')
-rw-r--r-- | src/systems/terrain.h | 8 |
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); |