#include "device.h"
#include "dimension2d.h"
#include "driver-types.h"
-#include "gui-environment.h"
-#include "scene-manager.h"
-#include "video-driver.h"
#include "wchar.h"
#include "wrapped.h"
{
init_device_type ();
scm_c_define_gsubr ("create-device", 7, 0, 0, (scm_t_subr)irr_createDevice);
- scm_c_define_gsubr ("get-gui-environment", 1, 0, 0, (scm_t_subr)irr_getGUIEnvironment);
- scm_c_define_gsubr ("get-scene-manager", 1, 0, 0, (scm_t_subr)irr_getSceneManager);
- scm_c_define_gsubr ("get-video-driver", 1, 0, 0, (scm_t_subr)irr_getVideoDriver);
scm_c_define_gsubr ("set-window-caption!", 2, 0, 0, (scm_t_subr)irr_setWindowCaption);
}
return wrap_device (device);
}
- SCM
- irr_getGUIEnvironment (SCM wrapped_device)
- {
- irr::IrrlichtDevice* device = unwrap_device (wrapped_device);
- irr::gui::IGUIEnvironment* gui_environment = device->getGUIEnvironment ();
- return wrap_gui_environment (gui_environment);
- }
-
- SCM
- irr_getSceneManager (SCM wrapped_device)
- {
- irr::IrrlichtDevice* device = unwrap_device (wrapped_device);
- irr::scene::ISceneManager* scene_manager = device->getSceneManager ();
- return wrap_scene_manager (scene_manager);
- }
-
- SCM
- irr_getVideoDriver (SCM wrapped_device)
- {
- irr::IrrlichtDevice* device = unwrap_device (wrapped_device);
- irr::video::IVideoDriver* driver = device->getVideoDriver ();
- return wrap_video_driver (driver);
- }
-
SCM
irr_setWindowCaption (SCM wrapped_device,
SCM text)
SCM vsync,
SCM receiver);
- SCM
- irr_getGUIEnvironment (SCM wrapped_device);
-
- SCM
- irr_getSceneManager (SCM wrapped_device);
-
- SCM
- irr_getVideoDriver (SCM wrapped_device);
-
SCM
irr_setWindowCaption (SCM wrapped_device,
SCM text);
#include <irrlicht/irrlicht.h>
#include <libguile.h>
+#include "device.h"
#include "gui-element.h"
#include "gui-environment.h"
#include "gui-static-text.h"
{
init_gui_environment_type ();
scm_c_define_gsubr ("add-static-text!", 8, 0, 0, (scm_t_subr)irr_gui_addStaticText);
+ scm_c_define_gsubr ("get-gui-environment", 1, 0, 0, (scm_t_subr)irr_getGUIEnvironment);
}
DEFINE_WRAPPED_TYPE (irr::gui::IGUIEnvironment*, "gui-environment",
init_gui_environment_type, gui_environment_p,
wrap_gui_environment, unwrap_gui_environment);
+ SCM
+ irr_getGUIEnvironment (SCM wrapped_obj)
+ {
+ irr::gui::IGUIEnvironment* gui_environment;
+ if (device_p (wrapped_obj))
+ {
+ gui_environment = unwrap_device (wrapped_obj)->getGUIEnvironment ();
+ }
+ else
+ {
+ scm_error (scm_arg_type_key, NULL, "Cannot get GUI environment from object: ~S",
+ scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
+ }
+ return wrap_gui_environment (gui_environment);
+ }
+
SCM
irr_gui_addStaticText (SCM wrappedGUIEnvironment,
SCM text,
DECLARE_WRAPPED_TYPE (irr::gui::IGUIEnvironment*, init_gui_environment_type,
gui_environment_p, wrap_gui_environment, unwrap_gui_environment);
+ SCM
+ irr_getGUIEnvironment (SCM wrapped_obj);
+
SCM
irr_gui_addStaticText (SCM guienv,
SCM text,
{
result = unwrap_device (wrapped_obj)->drop ();
}
+ else
+ {
+ scm_error (scm_arg_type_key, NULL, "Object cannot be dropped: ~S",
+ scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
+ }
return scm_from_bool (result);
}
#include "animated-mesh.h"
#include "animated-mesh-scene-node.h"
+#include "device.h"
#include "scene-manager.h"
#include "scene-node.h"
#include "vector3d.h"
scm_c_define_gsubr ("add-animated-mesh-scene-node", 8, 0, 0,
(scm_t_subr)irr_scene_addAnimatedMeshSceneNode);
scm_c_define_gsubr ("get-mesh", 2, 0, 0, (scm_t_subr)irr_scene_getMesh);
+ scm_c_define_gsubr ("get-scene-manager", 1, 0, 0, (scm_t_subr)irr_getSceneManager);
}
DEFINE_WRAPPED_TYPE (irr::scene::ISceneManager*, "scene-manager",
init_scene_manager_type, scene_manager_p,
wrap_scene_manager, unwrap_scene_manager);
+ SCM
+ irr_getSceneManager (SCM wrapped_obj)
+ {
+ irr::scene::ISceneManager* scene_manager;
+ if (device_p (wrapped_obj))
+ {
+ scene_manager = unwrap_device (wrapped_obj)->getSceneManager ();
+ }
+ else
+ {
+ scm_error (scm_arg_type_key, NULL, "Cannot get scene manager from object: ~S",
+ scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
+ }
+ return wrap_scene_manager (scene_manager);
+ }
+
SCM
irr_scene_addAnimatedMeshSceneNode (SCM wrapped_scene_manager,
SCM mesh,
DECLARE_WRAPPED_TYPE (irr::scene::ISceneManager*, init_scene_manager_type,
scene_manager_p, wrap_scene_manager, unwrap_scene_manager);
+ SCM
+ irr_getSceneManager (SCM wrapped_obj);
+
SCM
irr_scene_addAnimatedMeshSceneNode (SCM wrapped_scene_manager,
SCM mesh,
#include <irrlicht/irrlicht.h>
#include <libguile.h>
+
+#include "device.h"
#include "video-driver.h"
#include "wrapped.h"
init_video_driver (void)
{
init_video_driver_type ();
+ scm_c_define_gsubr ("get-video-driver", 1, 0, 0, (scm_t_subr)irr_getVideoDriver);
}
DEFINE_WRAPPED_TYPE (irr::video::IVideoDriver*, "video-driver",
init_video_driver_type, video_driver_p,
wrap_video_driver, unwrap_video_driver);
+ SCM
+ irr_getVideoDriver (SCM wrapped_obj)
+ {
+ irr::video::IVideoDriver* driver;
+ if (device_p (wrapped_obj))
+ {
+ driver = unwrap_device (wrapped_obj)->getVideoDriver ();
+ }
+ else
+ {
+ scm_error (scm_arg_type_key, NULL, "Cannot get video driver from object: ~S",
+ scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
+ }
+ return wrap_video_driver (driver);
+ }
+
}
DECLARE_WRAPPED_TYPE (irr::video::IVideoDriver*, init_video_driver_type,
video_driver_p, wrap_video_driver, unwrap_video_driver);
+ SCM
+ irr_getVideoDriver (SCM wrapped_obj);
+
}
#endif