From: Javier Sancho Date: Wed, 11 Mar 2020 18:23:20 +0000 (+0100) Subject: rename files X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=2806f03eafc48ec9ef02a3dc2d74133eaf11ccc1;p=guile-irrlicht.git rename files --- diff --git a/Makefile.am b/Makefile.am index 8f92257..1bdd2ce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,22 +1,22 @@ ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libguile-irrlicht.la libguile_irrlicht_la_SOURCES = \ + src/animated-mesh.cpp \ + src/animated-mesh-scene-node.cpp \ + src/device.cpp \ src/dimension2d.cpp \ - src/EDriverTypes.cpp \ - src/EMaterialFlags.cpp \ - src/GuileIrrlicht.cpp \ - src/IAnimatedMesh.cpp \ - src/IAnimatedMeshSceneNode.cpp \ - src/IGUIElement.cpp \ - src/IGUIEnvironment.cpp \ - src/IGUIStaticText.cpp \ - src/IrrlichtDevice.cpp \ - src/ISceneManager.cpp \ - src/ISceneNode.cpp \ - src/IReferenceCounted.cpp \ - src/IVideoDriver.cpp \ + src/driver-types.cpp \ + src/gui-element.cpp \ + src/gui-environment.cpp \ + src/gui-static-text.cpp \ + src/guile-irrlicht.cpp \ + src/material-flags.cpp \ src/rect.cpp \ + src/reference-counted.cpp \ + src/scene-manager.cpp \ + src/scene-node.cpp \ src/vector3d.cpp \ + src/video-driver.cpp \ src/wchar.cpp libguile_irrlicht_la_CPPFLAGS = @GUILE_CFLAGS@ libguile_irrlicht_la_LDFLAGS = \ diff --git a/src/EDriverTypes.cpp b/src/EDriverTypes.cpp deleted file mode 100644 index 8b3f678..0000000 --- a/src/EDriverTypes.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "EDriverTypes.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 - { - return irr::video::EDT_NULL; - } - } - -} diff --git a/src/EDriverTypes.h b/src/EDriverTypes.h deleted file mode 100644 index 0c16c75..0000000 --- a/src/EDriverTypes.h +++ /dev/null @@ -1,35 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_IRRLICHT_E_DRIVER_TYPES_INCLUDED__ -#define __GUILE_IRRLICHT_E_DRIVER_TYPES_INCLUDED__ - -#include -#include - -extern "C" { - - irr::video::E_DRIVER_TYPE - scm_to_driver_type (SCM driver_type); - -} - -#endif diff --git a/src/EMaterialFlags.cpp b/src/EMaterialFlags.cpp deleted file mode 100644 index 7c38fe8..0000000 --- a/src/EMaterialFlags.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "EMaterialFlags.h" - -extern "C" { - - irr::video::E_MATERIAL_FLAG - scm_to_material_flag (SCM material_flag) - { - char* flag = scm_to_utf8_stringn (scm_symbol_to_string (material_flag), NULL); - if (!strcmp (flag, "wireframe")) - { - return irr::video::EMF_WIREFRAME; - } - else if (!strcmp (flag, "pointcloud")) - { - return irr::video::EMF_POINTCLOUD; - } - else if (!strcmp (flag, "gouraud-shading")) - { - return irr::video::EMF_GOURAUD_SHADING; - } - else if (!strcmp (flag, "lighting")) - { - return irr::video::EMF_LIGHTING; - } - else if (!strcmp (flag, "zbuffer")) - { - return irr::video::EMF_ZBUFFER; - } - else if (!strcmp (flag, "zwrite-enable")) - { - return irr::video::EMF_ZWRITE_ENABLE; - } - else if (!strcmp (flag, "back-face-culling")) - { - return irr::video::EMF_BACK_FACE_CULLING; - } - else if (!strcmp (flag, "front-face-culling")) - { - return irr::video::EMF_FRONT_FACE_CULLING; - } - else if (!strcmp (flag, "bilinear-filter")) - { - return irr::video::EMF_BILINEAR_FILTER; - } - else if (!strcmp (flag, "trilinear-filter")) - { - return irr::video::EMF_TRILINEAR_FILTER; - } - else if (!strcmp (flag, "anisotropic-filter")) - { - return irr::video::EMF_ANISOTROPIC_FILTER; - } - else if (!strcmp (flag, "fog-enable")) - { - return irr::video::EMF_FOG_ENABLE; - } - else if (!strcmp (flag, "normalize-normals")) - { - return irr::video::EMF_NORMALIZE_NORMALS; - } - else if (!strcmp (flag, "texture-wrap")) - { - return irr::video::EMF_TEXTURE_WRAP; - } - else if (!strcmp (flag, "anti-aliasing")) - { - return irr::video::EMF_ANTI_ALIASING; - } - else if (!strcmp (flag, "color-mask")) - { - return irr::video::EMF_COLOR_MASK; - } - else if (!strcmp (flag, "color-material")) - { - return irr::video::EMF_COLOR_MATERIAL; - } - else if (!strcmp (flag, "use-mip-maps")) - { - return irr::video::EMF_USE_MIP_MAPS; - } - else if (!strcmp (flag, "blend-operation")) - { - return irr::video::EMF_BLEND_OPERATION; - } - else if (!strcmp (flag, "polygon-offset")) - { - return irr::video::EMF_POLYGON_OFFSET; - } - } - -} diff --git a/src/EMaterialFlags.h b/src/EMaterialFlags.h deleted file mode 100644 index be94343..0000000 --- a/src/EMaterialFlags.h +++ /dev/null @@ -1,35 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_IRRLICHT_E_MATERIAL_FLAGS_INCLUDED__ -#define __GUILE_IRRLICHT_E_MATERIAL_FLAGS_INCLUDED__ - -#include -#include - -extern "C" { - - irr::video::E_MATERIAL_FLAG - scm_to_material_flag (SCM material_flag); - -} - -#endif diff --git a/src/GuileIrrlicht.cpp b/src/GuileIrrlicht.cpp deleted file mode 100644 index 8b6275f..0000000 --- a/src/GuileIrrlicht.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include "IAnimatedMesh.h" -#include "IAnimatedMeshSceneNode.h" -#include "IGUIElement.h" -#include "IGUIEnvironment.h" -#include "IGUIStaticText.h" -#include "IrrlichtDevice.h" -#include "ISceneManager.h" -#include "ISceneNode.h" -#include "IReferenceCounted.h" -#include "IVideoDriver.h" - -extern "C" { - - void - init_guile_irrlicht (void) - { - init_animated_mesh (); - init_animated_mesh_scene_node (); - init_device (); - init_gui_element (); - init_gui_environment (); - init_gui_static_text (); - init_reference_counted (); - init_scene_manager (); - init_scene_node (); - init_video_driver (); - } - -} diff --git a/src/IAnimatedMesh.cpp b/src/IAnimatedMesh.cpp deleted file mode 100644 index 883527e..0000000 --- a/src/IAnimatedMesh.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "IAnimatedMesh.h" -#include "wrapped.h" - -extern "C" { - - void - init_animated_mesh (void) - { - init_animated_mesh_type (); - } - - DEFINE_WRAPPED_TYPE (irr::scene::IAnimatedMesh*, "animated-mesh", - init_animated_mesh_type, animated_mesh_p, - wrap_animated_mesh, unwrap_animated_mesh); - -} diff --git a/src/IAnimatedMesh.h b/src/IAnimatedMesh.h deleted file mode 100644 index b9f77c3..0000000 --- a/src/IAnimatedMesh.h +++ /dev/null @@ -1,38 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_ANIMATED_MESH_INCLUDED__ -#define __GUILE_I_ANIMATED_MESH_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_animated_mesh (void); - - DECLARE_WRAPPED_TYPE (irr::scene::IAnimatedMesh*, init_animated_mesh_type, - animated_mesh_p, wrap_animated_mesh, unwrap_animated_mesh); -} - -#endif diff --git a/src/IAnimatedMeshSceneNode.cpp b/src/IAnimatedMeshSceneNode.cpp deleted file mode 100644 index ae6e29c..0000000 --- a/src/IAnimatedMeshSceneNode.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "IAnimatedMeshSceneNode.h" -#include "wrapped.h" - -extern "C" { - - void - init_animated_mesh_scene_node (void) - { - init_animated_mesh_scene_node_type (); - } - - DEFINE_WRAPPED_TYPE (irr::scene::IAnimatedMeshSceneNode*, "animated-mesh-scene-node", - init_animated_mesh_scene_node_type, animated_mesh_scene_node_p, - wrap_animated_mesh_scene_node, unwrap_animated_mesh_scene_node); - -} diff --git a/src/IAnimatedMeshSceneNode.h b/src/IAnimatedMeshSceneNode.h deleted file mode 100644 index b4dfd9b..0000000 --- a/src/IAnimatedMeshSceneNode.h +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_ANIMATED_MESH_SCENE_NODE_INCLUDED__ -#define __GUILE_I_ANIMATED_MESH_SCENE_NODE_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_animated_mesh_scene_node (void); - - DECLARE_WRAPPED_TYPE (irr::scene::IAnimatedMeshSceneNode*, init_animated_mesh_scene_node_type, - animated_mesh_scene_node_p, - wrap_animated_mesh_scene_node, unwrap_animated_mesh_scene_node); -} - -#endif diff --git a/src/IGUIElement.cpp b/src/IGUIElement.cpp deleted file mode 100644 index 810fdb6..0000000 --- a/src/IGUIElement.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "IGUIElement.h" -#include "wrapped.h" - -extern "C" { - - void - init_gui_element (void) - { - init_gui_element_type (); - } - - DEFINE_WRAPPED_TYPE (irr::gui::IGUIElement*, "gui-element", - init_gui_element_type, gui_element_p, - wrap_gui_element, unwrap_gui_element); - -} diff --git a/src/IGUIElement.h b/src/IGUIElement.h deleted file mode 100644 index ab8db92..0000000 --- a/src/IGUIElement.h +++ /dev/null @@ -1,38 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_GUI_ELEMENT_INCLUDED__ -#define __GUILE_I_GUI_ELEMENT_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_gui_element (void); - - DECLARE_WRAPPED_TYPE (irr::gui::IGUIElement*, init_gui_element_type, - gui_element_p, wrap_gui_element, unwrap_gui_element); -} - -#endif diff --git a/src/IGUIEnvironment.cpp b/src/IGUIEnvironment.cpp deleted file mode 100644 index bea7f1e..0000000 --- a/src/IGUIEnvironment.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "IGUIElement.h" -#include "IGUIEnvironment.h" -#include "IGUIStaticText.h" -#include "rect.h" -#include "wchar.h" -#include "wrapped.h" - -extern "C" { - - void - init_gui_environment (void) - { - init_gui_environment_type (); - scm_c_define_gsubr ("add-static-text!", 8, 0, 0, (scm_t_subr)irr_gui_addStaticText); - } - - DEFINE_WRAPPED_TYPE (irr::gui::IGUIEnvironment*, "gui-environment", - init_gui_environment_type, gui_environment_p, - wrap_gui_environment, unwrap_gui_environment); - - SCM - irr_gui_addStaticText (SCM wrappedGUIEnvironment, - SCM text, - SCM rectangle, - SCM border, - SCM wordWrap, - SCM parent, - SCM id, - SCM fillBackground) - { - irr::gui::IGUIEnvironment* guienv = unwrap_gui_environment (wrappedGUIEnvironment); - irr::gui::IGUIStaticText* staticText = - guienv->addStaticText (scm_to_wide_char_string (text), - scm_to_rect_s32 (rectangle), - scm_to_bool (border), - scm_to_bool (wordWrap), - scm_is_false (parent) ? 0 : unwrap_gui_element (parent), - scm_to_int32 (id), - scm_to_bool (fillBackground)); - return wrap_gui_static_text (staticText); - } - -} diff --git a/src/IGUIEnvironment.h b/src/IGUIEnvironment.h deleted file mode 100644 index e4d6731..0000000 --- a/src/IGUIEnvironment.h +++ /dev/null @@ -1,49 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_GUI_ENVIRONMENT_INCLUDED__ -#define __GUILE_I_GUI_ENVIRONMENT_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_gui_environment (void); - - DECLARE_WRAPPED_TYPE (irr::gui::IGUIEnvironment*, init_gui_environment_type, - gui_environment_p, wrap_gui_environment, unwrap_gui_environment); - - SCM - irr_gui_addStaticText (SCM guienv, - SCM text, - SCM rectangle, - SCM border, - SCM wordWrap, - SCM parent, - SCM id, - SCM fillBackground); - -} - -#endif diff --git a/src/IGUIStaticText.cpp b/src/IGUIStaticText.cpp deleted file mode 100644 index 2ae1b97..0000000 --- a/src/IGUIStaticText.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "IGUIStaticText.h" -#include "wrapped.h" - -extern "C" { - - void - init_gui_static_text (void) - { - init_gui_static_text_type (); - } - - DEFINE_WRAPPED_TYPE (irr::gui::IGUIStaticText*, "gui-static-text", - init_gui_static_text_type, gui_static_text_p, - wrap_gui_static_text, unwrap_gui_static_text); - -} diff --git a/src/IGUIStaticText.h b/src/IGUIStaticText.h deleted file mode 100644 index 8fe6492..0000000 --- a/src/IGUIStaticText.h +++ /dev/null @@ -1,38 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_GUI_STATIC_TEXT_INCLUDED__ -#define __GUILE_I_GUI_STATIC_TEXT_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_gui_static_text (void); - - DECLARE_WRAPPED_TYPE (irr::gui::IGUIStaticText*, init_gui_static_text_type, - gui_static_text_p, wrap_gui_static_text, unwrap_gui_static_text); -} - -#endif diff --git a/src/IReferenceCounted.cpp b/src/IReferenceCounted.cpp deleted file mode 100644 index 0038d18..0000000 --- a/src/IReferenceCounted.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include - -#include "IReferenceCounted.h" -#include "IrrlichtDevice.h" - -extern "C" { - - void - init_reference_counted (void) - { - scm_c_define_gsubr ("drop!", 1, 0, 0, (scm_t_subr)irr_drop); - } - - SCM - irr_drop (SCM wrapped_obj) - { - bool result = 0; - if (device_p (wrapped_obj)) - { - result = unwrap_device (wrapped_obj)->drop (); - } - return scm_from_bool (result); - } - -} diff --git a/src/IReferenceCounted.h b/src/IReferenceCounted.h deleted file mode 100644 index 6d965d0..0000000 --- a/src/IReferenceCounted.h +++ /dev/null @@ -1,38 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_REFERENCE_COUNTED_INCLUDED__ -#define __GUILE_I_REFERENCE_COUNTED_INCLUDED__ - -#include -#include - -extern "C" { - - void - init_reference_counted (void); - - SCM - irr_drop (SCM wrapped_obj); - -} - -#endif diff --git a/src/ISceneManager.cpp b/src/ISceneManager.cpp deleted file mode 100644 index 5e8d2d5..0000000 --- a/src/ISceneManager.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "IAnimatedMesh.h" -#include "IAnimatedMeshSceneNode.h" -#include "ISceneManager.h" -#include "ISceneNode.h" -#include "vector3d.h" -#include "wrapped.h" - -extern "C" { - - void - init_scene_manager (void) - { - init_scene_manager_type (); - 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); - } - - DEFINE_WRAPPED_TYPE (irr::scene::ISceneManager*, "scene-manager", - init_scene_manager_type, scene_manager_p, - wrap_scene_manager, unwrap_scene_manager); - - SCM - irr_scene_addAnimatedMeshSceneNode (SCM wrapped_scene_manager, - SCM mesh, - SCM parent, - SCM id, - SCM position, - SCM rotation, - SCM scale, - SCM alsoAddIfMeshPointerZero) - { - irr::scene::ISceneManager* smgr = unwrap_scene_manager (wrapped_scene_manager); - irr::scene::IAnimatedMeshSceneNode* node = - smgr->addAnimatedMeshSceneNode (unwrap_animated_mesh (mesh), - scm_is_false (parent) ? 0 : unwrap_scene_node (parent), - scm_to_int32 (id), - scm_to_vector3df (position), - scm_to_vector3df (rotation), - scm_to_vector3df (scale), - scm_to_bool (alsoAddIfMeshPointerZero)); - return wrap_animated_mesh_scene_node (node); - } - - SCM - irr_scene_getMesh (SCM wrapped_scene_manager, - SCM filename) - { - irr::scene::ISceneManager* smgr = unwrap_scene_manager (wrapped_scene_manager); - irr::scene::IAnimatedMesh* mesh = smgr->getMesh(scm_to_utf8_stringn (filename, NULL)); - return wrap_animated_mesh (mesh); - } - -} diff --git a/src/ISceneManager.h b/src/ISceneManager.h deleted file mode 100644 index d5b4b2f..0000000 --- a/src/ISceneManager.h +++ /dev/null @@ -1,52 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_SCENE_MANAGER_INCLUDED__ -#define __GUILE_I_SCENE_MANAGER_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_scene_manager (void); - - DECLARE_WRAPPED_TYPE (irr::scene::ISceneManager*, init_scene_manager_type, - scene_manager_p, wrap_scene_manager, unwrap_scene_manager); - - SCM - irr_scene_addAnimatedMeshSceneNode (SCM wrapped_scene_manager, - SCM mesh, - SCM parent, - SCM id, - SCM position, - SCM rotation, - SCM scale, - SCM alsoAddIfMeshPointerZero); - SCM - irr_scene_getMesh (SCM wrapped_scene_manager, - SCM filename); - -} - -#endif diff --git a/src/ISceneNode.cpp b/src/ISceneNode.cpp deleted file mode 100644 index 29b094c..0000000 --- a/src/ISceneNode.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "ISceneNode.h" -#include "wrapped.h" - -extern "C" { - - void - init_scene_node (void) - { - init_scene_node_type (); - } - - DEFINE_WRAPPED_TYPE (irr::scene::ISceneNode*, "scene-node", - init_scene_node_type, scene_node_p, - wrap_scene_node, unwrap_scene_node); - -} diff --git a/src/ISceneNode.h b/src/ISceneNode.h deleted file mode 100644 index b663091..0000000 --- a/src/ISceneNode.h +++ /dev/null @@ -1,38 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_SCENE_NODE_INCLUDED__ -#define __GUILE_I_SCENE_NODE_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_scene_node (void); - - DECLARE_WRAPPED_TYPE (irr::scene::ISceneNode*, init_scene_node_type, - scene_node_p, wrap_scene_node, unwrap_scene_node); -} - -#endif diff --git a/src/IVideoDriver.cpp b/src/IVideoDriver.cpp deleted file mode 100644 index 839db75..0000000 --- a/src/IVideoDriver.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include -#include "IVideoDriver.h" -#include "wrapped.h" - -extern "C" { - - void - init_video_driver (void) - { - init_video_driver_type (); - } - - DEFINE_WRAPPED_TYPE (irr::video::IVideoDriver*, "video-driver", - init_video_driver_type, video_driver_p, - wrap_video_driver, unwrap_video_driver); - -} diff --git a/src/IVideoDriver.h b/src/IVideoDriver.h deleted file mode 100644 index df5c3de..0000000 --- a/src/IVideoDriver.h +++ /dev/null @@ -1,39 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_I_VIDEO_DRIVER_INCLUDED__ -#define __GUILE_I_VIDEO_DRIVER_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_video_driver (void); - - DECLARE_WRAPPED_TYPE (irr::video::IVideoDriver*, init_video_driver_type, - video_driver_p, wrap_video_driver, unwrap_video_driver); - -} - -#endif diff --git a/src/IrrlichtDevice.cpp b/src/IrrlichtDevice.cpp deleted file mode 100644 index 9cccd58..0000000 --- a/src/IrrlichtDevice.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#include -#include - -#include "dimension2d.h" -#include "EDriverTypes.h" -#include "IGUIEnvironment.h" -#include "IrrlichtDevice.h" -#include "ISceneManager.h" -#include "IVideoDriver.h" -#include "wchar.h" -#include "wrapped.h" - -extern "C" { - - void - init_device (void) - { - 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); - } - - DEFINE_WRAPPED_TYPE (irr::IrrlichtDevice*, "device", - init_device_type, device_p, - wrap_device, unwrap_device); - - SCM - irr_createDevice (SCM deviceType, - SCM windowSize, - SCM bits, - SCM fullscreen, - SCM stencilbuffer, - SCM vsync, - SCM receiver) - { - irr::IrrlichtDevice* device = - irr::createDevice (scm_to_driver_type (deviceType), - scm_to_dimension2d_u32 (windowSize), - scm_to_uint32 (bits), - scm_to_bool (fullscreen), - scm_to_bool (stencilbuffer), - scm_to_bool (vsync)); - 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) - { - irr::IrrlichtDevice* device = unwrap_device (wrapped_device); - device->setWindowCaption (scm_to_wide_char_string (text)); - return SCM_UNSPECIFIED; - } - -} diff --git a/src/IrrlichtDevice.h b/src/IrrlichtDevice.h deleted file mode 100644 index 898341b..0000000 --- a/src/IrrlichtDevice.h +++ /dev/null @@ -1,61 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - 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 - . -*/ - -#ifndef __GUILE_IRRLICHT_DEVICE_INCLUDED__ -#define __GUILE_IRRLICHT_DEVICE_INCLUDED__ - -#include -#include -#include "wrapped.h" - -extern "C" { - - void - init_device (void); - - DECLARE_WRAPPED_TYPE (irr::IrrlichtDevice*, init_device_type, - device_p, wrap_device, unwrap_device); - - SCM - irr_createDevice (SCM deviceType, - SCM windowSize, - SCM bits, - SCM fullscreen, - SCM stencilbuffer, - 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); - -} - -#endif diff --git a/src/animated-mesh-scene-node.cpp b/src/animated-mesh-scene-node.cpp new file mode 100644 index 0000000..be46b3a --- /dev/null +++ b/src/animated-mesh-scene-node.cpp @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#include "animated-mesh-scene-node.h" +#include "wrapped.h" + +extern "C" { + + void + init_animated_mesh_scene_node (void) + { + init_animated_mesh_scene_node_type (); + } + + DEFINE_WRAPPED_TYPE (irr::scene::IAnimatedMeshSceneNode*, "animated-mesh-scene-node", + init_animated_mesh_scene_node_type, animated_mesh_scene_node_p, + wrap_animated_mesh_scene_node, unwrap_animated_mesh_scene_node); + +} diff --git a/src/animated-mesh-scene-node.h b/src/animated-mesh-scene-node.h new file mode 100644 index 0000000..9858cf2 --- /dev/null +++ b/src/animated-mesh-scene-node.h @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ +#define __GUILE_IRRLICHT_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_animated_mesh_scene_node (void); + + DECLARE_WRAPPED_TYPE (irr::scene::IAnimatedMeshSceneNode*, init_animated_mesh_scene_node_type, + animated_mesh_scene_node_p, + wrap_animated_mesh_scene_node, unwrap_animated_mesh_scene_node); +} + +#endif diff --git a/src/animated-mesh.cpp b/src/animated-mesh.cpp new file mode 100644 index 0000000..9f461a2 --- /dev/null +++ b/src/animated-mesh.cpp @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#include "animated-mesh.h" +#include "wrapped.h" + +extern "C" { + + void + init_animated_mesh (void) + { + init_animated_mesh_type (); + } + + DEFINE_WRAPPED_TYPE (irr::scene::IAnimatedMesh*, "animated-mesh", + init_animated_mesh_type, animated_mesh_p, + wrap_animated_mesh, unwrap_animated_mesh); + +} diff --git a/src/animated-mesh.h b/src/animated-mesh.h new file mode 100644 index 0000000..f063b39 --- /dev/null +++ b/src/animated-mesh.h @@ -0,0 +1,38 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_ANIMATED_MESH_H_INCLUDED__ +#define __GUILE_IRRLICHT_ANIMATED_MESH_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_animated_mesh (void); + + DECLARE_WRAPPED_TYPE (irr::scene::IAnimatedMesh*, init_animated_mesh_type, + animated_mesh_p, wrap_animated_mesh, unwrap_animated_mesh); +} + +#endif diff --git a/src/device.cpp b/src/device.cpp new file mode 100644 index 0000000..bb43ddb --- /dev/null +++ b/src/device.cpp @@ -0,0 +1,103 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include + +#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" + +extern "C" { + + void + init_device (void) + { + 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); + } + + DEFINE_WRAPPED_TYPE (irr::IrrlichtDevice*, "device", + init_device_type, device_p, + wrap_device, unwrap_device); + + SCM + irr_createDevice (SCM deviceType, + SCM windowSize, + SCM bits, + SCM fullscreen, + SCM stencilbuffer, + SCM vsync, + SCM receiver) + { + irr::IrrlichtDevice* device = + irr::createDevice (scm_to_driver_type (deviceType), + scm_to_dimension2d_u32 (windowSize), + scm_to_uint32 (bits), + scm_to_bool (fullscreen), + scm_to_bool (stencilbuffer), + scm_to_bool (vsync)); + 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) + { + irr::IrrlichtDevice* device = unwrap_device (wrapped_device); + device->setWindowCaption (scm_to_wide_char_string (text)); + return SCM_UNSPECIFIED; + } + +} diff --git a/src/device.h b/src/device.h new file mode 100644 index 0000000..0f3d243 --- /dev/null +++ b/src/device.h @@ -0,0 +1,61 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_DEVICE_H_INCLUDED__ +#define __GUILE_IRRLICHT_DEVICE_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_device (void); + + DECLARE_WRAPPED_TYPE (irr::IrrlichtDevice*, init_device_type, + device_p, wrap_device, unwrap_device); + + SCM + irr_createDevice (SCM deviceType, + SCM windowSize, + SCM bits, + SCM fullscreen, + SCM stencilbuffer, + 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); + +} + +#endif diff --git a/src/dimension2d.h b/src/dimension2d.h index 86336c6..5556e8a 100644 --- a/src/dimension2d.h +++ b/src/dimension2d.h @@ -19,8 +19,8 @@ . */ -#ifndef __GUILE_IRRLICHT_DIMENSION_2D_INCLUDED__ -#define __GUILE_IRRLICHT_DIMENSION_2D_INCLUDED__ +#ifndef __GUILE_IRRLICHT_DIMENSION_2D_H_INCLUDED__ +#define __GUILE_IRRLICHT_DIMENSION_2D_H_INCLUDED__ #include #include diff --git a/src/driver-types.cpp b/src/driver-types.cpp new file mode 100644 index 0000000..886d40d --- /dev/null +++ b/src/driver-types.cpp @@ -0,0 +1,63 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#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)); + } + } + +} diff --git a/src/driver-types.h b/src/driver-types.h new file mode 100644 index 0000000..dff3802 --- /dev/null +++ b/src/driver-types.h @@ -0,0 +1,35 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_DRIVER_TYPES_H_INCLUDED__ +#define __GUILE_IRRLICHT_DRIVER_TYPES_H_INCLUDED__ + +#include +#include + +extern "C" { + + irr::video::E_DRIVER_TYPE + scm_to_driver_type (SCM driver_type); + +} + +#endif diff --git a/src/gui-element.cpp b/src/gui-element.cpp new file mode 100644 index 0000000..e93872d --- /dev/null +++ b/src/gui-element.cpp @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#include "gui-element.h" +#include "wrapped.h" + +extern "C" { + + void + init_gui_element (void) + { + init_gui_element_type (); + } + + DEFINE_WRAPPED_TYPE (irr::gui::IGUIElement*, "gui-element", + init_gui_element_type, gui_element_p, + wrap_gui_element, unwrap_gui_element); + +} diff --git a/src/gui-element.h b/src/gui-element.h new file mode 100644 index 0000000..1e290ae --- /dev/null +++ b/src/gui-element.h @@ -0,0 +1,38 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_GUI_ELEMENT_H_INCLUDED__ +#define __GUILE_IRRLICHT_GUI_ELEMENT_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_gui_element (void); + + DECLARE_WRAPPED_TYPE (irr::gui::IGUIElement*, init_gui_element_type, + gui_element_p, wrap_gui_element, unwrap_gui_element); +} + +#endif diff --git a/src/gui-environment.cpp b/src/gui-environment.cpp new file mode 100644 index 0000000..76dc57c --- /dev/null +++ b/src/gui-environment.cpp @@ -0,0 +1,67 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include + +#include "gui-element.h" +#include "gui-environment.h" +#include "gui-static-text.h" +#include "rect.h" +#include "wchar.h" +#include "wrapped.h" + +extern "C" { + + void + init_gui_environment (void) + { + init_gui_environment_type (); + scm_c_define_gsubr ("add-static-text!", 8, 0, 0, (scm_t_subr)irr_gui_addStaticText); + } + + DEFINE_WRAPPED_TYPE (irr::gui::IGUIEnvironment*, "gui-environment", + init_gui_environment_type, gui_environment_p, + wrap_gui_environment, unwrap_gui_environment); + + SCM + irr_gui_addStaticText (SCM wrappedGUIEnvironment, + SCM text, + SCM rectangle, + SCM border, + SCM wordWrap, + SCM parent, + SCM id, + SCM fillBackground) + { + irr::gui::IGUIEnvironment* guienv = unwrap_gui_environment (wrappedGUIEnvironment); + irr::gui::IGUIStaticText* staticText = + guienv->addStaticText (scm_to_wide_char_string (text), + scm_to_rect_s32 (rectangle), + scm_to_bool (border), + scm_to_bool (wordWrap), + scm_is_false (parent) ? 0 : unwrap_gui_element (parent), + scm_to_int32 (id), + scm_to_bool (fillBackground)); + return wrap_gui_static_text (staticText); + } + +} diff --git a/src/gui-environment.h b/src/gui-environment.h new file mode 100644 index 0000000..9b8d636 --- /dev/null +++ b/src/gui-environment.h @@ -0,0 +1,49 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_GUI_ENVIRONMENT_H_INCLUDED__ +#define __GUILE_IRRLICHT_GUI_ENVIRONMENT_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_gui_environment (void); + + DECLARE_WRAPPED_TYPE (irr::gui::IGUIEnvironment*, init_gui_environment_type, + gui_environment_p, wrap_gui_environment, unwrap_gui_environment); + + SCM + irr_gui_addStaticText (SCM guienv, + SCM text, + SCM rectangle, + SCM border, + SCM wordWrap, + SCM parent, + SCM id, + SCM fillBackground); + +} + +#endif diff --git a/src/gui-static-text.cpp b/src/gui-static-text.cpp new file mode 100644 index 0000000..f5a4323 --- /dev/null +++ b/src/gui-static-text.cpp @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#include "gui-static-text.h" +#include "wrapped.h" + +extern "C" { + + void + init_gui_static_text (void) + { + init_gui_static_text_type (); + } + + DEFINE_WRAPPED_TYPE (irr::gui::IGUIStaticText*, "gui-static-text", + init_gui_static_text_type, gui_static_text_p, + wrap_gui_static_text, unwrap_gui_static_text); + +} diff --git a/src/gui-static-text.h b/src/gui-static-text.h new file mode 100644 index 0000000..8dc7a5f --- /dev/null +++ b/src/gui-static-text.h @@ -0,0 +1,38 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_GUI_STATIC_TEXT_H_INCLUDED__ +#define __GUILE_IRRLICHT_GUI_STATIC_TEXT_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_gui_static_text (void); + + DECLARE_WRAPPED_TYPE (irr::gui::IGUIStaticText*, init_gui_static_text_type, + gui_static_text_p, wrap_gui_static_text, unwrap_gui_static_text); +} + +#endif diff --git a/src/guile-irrlicht.cpp b/src/guile-irrlicht.cpp new file mode 100644 index 0000000..a73a419 --- /dev/null +++ b/src/guile-irrlicht.cpp @@ -0,0 +1,52 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include + +#include "animated-mesh.h" +#include "animated-mesh-scene-node.h" +#include "device.h" +#include "gui-element.h" +#include "gui-environment.h" +#include "gui-static-text.h" +#include "reference-counted.h" +#include "scene-manager.h" +#include "scene-node.h" +#include "video-driver.h" + +extern "C" { + + void + init_guile_irrlicht (void) + { + init_animated_mesh (); + init_animated_mesh_scene_node (); + init_device (); + init_gui_element (); + init_gui_environment (); + init_gui_static_text (); + init_reference_counted (); + init_scene_manager (); + init_scene_node (); + init_video_driver (); + } + +} diff --git a/src/material-flags.cpp b/src/material-flags.cpp new file mode 100644 index 0000000..df2c884 --- /dev/null +++ b/src/material-flags.cpp @@ -0,0 +1,119 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#include "material-flags.h" + +extern "C" { + + irr::video::E_MATERIAL_FLAG + scm_to_material_flag (SCM material_flag) + { + char* flag = scm_to_utf8_stringn (scm_symbol_to_string (material_flag), NULL); + if (!strcmp (flag, "wireframe")) + { + return irr::video::EMF_WIREFRAME; + } + else if (!strcmp (flag, "pointcloud")) + { + return irr::video::EMF_POINTCLOUD; + } + else if (!strcmp (flag, "gouraud-shading")) + { + return irr::video::EMF_GOURAUD_SHADING; + } + else if (!strcmp (flag, "lighting")) + { + return irr::video::EMF_LIGHTING; + } + else if (!strcmp (flag, "zbuffer")) + { + return irr::video::EMF_ZBUFFER; + } + else if (!strcmp (flag, "zwrite-enable")) + { + return irr::video::EMF_ZWRITE_ENABLE; + } + else if (!strcmp (flag, "back-face-culling")) + { + return irr::video::EMF_BACK_FACE_CULLING; + } + else if (!strcmp (flag, "front-face-culling")) + { + return irr::video::EMF_FRONT_FACE_CULLING; + } + else if (!strcmp (flag, "bilinear-filter")) + { + return irr::video::EMF_BILINEAR_FILTER; + } + else if (!strcmp (flag, "trilinear-filter")) + { + return irr::video::EMF_TRILINEAR_FILTER; + } + else if (!strcmp (flag, "anisotropic-filter")) + { + return irr::video::EMF_ANISOTROPIC_FILTER; + } + else if (!strcmp (flag, "fog-enable")) + { + return irr::video::EMF_FOG_ENABLE; + } + else if (!strcmp (flag, "normalize-normals")) + { + return irr::video::EMF_NORMALIZE_NORMALS; + } + else if (!strcmp (flag, "texture-wrap")) + { + return irr::video::EMF_TEXTURE_WRAP; + } + else if (!strcmp (flag, "anti-aliasing")) + { + return irr::video::EMF_ANTI_ALIASING; + } + else if (!strcmp (flag, "color-mask")) + { + return irr::video::EMF_COLOR_MASK; + } + else if (!strcmp (flag, "color-material")) + { + return irr::video::EMF_COLOR_MATERIAL; + } + else if (!strcmp (flag, "use-mip-maps")) + { + return irr::video::EMF_USE_MIP_MAPS; + } + else if (!strcmp (flag, "blend-operation")) + { + return irr::video::EMF_BLEND_OPERATION; + } + else if (!strcmp (flag, "polygon-offset")) + { + return irr::video::EMF_POLYGON_OFFSET; + } + else + { + scm_error (scm_arg_type_key, NULL, "Wrong material flag: ~S", + scm_list_1 (material_flag), scm_list_1 (material_flag)); + } + } + +} diff --git a/src/material-flags.h b/src/material-flags.h new file mode 100644 index 0000000..1b1f053 --- /dev/null +++ b/src/material-flags.h @@ -0,0 +1,35 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_MATERIAL_FLAGS_H_INCLUDED__ +#define __GUILE_IRRLICHT_MATERIAL_FLAGS_H_INCLUDED__ + +#include +#include + +extern "C" { + + irr::video::E_MATERIAL_FLAG + scm_to_material_flag (SCM material_flag); + +} + +#endif diff --git a/src/rect.h b/src/rect.h index bad7aae..4e015a1 100644 --- a/src/rect.h +++ b/src/rect.h @@ -19,8 +19,8 @@ . */ -#ifndef __GUILE_IRRLICHT_RECT_INCLUDED__ -#define __GUILE_IRRLICHT_RECT_INCLUDED__ +#ifndef __GUILE_IRRLICHT_RECT_H_INCLUDED__ +#define __GUILE_IRRLICHT_RECT_H_INCLUDED__ #include #include diff --git a/src/reference-counted.cpp b/src/reference-counted.cpp new file mode 100644 index 0000000..85634d4 --- /dev/null +++ b/src/reference-counted.cpp @@ -0,0 +1,47 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include + +#include "device.h" +#include "reference-counted.h" + +extern "C" { + + void + init_reference_counted (void) + { + scm_c_define_gsubr ("drop!", 1, 0, 0, (scm_t_subr)irr_drop); + } + + SCM + irr_drop (SCM wrapped_obj) + { + bool result = 0; + if (device_p (wrapped_obj)) + { + result = unwrap_device (wrapped_obj)->drop (); + } + return scm_from_bool (result); + } + +} diff --git a/src/reference-counted.h b/src/reference-counted.h new file mode 100644 index 0000000..f2a2613 --- /dev/null +++ b/src/reference-counted.h @@ -0,0 +1,38 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_REFERENCE_COUNTED_H_INCLUDED__ +#define __GUILE_IRRLICHT_REFERENCE_COUNTED_H_INCLUDED__ + +#include +#include + +extern "C" { + + void + init_reference_counted (void); + + SCM + irr_drop (SCM wrapped_obj); + +} + +#endif diff --git a/src/scene-manager.cpp b/src/scene-manager.cpp new file mode 100644 index 0000000..5e81de7 --- /dev/null +++ b/src/scene-manager.cpp @@ -0,0 +1,78 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include + +#include "animated-mesh.h" +#include "animated-mesh-scene-node.h" +#include "scene-manager.h" +#include "scene-node.h" +#include "vector3d.h" +#include "wrapped.h" + +extern "C" { + + void + init_scene_manager (void) + { + init_scene_manager_type (); + 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); + } + + DEFINE_WRAPPED_TYPE (irr::scene::ISceneManager*, "scene-manager", + init_scene_manager_type, scene_manager_p, + wrap_scene_manager, unwrap_scene_manager); + + SCM + irr_scene_addAnimatedMeshSceneNode (SCM wrapped_scene_manager, + SCM mesh, + SCM parent, + SCM id, + SCM position, + SCM rotation, + SCM scale, + SCM alsoAddIfMeshPointerZero) + { + irr::scene::ISceneManager* smgr = unwrap_scene_manager (wrapped_scene_manager); + irr::scene::IAnimatedMeshSceneNode* node = + smgr->addAnimatedMeshSceneNode (unwrap_animated_mesh (mesh), + scm_is_false (parent) ? 0 : unwrap_scene_node (parent), + scm_to_int32 (id), + scm_to_vector3df (position), + scm_to_vector3df (rotation), + scm_to_vector3df (scale), + scm_to_bool (alsoAddIfMeshPointerZero)); + return wrap_animated_mesh_scene_node (node); + } + + SCM + irr_scene_getMesh (SCM wrapped_scene_manager, + SCM filename) + { + irr::scene::ISceneManager* smgr = unwrap_scene_manager (wrapped_scene_manager); + irr::scene::IAnimatedMesh* mesh = smgr->getMesh(scm_to_utf8_stringn (filename, NULL)); + return wrap_animated_mesh (mesh); + } + +} diff --git a/src/scene-manager.h b/src/scene-manager.h new file mode 100644 index 0000000..f52d299 --- /dev/null +++ b/src/scene-manager.h @@ -0,0 +1,52 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_SCENE_MANAGER_H_INCLUDED__ +#define __GUILE_IRRLICHT_SCENE_MANAGER_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_scene_manager (void); + + DECLARE_WRAPPED_TYPE (irr::scene::ISceneManager*, init_scene_manager_type, + scene_manager_p, wrap_scene_manager, unwrap_scene_manager); + + SCM + irr_scene_addAnimatedMeshSceneNode (SCM wrapped_scene_manager, + SCM mesh, + SCM parent, + SCM id, + SCM position, + SCM rotation, + SCM scale, + SCM alsoAddIfMeshPointerZero); + SCM + irr_scene_getMesh (SCM wrapped_scene_manager, + SCM filename); + +} + +#endif diff --git a/src/scene-node.cpp b/src/scene-node.cpp new file mode 100644 index 0000000..d392aba --- /dev/null +++ b/src/scene-node.cpp @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#include "scene-node.h" +#include "wrapped.h" + +extern "C" { + + void + init_scene_node (void) + { + init_scene_node_type (); + } + + DEFINE_WRAPPED_TYPE (irr::scene::ISceneNode*, "scene-node", + init_scene_node_type, scene_node_p, + wrap_scene_node, unwrap_scene_node); + +} diff --git a/src/scene-node.h b/src/scene-node.h new file mode 100644 index 0000000..64c3626 --- /dev/null +++ b/src/scene-node.h @@ -0,0 +1,38 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_SCENE_NODE_H_INCLUDED__ +#define __GUILE_IRRLICHT_SCENE_NODE_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_scene_node (void); + + DECLARE_WRAPPED_TYPE (irr::scene::ISceneNode*, init_scene_node_type, + scene_node_p, wrap_scene_node, unwrap_scene_node); +} + +#endif diff --git a/src/vector3d.h b/src/vector3d.h index 8862cdf..bc7c9f0 100644 --- a/src/vector3d.h +++ b/src/vector3d.h @@ -19,8 +19,8 @@ . */ -#ifndef __GUILE_IRRLICHT_VECTOR_3D_INCLUDED__ -#define __GUILE_IRRLICHT_VECTOR_3D_INCLUDED__ +#ifndef __GUILE_IRRLICHT_VECTOR_3D_H_INCLUDED__ +#define __GUILE_IRRLICHT_VECTOR_3D_H_INCLUDED__ #include #include diff --git a/src/video-driver.cpp b/src/video-driver.cpp new file mode 100644 index 0000000..c746db3 --- /dev/null +++ b/src/video-driver.cpp @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#include +#include +#include "video-driver.h" +#include "wrapped.h" + +extern "C" { + + void + init_video_driver (void) + { + init_video_driver_type (); + } + + DEFINE_WRAPPED_TYPE (irr::video::IVideoDriver*, "video-driver", + init_video_driver_type, video_driver_p, + wrap_video_driver, unwrap_video_driver); + +} diff --git a/src/video-driver.h b/src/video-driver.h new file mode 100644 index 0000000..1525edf --- /dev/null +++ b/src/video-driver.h @@ -0,0 +1,39 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + 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 + . +*/ + +#ifndef __GUILE_IRRLICHT_VIDEO_DRIVER_H_INCLUDED__ +#define __GUILE_IRRLICHT_VIDEO_DRIVER_H_INCLUDED__ + +#include +#include +#include "wrapped.h" + +extern "C" { + + void + init_video_driver (void); + + DECLARE_WRAPPED_TYPE (irr::video::IVideoDriver*, init_video_driver_type, + video_driver_p, wrap_video_driver, unwrap_video_driver); + +} + +#endif diff --git a/src/wchar.h b/src/wchar.h index d9697d2..7b6119a 100644 --- a/src/wchar.h +++ b/src/wchar.h @@ -19,8 +19,13 @@ . */ +#ifndef __GUILE_IRRLICHT_WCHAR_H_INCLUDED__ +#define __GUILE_IRRLICHT_WCHAR_H_INCLUDED__ + #include #include wchar_t* scm_to_wide_char_string (SCM text); + +#endif diff --git a/src/wrapped.h b/src/wrapped.h index 2412d7e..1f61d95 100644 --- a/src/wrapped.h +++ b/src/wrapped.h @@ -19,6 +19,9 @@ . */ +#ifndef __GUILE_IRRLICHT_WRAPPED_H_INCLUDED__ +#define __GUILE_IRRLICHT_WRAPPED_H_INCLUDED__ + #include #define DECLARE_WRAPPED_TYPE(TYPE, INIT, PRED, WRAP, UNWRAP) \ @@ -70,3 +73,5 @@ { \ return SCM_IS_A_P (wrapped_obj, wrapped_type); \ } + +#endif