X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Fmaterial-types.cpp;fp=src%2Fmaterial-types.cpp;h=0000000000000000000000000000000000000000;hp=eddb4cfe8210fe214f1b7020d9023d1f3361e186;hb=d392bfc335713faab44275624d8fd78139880975;hpb=3bb58c2b45af12c0f9c9eac648e67ac6fa90e104 diff --git a/src/material-types.cpp b/src/material-types.cpp deleted file mode 100644 index eddb4cf..0000000 --- a/src/material-types.cpp +++ /dev/null @@ -1,138 +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 "material-types.h" - -using namespace irr; - -video::E_MATERIAL_TYPE -scm_to_material_type (SCM material_type) -{ - char* type_name = scm_to_utf8_string (scm_symbol_to_string (material_type)); - video::E_MATERIAL_TYPE type; - - if (!strcmp (type_name, "solid")) - { - type = video::EMT_SOLID; - } - else if (!strcmp (type_name, "solid-2-layer")) - { - type = video::EMT_SOLID_2_LAYER; - } - else if (!strcmp (type_name, "lightmap")) - { - type = video::EMT_LIGHTMAP; - } - else if (!strcmp (type_name, "lightmap-add")) - { - type = video::EMT_LIGHTMAP_ADD; - } - else if (!strcmp (type_name, "lightmap-m2")) - { - type = video::EMT_LIGHTMAP_M2; - } - else if (!strcmp (type_name, "lightmap-m4")) - { - type = video::EMT_LIGHTMAP_M4; - } - else if (!strcmp (type_name, "lightmap-lighting")) - { - type = video::EMT_LIGHTMAP_LIGHTING; - } - else if (!strcmp (type_name, "lightmap-lighting-m2")) - { - type = video::EMT_LIGHTMAP_LIGHTING_M2; - } - else if (!strcmp (type_name, "lightmap-lighting-m4")) - { - type = video::EMT_LIGHTMAP_LIGHTING_M4; - } - else if (!strcmp (type_name, "detail-map")) - { - type = video::EMT_DETAIL_MAP; - } - else if (!strcmp (type_name, "sphere-map")) - { - type = video::EMT_SPHERE_MAP; - } - else if (!strcmp (type_name, "reflection-2-layer")) - { - type = video::EMT_REFLECTION_2_LAYER; - } - else if (!strcmp (type_name, "transparent-add-color")) - { - type = video::EMT_TRANSPARENT_ADD_COLOR; - } - else if (!strcmp (type_name, "transparent-alpha-channel")) - { - type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; - } - else if (!strcmp (type_name, "transparent-alpha-channel-ref")) - { - type = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; - } - else if (!strcmp (type_name, "transparent-vertex-alpha")) - { - type = video::EMT_TRANSPARENT_VERTEX_ALPHA; - } - else if (!strcmp (type_name, "transparent-reflection-2-layer")) - { - type = video::EMT_TRANSPARENT_REFLECTION_2_LAYER; - } - else if (!strcmp (type_name, "normal-map-solid")) - { - type = video::EMT_NORMAL_MAP_SOLID; - } - else if (!strcmp (type_name, "normal-map-transparent-add-color")) - { - type = video::EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR; - } - else if (!strcmp (type_name, "normal-map-transparent-vertex-alpha")) - { - type = video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA; - } - else if (!strcmp (type_name, "parallax-map-solid")) - { - type = video::EMT_PARALLAX_MAP_SOLID; - } - else if (!strcmp (type_name, "parallax-map-transparent-add-color")) - { - type = video::EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR; - } - else if (!strcmp (type_name, "parallax-map-transparent-vertex-alpha")) - { - type = video::EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA; - } - else if (!strcmp (type_name, "onetexture-blend")) - { - type = video::EMT_ONETEXTURE_BLEND; - } - else - { - scm_error (scm_arg_type_key, NULL, "Wrong material type: ~S", - scm_list_1 (material_type), scm_list_1 (material_type)); - } - - free (type_name); - return type; -}