From 440b292c39162284a447b34d3a692143af9fbc87 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 30 Oct 2025 17:21:22 -0700 Subject: - Replace SceneCamera with Camera. - Remove backpointer from scene types to node to decouple underlying types from the scene graph. --- src/memory.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/memory.h') diff --git a/src/memory.h b/src/memory.h index 366c6e4..624216d 100644 --- a/src/memory.h +++ b/src/memory.h @@ -3,21 +3,23 @@ #include "scene/types.h" +typedef struct Camera Camera; + /// Initialize scene memory. /// /// The scene memory guarantees that every object maps to an index different /// than 0. This way, 0 can be used as a special index to denote "no value". -void scene_mem_init(); +void scene_mem_init(void); /// Destroy the scene memory and all allocated objects. -void scene_mem_destroy(); +void scene_mem_destroy(void); #define NAMED_INDEX(name) name##_idx #define DECL_MEMORY(name, type) \ typedef struct type type; \ /* xyz* mem_alloc_xyz() */ \ - type* mem_alloc_##name(); \ + type* mem_alloc_##name(void); \ /* mem_free_xyz(xyz**) */ \ void mem_free_##name(type**); \ /* xyz* mem_get_xyz(xyz_idx); */ \ @@ -27,7 +29,7 @@ void scene_mem_destroy(); DECL_MEMORY(anima, Anima) DECL_MEMORY(animation, Animation) -DECL_MEMORY(camera, SceneCamera) +DECL_MEMORY(camera, Camera) DECL_MEMORY(light, Light) DECL_MEMORY(material, Material) DECL_MEMORY(mesh, Mesh) -- cgit v1.2.3