libCIrrlicht_la_SOURCES = \
src/CIrrlicht.cpp \
src/IAnimatedMeshSceneNode.cpp \
+ src/IFileSystem.cpp \
src/IGUIEnvironment.cpp \
src/IrrlichtDevice.cpp \
src/ISceneManager.cpp \
include/IAnimatedMeshMD2.h \
include/IAnimatedMeshSceneNode.h \
include/ICameraSceneNode.h \
+ include/IFileArchive.h \
+ include/IFileSystem.h \
include/IGUIElement.h \
include/IGUIEnvironment.h \
include/IGUIStaticText.h \
--- /dev/null
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+ Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+ This file is part of c-irrlicht.
+
+ c-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.
+
+ c-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 __C_I_FILE_ARCHIVE_H_INCLUDED__
+#define __C_I_FILE_ARCHIVE_H_INCLUDED__
+
+#include <irrlicht/irrTypes.h>
+
+typedef enum
+ {
+ //! A PKZIP archive
+ EFAT_ZIP = MAKE_IRR_ID('Z','I','P', 0),
+
+ //! A gzip archive
+ EFAT_GZIP = MAKE_IRR_ID('g','z','i','p'),
+
+ //! A virtual directory
+ EFAT_FOLDER = MAKE_IRR_ID('f','l','d','r'),
+
+ //! An ID Software PAK archive
+ EFAT_PAK = MAKE_IRR_ID('P','A','K', 0),
+
+ //! A Nebula Device archive
+ EFAT_NPK = MAKE_IRR_ID('N','P','K', 0),
+
+ //! A Tape ARchive
+ EFAT_TAR = MAKE_IRR_ID('T','A','R', 0),
+
+ //! A wad Archive, Quake2, Halflife
+ EFAT_WAD = MAKE_IRR_ID('W','A','D', 0),
+
+ //! The type of this archive is unknown
+ EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
+ } irr_io_E_FILE_ARCHIVE_TYPE;
+
+typedef void irr_io_IFileArchive;
+
+#endif
--- /dev/null
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+ Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+ This file is part of c-irrlicht.
+
+ c-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.
+
+ c-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 __C_I_FILE_SYSTEM_H_INCLUDED__
+#define __C_I_FILE_SYSTEM_H_INCLUDED__
+
+#include "IFileArchive.h"
+
+typedef void irr_io_IFileSystem;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ int irr_io_addFileArchive(irr_io_IFileSystem* filesystem,
+ const char* filename,
+ int ignoreCase,
+ int ignorePaths,
+ irr_io_E_FILE_ARCHIVE_TYPE archiveType,
+ const char* password,
+ irr_io_IFileArchive** retArchive);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
#ifndef __C_IRRLICHT_DEVICE_H_INCLUDED__
#define __C_IRRLICHT_DEVICE_H_INCLUDED__
+#include "IFileSystem.h"
#include "IGUIEnvironment.h"
#include "ISceneManager.h"
#include "IVideoDriver.h"
extern "C" {
#endif
+ irr_io_IFileSystem*
+ irr_getFileSystem(irr_IrrlichtDevice* device);
+
irr_gui_IGUIEnvironment*
irr_getGUIEnvironment(irr_IrrlichtDevice* device);
#include "IAnimatedMeshMD2.h"
#include "IAnimatedMeshSceneNode.h"
#include "ICameraSceneNode.h"
+#include "IFileArchive.h"
+#include "IFileSystem.h"
#include "IGUIEnvironment.h"
#include "IGUIElement.h"
#include "IGUIStaticText.h"
--- /dev/null
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+ Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+ This file is part of c-irrlicht.
+
+ c-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.
+
+ c-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 "IFileSystem.h"
+
+extern "C" {
+ int irr_io_addFileArchive(irr_io_IFileSystem* filesystem,
+ const char* filename,
+ int ignoreCase,
+ int ignorePaths,
+ irr_io_E_FILE_ARCHIVE_TYPE archiveType,
+ const char* password,
+ irr_io_IFileArchive** retArchive)
+ {
+ return ((irr::io::IFileSystem*)filesystem)
+ ->addFileArchive(filename,
+ ignoreCase,
+ ignorePaths,
+ (irr::io::E_FILE_ARCHIVE_TYPE)archiveType,
+ password,
+ (irr::io::IFileArchive**)retArchive);
+ }
+
+}
#include "IrrlichtDevice.h"
extern "C" {
+ irr_io_IFileSystem*
+ irr_getFileSystem(irr_IrrlichtDevice* device)
+ {
+ return ((irr::IrrlichtDevice*)device)->getFileSystem();
+ }
+
irr_gui_IGUIEnvironment*
irr_getGUIEnvironment(irr_IrrlichtDevice* device)
{