X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fanimated-mesh-scene-node.cpp;h=ceb5ec201cbe4000d39728ed9ecfaabe582067fa;hb=3394d6066c9092a5444c9273f52cea01e2eaf10f;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..ceb5ec2 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,22 @@ 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); + scm_c_export ("set-md2-animation!", NULL); } 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); + } + }