summaryrefslogtreecommitdiffstats
path: root/libdimension/scene.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-30 15:07:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-30 15:07:35 -0400
commit77f880207d4fc37f82299d78d04be13623d9da0a (patch)
tree1da61bc0b17e803a14ef42b068b089a262302f53 /libdimension/scene.c
parent2b546944a1f0c5646936f2ab047345769e3a2471 (diff)
downloaddimension-77f880207d4fc37f82299d78d04be13623d9da0a.tar.xz
scene: Use pool.
Diffstat (limited to 'libdimension/scene.c')
-rw-r--r--libdimension/scene.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libdimension/scene.c b/libdimension/scene.c
index 9f8104b..2d25602 100644
--- a/libdimension/scene.c
+++ b/libdimension/scene.c
@@ -28,9 +28,9 @@
/* Allocate an empty scene */
dmnsn_scene *
-dmnsn_new_scene(void)
+dmnsn_new_scene(dmnsn_pool *pool)
{
- dmnsn_scene *scene = DMNSN_MALLOC(dmnsn_scene);
+ dmnsn_scene *scene = DMNSN_PALLOC(pool, dmnsn_scene);
scene->background = NULL;
scene->default_texture = dmnsn_new_texture();
@@ -71,7 +71,6 @@ dmnsn_delete_scene(dmnsn_scene *scene)
dmnsn_delete_interior(scene->default_interior);
dmnsn_delete_texture(scene->default_texture);
dmnsn_delete_pigment(scene->background);
- dmnsn_free(scene);
}
}