summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-16 23:25:53 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-16 23:25:53 -0600
commitd374841194f24c7cb1cdc52fc631fcb2982af358 (patch)
treefa92504fb50c6a4195317dad653ed3ab72fa6f27 /libdimension/dimension
parent719fea8f97320814835408fad6ce2a4647674c11 (diff)
downloaddimension-d374841194f24c7cb1cdc52fc631fcb2982af358.tar.xz
Add a refcount to objects.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/object.h3
-rw-r--r--libdimension/dimension/scene.h5
2 files changed, 8 insertions, 0 deletions
diff --git a/libdimension/dimension/object.h b/libdimension/dimension/object.h
index ea8a6a8..1e10c3f 100644
--- a/libdimension/dimension/object.h
+++ b/libdimension/dimension/object.h
@@ -90,6 +90,9 @@ struct dmnsn_object {
/** Generic pointer for object info. */
void *ptr;
+
+ /** @internal Reference count. */
+ dmnsn_refcount *refcount;
};
/**
diff --git a/libdimension/dimension/scene.h b/libdimension/dimension/scene.h
index 2d9840b..c182d85 100644
--- a/libdimension/dimension/scene.h
+++ b/libdimension/dimension/scene.h
@@ -91,3 +91,8 @@ void dmnsn_delete_scene(dmnsn_scene *scene);
* @param[in,out] scene The scene to initalize.
*/
void dmnsn_initialize_scene(dmnsn_scene *scene);
+
+/**
+ * Add an object to a scene.
+ */
+void dmnsn_scene_add_object(dmnsn_scene *scene, dmnsn_object *object);