X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Fanimated-mesh-md2.cpp;fp=src%2Fanimated-mesh-md2.cpp;h=0000000000000000000000000000000000000000;hp=844665fad7dc0969e16185b4d6c70a095825c5ed;hb=d392bfc335713faab44275624d8fd78139880975;hpb=3bb58c2b45af12c0f9c9eac648e67ac6fa90e104 diff --git a/src/animated-mesh-md2.cpp b/src/animated-mesh-md2.cpp deleted file mode 100644 index 844665f..0000000 --- a/src/animated-mesh-md2.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - This file is part of guile-irrlicht. - - guile-irrlicht is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - guile-irrlicht is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with guile-irrlicht. If not, see - . -*/ - -#include -#include -#include "animated-mesh-md2.h" - -using namespace irr; - -scene::EMD2_ANIMATION_TYPE -scm_to_md2_animation_type (SCM md2_animation_type) -{ - char* type_name = scm_to_utf8_string (scm_symbol_to_string (md2_animation_type)); - scene::EMD2_ANIMATION_TYPE type; - - if (!strcmp (type_name, "stand")) - { - type = scene::EMAT_STAND; - } - else if (!strcmp (type_name, "run")) - { - type = scene::EMAT_RUN; - } - else if (!strcmp (type_name, "attack")) - { - type = scene::EMAT_ATTACK; - } - else if (!strcmp (type_name, "pain-a")) - { - type = scene::EMAT_PAIN_A; - } - else if (!strcmp (type_name, "pain-b")) - { - type = scene::EMAT_PAIN_B; - } - else if (!strcmp (type_name, "pain-c")) - { - type = scene::EMAT_PAIN_C; - } - else if (!strcmp (type_name, "jump")) - { - type = scene::EMAT_JUMP; - } - else if (!strcmp (type_name, "flip")) - { - type = scene::EMAT_FLIP; - } - else if (!strcmp (type_name, "salute")) - { - type = scene::EMAT_SALUTE; - } - else if (!strcmp (type_name, "fallback")) - { - type = scene::EMAT_FALLBACK; - } - else if (!strcmp (type_name, "wave")) - { - type = scene::EMAT_WAVE; - } - else if (!strcmp (type_name, "point")) - { - type = scene::EMAT_POINT; - } - else if (!strcmp (type_name, "crouch-stand")) - { - type = scene::EMAT_CROUCH_STAND; - } - else if (!strcmp (type_name, "crouch-walk")) - { - type = scene::EMAT_CROUCH_WALK; - } - else if (!strcmp (type_name, "crouch-attack")) - { - type = scene::EMAT_CROUCH_ATTACK; - } - else if (!strcmp (type_name, "crouch-pain")) - { - type = scene::EMAT_CROUCH_PAIN; - } - else if (!strcmp (type_name, "crouch-death")) - { - type = scene::EMAT_CROUCH_DEATH; - } - else if (!strcmp (type_name, "death-fallback")) - { - type = scene::EMAT_DEATH_FALLBACK; - } - else if (!strcmp (type_name, "death-fallforward")) - { - type = scene::EMAT_DEATH_FALLFORWARD; - } - else if (!strcmp (type_name, "death-fallbackslow")) - { - type = scene::EMAT_DEATH_FALLBACKSLOW; - } - else if (!strcmp (type_name, "boom")) - { - type = scene::EMAT_BOOM; - } - else - { - scm_error (scm_arg_type_key, NULL, "Wrong MD2 animation type: ~S", - scm_list_1 (md2_animation_type), scm_list_1 (md2_animation_type)); - } - - free (type_name); - return type; -}