From 6b4dc860466ce4794b346533162291046a6ee96c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 16 Jul 2009 01:16:33 +0000 Subject: New C++ wrapper for dmnsn_texture*. --- libdimension/object.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libdimension/object.c') 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 /* 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() -- cgit v1.2.3