X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Ffile-archive.cpp;fp=src%2Ffile-archive.cpp;h=0000000000000000000000000000000000000000;hp=751da745e95647230d3fc074c019e53a4b75d33c;hb=d392bfc335713faab44275624d8fd78139880975;hpb=3bb58c2b45af12c0f9c9eac648e67ac6fa90e104 diff --git a/src/file-archive.cpp b/src/file-archive.cpp deleted file mode 100644 index 751da74..0000000 --- a/src/file-archive.cpp +++ /dev/null @@ -1,74 +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 "file-archive.h" - -using namespace irr; - -io::E_FILE_ARCHIVE_TYPE -scm_to_file_archive_type (SCM file_archive_type) -{ - char* type_name = scm_to_utf8_string (scm_symbol_to_string (file_archive_type)); - io::E_FILE_ARCHIVE_TYPE type; - - if (!strcmp (type_name, "zip")) - { - type = io::EFAT_ZIP; - } - else if (!strcmp (type_name, "gzip")) - { - type = io::EFAT_GZIP; - } - else if (!strcmp (type_name, "folder")) - { - type = io::EFAT_FOLDER; - } - else if (!strcmp (type_name, "pak")) - { - type = io::EFAT_PAK; - } - else if (!strcmp (type_name, "npk")) - { - type = io::EFAT_NPK; - } - else if (!strcmp (type_name, "tar")) - { - type = io::EFAT_TAR; - } - else if (!strcmp (type_name, "wad")) - { - type = io::EFAT_WAD; - } - else if (!strcmp (type_name, "unknown")) - { - type = io::EFAT_UNKNOWN; - } - else - { - scm_error (scm_arg_type_key, NULL, "Wrong file archive type: ~S", - scm_list_1 (file_archive_type), scm_list_1 (file_archive_type)); - } - - free (type_name); - return type; -}