aboutsummaryrefslogtreecommitdiff
path: root/src/scene
diff options
context:
space:
mode:
Diffstat (limited to 'src/scene')
-rw-r--r--src/scene/object_impl.h5
-rw-r--r--src/scene/scene_memory.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/scene/object_impl.h b/src/scene/object_impl.h
index 88f8e31..ead93f1 100644
--- a/src/scene/object_impl.h
+++ b/src/scene/object_impl.h
@@ -21,6 +21,7 @@ typedef struct MeshLink {
21typedef struct SceneObject { 21typedef struct SceneObject {
22 mesh_link_idx mesh_link; /// First MeshLink in the list. 22 mesh_link_idx mesh_link; /// First MeshLink in the list.
23 skeleton_idx skeleton; /// 0 for static objects. 23 skeleton_idx skeleton; /// 0 for static objects.
24 node_idx parent; /// Parent SceneNode. 24 // TODO: Can we just store node indices in nodes, not the contained object?
25 aabb3 box; 25 node_idx parent; /// Parent SceneNode.
26 aabb3 box;
26} SceneObject; 27} SceneObject;
diff --git a/src/scene/scene_memory.c b/src/scene/scene_memory.c
index d1d81a9..91880bb 100644
--- a/src/scene/scene_memory.c
+++ b/src/scene/scene_memory.c
@@ -73,7 +73,7 @@ void scene_mem_init() {
73 mempool_make(&mem.skeletons); 73 mempool_make(&mem.skeletons);
74 74
75 // Allocate dummy objects at index 0 to guarantee that no objects allocated by 75 // Allocate dummy objects at index 0 to guarantee that no objects allocated by
76 // the caller map to index 0. 76 // the caller map to index 0. This allows 0 to be used as a sentinel.
77 ALLOC_DUMMY(&mem.animas); 77 ALLOC_DUMMY(&mem.animas);
78 ALLOC_DUMMY(&mem.animations); 78 ALLOC_DUMMY(&mem.animations);
79 ALLOC_DUMMY(&mem.cameras); 79 ALLOC_DUMMY(&mem.cameras);