summaryrefslogtreecommitdiff
path: root/library.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library.cpp')
-rw-r--r--library.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/library.cpp b/library.cpp
index 38bbf48..2386c0b 100644
--- a/library.cpp
+++ b/library.cpp
@@ -20,6 +20,14 @@ public:
}
} init_object;
+
+void instance_destroy(Object *obj){
+ assert(global.objects.find(obj)!=global.objects.end());
+ obj->destroy();
+ global.objects_todelete.push_back(obj);
+}
+
+
static void draw_text(int x,int y,const char *s,size_t len){
if(currentFont!=nullptr){
sharedSfText.setFont(currentFont->sf_font);