X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Fprimitive-types.cpp;fp=src%2Fprimitive-types.cpp;h=0000000000000000000000000000000000000000;hp=eb1d8a592f43dc53bd824e4175f9ad3ef0db6af1;hb=d392bfc335713faab44275624d8fd78139880975;hpb=3bb58c2b45af12c0f9c9eac648e67ac6fa90e104 diff --git a/src/primitive-types.cpp b/src/primitive-types.cpp deleted file mode 100644 index eb1d8a5..0000000 --- a/src/primitive-types.cpp +++ /dev/null @@ -1,86 +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 "primitive-types.h" - -using namespace irr; - -scene::E_PRIMITIVE_TYPE -scm_to_primitive_type (SCM primitive_type) -{ - char* type_name = scm_to_utf8_string (scm_symbol_to_string (primitive_type)); - scene::E_PRIMITIVE_TYPE type; - - if (!strcmp (type_name, "points")) - { - type = scene::EPT_POINTS; - } - else if (!strcmp (type_name, "line-strip")) - { - type = scene::EPT_LINE_STRIP; - } - else if (!strcmp (type_name, "line-loop")) - { - type = scene::EPT_LINE_LOOP; - } - else if (!strcmp (type_name, "lines")) - { - type = scene::EPT_LINES; - } - else if (!strcmp (type_name, "triangle-strip")) - { - type = scene::EPT_TRIANGLE_STRIP; - } - else if (!strcmp (type_name, "triangle-fan")) - { - type = scene::EPT_TRIANGLE_FAN; - } - else if (!strcmp (type_name, "triangles")) - { - type = scene::EPT_TRIANGLES; - } - else if (!strcmp (type_name, "quad-strip")) - { - type = scene::EPT_QUAD_STRIP; - } - else if (!strcmp (type_name, "quads")) - { - type = scene::EPT_QUADS; - } - else if (!strcmp (type_name, "polygon")) - { - type = scene::EPT_POLYGON; - } - else if (!strcmp (type_name, "point-sprites")) - { - type = scene::EPT_POINT_SPRITES; - } - else - { - scm_error (scm_arg_type_key, NULL, "Wrong primitive type: ~S", - scm_list_1 (primitive_type), scm_list_1 (primitive_type)); - } - - free (type_name); - return type; -}