diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-16 01:16:33 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-16 01:16:33 +0000 |
commit | 6b4dc860466ce4794b346533162291046a6ee96c (patch) | |
tree | 2ce3f61711ea6a5688462f605a4e5913e1cb7a4e /libdimension/object.c | |
parent | c3619e541564d5133a3ccdaeb79588d37d46a3db (diff) | |
download | dimension-6b4dc860466ce4794b346533162291046a6ee96c.tar.xz |
New C++ wrapper for dmnsn_texture*.
Diffstat (limited to 'libdimension/object.c')
-rw-r--r-- | libdimension/object.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libdimension/object.c b/libdimension/object.c index 6b248ff..f10d53d 100644 --- a/libdimension/object.c +++ b/libdimension/object.c @@ -21,6 +21,24 @@ #include "dimension.h" #include <stdlib.h> /* For malloc */ +/* Allocate an intersection - cannot fail */ +dmnsn_intersection * +dmnsn_new_intersection() +{ + dmnsn_intersection *intersection = malloc(sizeof(dmnsn_intersection)); + if (!intersection) { + dmnsn_error(DMNSN_SEVERITY_HIGH, "Couldn't allocate an intersection object."); + } + return intersection; +} + +/* Free an intersection */ +void +dmnsn_delete_intersection(dmnsn_intersection *intersection) +{ + free(intersection); +} + /* Allocate a dummy object */ dmnsn_object * dmnsn_new_object() |