#include <libguile.h>
#include "driver-types.h"
-extern "C" {
-
- irr::video::E_DRIVER_TYPE
- scm_to_driver_type (SCM driver_type)
- {
- char* driverType = scm_to_utf8_stringn (scm_symbol_to_string (driver_type), NULL);
- if (!strcmp (driverType, "null"))
- {
- return irr::video::EDT_NULL;
- }
- else if (!strcmp (driverType, "software"))
- {
- return irr::video::EDT_SOFTWARE;
- }
- else if (!strcmp (driverType, "burnings"))
- {
- return irr::video::EDT_BURNINGSVIDEO;
- }
- else if (!strcmp (driverType, "direct3d8"))
- {
- return irr::video::EDT_DIRECT3D8;
- }
- else if (!strcmp (driverType, "direct3d9"))
- {
- return irr::video::EDT_DIRECT3D9;
- }
- else if (!strcmp (driverType, "opengl"))
- {
- return irr::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));
- }
- }
+using namespace irr;
+
+
+video::E_DRIVER_TYPE
+scm_to_driver_type (SCM driver_type)
+{
+ char* driverType = scm_to_utf8_stringn (scm_symbol_to_string (driver_type), NULL);
+ if (!strcmp (driverType, "null"))
+ {
+ return video::EDT_NULL;
+ }
+ else if (!strcmp (driverType, "software"))
+ {
+ return video::EDT_SOFTWARE;
+ }
+ else if (!strcmp (driverType, "burnings"))
+ {
+ return video::EDT_BURNINGSVIDEO;
+ }
+ else if (!strcmp (driverType, "direct3d8"))
+ {
+ return video::EDT_DIRECT3D8;
+ }
+ else if (!strcmp (driverType, "direct3d9"))
+ {
+ return video::EDT_DIRECT3D9;
+ }
+ else if (!strcmp (driverType, "opengl"))
+ {
+ return 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));
+ }
}