]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/device.cpp
fixing bugs
[guile-irrlicht.git] / src / device.cpp
index 10ba8ad6c2e67086e5dc27ddcc76e685c3916b1e..63db119696fe5513bdd2c94238b903ad77db948f 100644 (file)
@@ -62,6 +62,15 @@ IrrlichtDevice_getCursorControl (SCM device)
 }
 
 
+SCM
+IrrlichtDevice_getFileSystem (SCM device)
+{
+  io::IFileSystem* file_system =
+    ((IrrlichtDevice*)scm_to_pointer (device))->getFileSystem ();
+  return scm_from_pointer ((void*)file_system, NULL);
+}
+
+
 SCM
 IrrlichtDevice_getGUIEnvironment (SCM device)
 {
@@ -158,31 +167,20 @@ extern "C" {
   void
   init_device (void)
   {
-    init_device_type ();
-    DEFINE_GSUBR ("createDevice_IEventReceiver", 7, 0, 0,
-                  createDevice<IEventReceiver*>);
-    DEFINE_GSUBR ("IrrlichtDevice_getCursorControl", 1, 0, 0,
-                  IrrlichtDevice_getCursorControl);
-    DEFINE_GSUBR ("IrrlichtDevice_getGUIEnvironment", 1, 0, 0,
-                  IrrlichtDevice_getGUIEnvironment);
-    DEFINE_GSUBR ("IrrlichtDevice_getSceneManager", 1, 0, 0,
-                  IrrlichtDevice_getSceneManager);
-    DEFINE_GSUBR ("IrrlichtDevice_getTimer", 1, 0, 0,
-                  IrrlichtDevice_getTimer);
-    DEFINE_GSUBR ("IrrlichtDevice_getVideoDriver", 1, 0, 0,
-                  IrrlichtDevice_getVideoDriver);
-    DEFINE_GSUBR ("IrrlichtDevice_isWindowActive", 1, 0, 0,
-                  IrrlichtDevice_isWindowActive);
-    DEFINE_GSUBR ("IrrlichtDevice_run", 1, 0, 0,
-                  IrrlichtDevice_run);
+    DEFINE_GSUBR ("createDevice_IEventReceiver", 7, 0, 0, createDevice<IEventReceiver*>);
+    DEFINE_GSUBR ("IrrlichtDevice_getCursorControl", 1, 0, 0, IrrlichtDevice_getCursorControl);
+    DEFINE_GSUBR ("IrrlichtDevice_getFileSystem", 1, 0, 0, IrrlichtDevice_getFileSystem);
+    DEFINE_GSUBR ("IrrlichtDevice_getGUIEnvironment", 1, 0, 0, IrrlichtDevice_getGUIEnvironment);
+    DEFINE_GSUBR ("IrrlichtDevice_getSceneManager", 1, 0, 0, IrrlichtDevice_getSceneManager);
+    DEFINE_GSUBR ("IrrlichtDevice_getTimer", 1, 0, 0, IrrlichtDevice_getTimer);
+    DEFINE_GSUBR ("IrrlichtDevice_getVideoDriver", 1, 0, 0, IrrlichtDevice_getVideoDriver);
+    DEFINE_GSUBR ("IrrlichtDevice_isWindowActive", 1, 0, 0, IrrlichtDevice_isWindowActive);
+    DEFINE_GSUBR ("IrrlichtDevice_run", 1, 0, 0, IrrlichtDevice_run);
     DEFINE_GSUBR ("IrrlichtDevice_setEventReceiver_IEventReceiver", 2, 0, 0,
                   IrrlichtDevice_setEventReceiver<IEventReceiver*>);
-    DEFINE_GSUBR ("IrrlichtDevice_setResizable", 2, 0, 0,
-                  IrrlichtDevice_setResizable);
-    DEFINE_GSUBR ("IrrlichtDevice_setWindowCaption", 2, 0, 0,
-                  IrrlichtDevice_setWindowCaption);
-    DEFINE_GSUBR ("IrrlichtDevice_yield", 1, 0, 0,
-                  IrrlichtDevice_yield);
+    DEFINE_GSUBR ("IrrlichtDevice_setResizable", 2, 0, 0, IrrlichtDevice_setResizable);
+    DEFINE_GSUBR ("IrrlichtDevice_setWindowCaption", 2, 0, 0, IrrlichtDevice_setWindowCaption);
+    DEFINE_GSUBR ("IrrlichtDevice_yield", 1, 0, 0, IrrlichtDevice_yield);
   }
 
 }