1 ;;; guile-irrlicht --- FFI bindings for Irrlicht Engine
2 ;;; Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
4 ;;; This file is part of guile-irrlicht.
6 ;;; Guile-irrlicht is free software; you can redistribute it and/or modify
7 ;;; it under the terms of the GNU Lesser General Public License as
8 ;;; published by the Free Software Foundation; either version 3 of the
9 ;;; License, or (at your option) any later version.
11 ;;; Guile-irrlicht is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;; General Public License for more details.
16 ;;; You should have received a copy of the GNU Lesser General Public
17 ;;; License along with guile-irrlicht. If not, see
18 ;;; <http://www.gnu.org/licenses/>.
21 (define-module (irrlicht io)
22 #:use-module (oop goops)
23 #:use-module (ice-9 optargs)
24 #:use-module (irrlicht foreign)
25 #:use-module (irrlicht irr))
28 ;; IAttributeExchangingObject
29 (define-class <attribute-exchanging-object> (<reference-counted>)
30 (irr-class #:init-value "IAttributeExchangingObject"))
32 (export <attribute-exchanging-object>)
36 (define-class <file-archive> (<reference-counted>)
37 (irr-class #:init-value "IFileArchive"))
39 (export <file-archive>)
43 (define-class <file-system> (<reference-counted>)
44 (irr-class #:init-value "IFileSystem"))
46 (define-method (add-file-archive! (file-system <file-system>) filename . rest)
50 (archive-type 'unknown)
52 (ret-archive (make <file-archive>)))
53 (let ((addFileArchive (get-irrlicht-proc "addFileArchive" file-system)))
55 file-system filename ignore-case ignore-paths archive-type password ret-archive))))
57 (export <file-system> add-file-archive!)