src/driver-types.cpp \
src/event-receiver.cpp \
src/file-archive.cpp \
+ src/file-list.cpp \
src/file-system.cpp \
src/gui.cpp \
src/gui-button.cpp \
src/gui-static-text.cpp \
src/gui-toolbar.cpp \
src/guile-irrlicht.cpp \
+ src/io.cpp \
src/keycodes.cpp \
src/keymap.cpp \
src/material.cpp \
--- /dev/null
+/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
+
+ Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
+
+ 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
+ <http://www.gnu.org/licenses/>.
+*/
+
+#include <irrlicht/irrlicht.h>
+#include <libguile.h>
+#include "file-list.h"
+
+extern "C" {
+
+ void
+ init_file_list (void)
+ {
+ init_file_list_type ();
+ }
+
+ DEFINE_WRAPPED_TYPE (irr::io::IFileList*, "file-list",
+ init_file_list_type, file_list_p,
+ wrap_file_list, unwrap_file_list);
+
+}
--- /dev/null
+/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
+
+ Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
+
+ 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
+ <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __GUILE_IRRLICHT_FILE_LIST_H_INCLUDED__
+#define __GUILE_IRRLICHT_FILE_LIST_H_INCLUDED__
+
+#include <irrlicht/irrlicht.h>
+#include <libguile.h>
+#include "wrapped.h"
+
+extern "C" {
+
+ void
+ init_file_list (void);
+
+ DECLARE_WRAPPED_TYPE (irr::io::IFileList*, init_file_list_type,
+ file_list_p, wrap_file_list, unwrap_file_list);
+
+}
+
+#endif
#include "cursor-control.h"
#include "device.h"
#include "event-receiver.h"
-#include "file-archive.h"
-#include "file-system.h"
+#include "file-list.h"
#include "gsubr.h"
#include "gui.h"
#include "gui-element.h"
#include "gui-environment.h"
#include "guile-irrlicht.h"
+#include "io.h"
#include "keymap.h"
#include "material.h"
#include "mesh.h"
init_cursor_control ();
init_device ();
init_event_receiver ();
- init_file_archive ();
- init_file_system ();
init_gui ();
+ init_io ();
init_keymap ();
init_material ();
init_mesh ();
// Shared procedures (used by two or more objects)
DEFINE_GSUBR ("draw-all", 1, 0, 0, irr_drawAll);
- DEFINE_GSUBR ("get-position", 1, 1, 0, irr_getPosition);
+ DEFINE_GSUBR ("get-id", 1, 1, 0, irr_getID);
DEFINE_GSUBR ("get-name", 1, 0, 0, irr_getName);
+ DEFINE_GSUBR ("get-position", 1, 1, 0, irr_getPosition);
DEFINE_GSUBR ("set-material!", 2, 0, 0, irr_setMaterial);
DEFINE_GSUBR ("set-material-flag!", 3, 0, 0, irr_setMaterialFlag);
DEFINE_GSUBR ("set-position!", 2, 0, 0, irr_setPosition);
return SCM_UNSPECIFIED;
}
+ SCM
+ irr_getID (SCM wrapped_obj,
+ SCM index)
+ {
+ if (file_list_p (wrapped_obj))
+ {
+ return scm_from_uint32 (unwrap_file_list (wrapped_obj)->getID (scm_to_uint32 (index)));
+ }
+ else if (gui_element_p (wrapped_obj))
+ {
+ return scm_from_int32 (unwrap_gui_element (wrapped_obj)->getID ());
+ }
+ else if (scene_node_p (wrapped_obj))
+ {
+ return scm_from_int32 (unwrap_scene_node (wrapped_obj)->getID ());
+ }
+ else
+ {
+ scm_error (scm_arg_type_key, NULL, "Cannot get id from object: ~S",
+ scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
+ }
+ }
+
SCM
irr_getName (SCM wrapped_obj)
{
irr_drawAll (SCM wrapped_obj);
SCM
- irr_getPosition (SCM wrapped_obj,
- SCM i);
+ irr_getID (SCM wrapped_obj,
+ SCM index);
SCM
irr_getName (SCM wrapped_obj);
+ SCM
+ irr_getPosition (SCM wrapped_obj,
+ SCM i);
+
SCM
irr_setMaterial (SCM wrapped_obj,
SCM material);
--- /dev/null
+/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
+
+ Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
+
+ 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
+ <http://www.gnu.org/licenses/>.
+*/
+
+#include <irrlicht/irrlicht.h>
+#include <libguile.h>
+
+#include "file-archive.h"
+#include "file-list.h"
+#include "file-system.h"
+#include "io.h"
+
+extern "C" {
+
+ void
+ init_io (void)
+ {
+ // Init objects
+ init_file_archive ();
+ init_file_list ();
+ init_file_system ();
+
+ // Shared procedures (used by two or more objects)
+ }
+
+}
--- /dev/null
+/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
+
+ Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
+
+ 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
+ <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __GUILE_IRRLICHT_IO_H_INCLUDED__
+#define __GUILE_IRRLICHT_IO_H_INCLUDED__
+
+#include <irrlicht/irrlicht.h>
+#include <libguile.h>
+
+extern "C" {
+
+ void
+ init_io (void);
+
+}
+
+#endif