X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fanimated-mesh-scene-node.cpp;h=87fac47396e3f898d2920c930995e010c0899c7e;hb=8ff6816b98af584ca7670ad964d5f13f84e18044;hp=be46b3ab60bfb4aa047f1dbebbdf27cb8fed8046;hpb=2806f03eafc48ec9ef02a3dc2d74133eaf11ccc1;p=guile-irrlicht.git diff --git a/src/animated-mesh-scene-node.cpp b/src/animated-mesh-scene-node.cpp index be46b3a..87fac47 100644 --- a/src/animated-mesh-scene-node.cpp +++ b/src/animated-mesh-scene-node.cpp @@ -21,6 +21,7 @@ #include #include +#include "animated-mesh-md2.h" #include "animated-mesh-scene-node.h" #include "wrapped.h" @@ -30,10 +31,21 @@ extern "C" { init_animated_mesh_scene_node (void) { init_animated_mesh_scene_node_type (); + scm_c_define_gsubr ("set-md2-animation!", 2, 0, 0, (scm_t_subr)irr_scene_setMD2Animation); } DEFINE_WRAPPED_TYPE (irr::scene::IAnimatedMeshSceneNode*, "animated-mesh-scene-node", init_animated_mesh_scene_node_type, animated_mesh_scene_node_p, wrap_animated_mesh_scene_node, unwrap_animated_mesh_scene_node); + SCM + irr_scene_setMD2Animation (SCM wrappedAnimatedMeshSceneNode, + SCM anim) + { + irr::scene::IAnimatedMeshSceneNode* node = + unwrap_animated_mesh_scene_node (wrappedAnimatedMeshSceneNode); + bool result = node->setMD2Animation (scm_to_md2_animation_type (anim)); + return scm_from_bool (result); + } + }