X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Freference-counted.cpp;h=1060df4b56c9d657216ace980e44190719c7df89;hb=a1fe598c49e7222ec5a01ad62b49026825f595d9;hp=eabc3efa0706d16d07deb53dc69fa3925f554a53;hpb=3394d6066c9092a5444c9273f52cea01e2eaf10f;p=guile-irrlicht.git diff --git a/src/reference-counted.cpp b/src/reference-counted.cpp index eabc3ef..1060df4 100644 --- a/src/reference-counted.cpp +++ b/src/reference-counted.cpp @@ -23,15 +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); - scm_c_export ("drop!", NULL); + DEFINE_GSUBR ("drop!", 1, 0, 0, irr_drop); } SCM @@ -42,6 +43,10 @@ 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",