using namespace irr;
-template <typename TEventReceiver>
SCM
-createDevice (SCM device_type,
- SCM window_size,
- SCM bits,
- SCM fullscreen,
- SCM stencilbuffer,
- SCM vsync,
- SCM receiver)
+irr_createDevice (SCM device_type,
+ SCM window_size,
+ SCM bits,
+ SCM fullscreen,
+ SCM stencilbuffer,
+ SCM vsync,
+ SCM receiver)
{
IrrlichtDevice* device =
createDevice (scm_to_driver_type (device_type),
scm_to_bool (fullscreen),
scm_to_bool (stencilbuffer),
scm_to_bool (vsync),
- (TEventReceiver)scm_to_pointer (receiver));
+ (IEventReceiver*)scm_to_pointer (receiver));
return scm_from_pointer ((void*)device, NULL);
}
}
+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)
{
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", 7, 0, 0, irr_createDevice);
+ 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);
}
}