X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Freference-counted.cpp;h=1060df4b56c9d657216ace980e44190719c7df89;hb=480766c8e4e7272c21f69adf24b706aee20a5dba;hp=85634d4560dce04011010fd2f103655a859f2201;hpb=2806f03eafc48ec9ef02a3dc2d74133eaf11ccc1;p=guile-irrlicht.git diff --git a/src/reference-counted.cpp b/src/reference-counted.cpp index 85634d4..1060df4 100644 --- a/src/reference-counted.cpp +++ b/src/reference-counted.cpp @@ -23,14 +23,16 @@ #include #include "device.h" +#include "gsubr.h" #include "reference-counted.h" +#include "scene-node-animator.h" extern "C" { void init_reference_counted (void) { - scm_c_define_gsubr ("drop!", 1, 0, 0, (scm_t_subr)irr_drop); + DEFINE_GSUBR ("drop!", 1, 0, 0, irr_drop); } SCM @@ -41,6 +43,15 @@ extern "C" { { result = unwrap_device (wrapped_obj)->drop (); } + else if (scene_node_animator_p (wrapped_obj)) + { + result = unwrap_scene_node_animator (wrapped_obj)->drop (); + } + else + { + scm_error (scm_arg_type_key, NULL, "Object cannot be dropped: ~S", + scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj)); + } return scm_from_bool (result); }