]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/driver-types.cpp
Use SWIG for wrapping C++
[guile-irrlicht.git] / src / driver-types.cpp
diff --git a/src/driver-types.cpp b/src/driver-types.cpp
deleted file mode 100644 (file)
index fef8547..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
-
-   Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
-
-   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
-   <http://www.gnu.org/licenses/>.
-*/
-
-#include <irrlicht/irrlicht.h>
-#include <libguile.h>
-#include "driver-types.h"
-
-using namespace irr;
-
-video::E_DRIVER_TYPE
-scm_to_driver_type (SCM driver_type)
-{
-  char* type_name = scm_to_utf8_string (scm_symbol_to_string (driver_type));
-  video::E_DRIVER_TYPE type;
-
-  if (!strcmp (type_name, "null"))
-    {
-      type = video::EDT_NULL;
-    }
-  else if (!strcmp (type_name, "software"))
-    {
-      type = video::EDT_SOFTWARE;
-    }
-  else if (!strcmp (type_name, "burnings"))
-    {
-      type = video::EDT_BURNINGSVIDEO;
-    }
-  else if (!strcmp (type_name, "direct3d8"))
-    {
-      type = video::EDT_DIRECT3D8;
-    }
-  else if (!strcmp (type_name, "direct3d9"))
-    {
-      type = video::EDT_DIRECT3D9;
-    }
-  else if (!strcmp (type_name, "opengl"))
-    {
-      type = video::EDT_OPENGL;
-    }
-  else
-    {
-      scm_error (scm_arg_type_key, NULL, "Wrong driver type: ~S",
-                 scm_list_1 (driver_type), scm_list_1 (driver_type));
-    }
-
-  free (type_name);
-  return type;
-}