#:use-module (irrlicht base)
#:use-module (irrlicht device)
#:use-module (irrlicht gui)
+ #:use-module (irrlicht io)
#:use-module (irrlicht irr)
#:use-module (irrlicht scene)
#:use-module (irrlicht video)
#:duplicates (merge-generics)
#:re-export (add-animated-mesh-scene-node!
add-camera-scene-node!
+ add-file-archive!
add-static-text!
begin-scene
create-device
drop!
end-scene
+ get-file-system
get-gui-environment
get-mesh
+ get-name
get-scene-manager
get-texture
get-video-driver
#:use-module (oop goops)
#:use-module (irrlicht base)
#:use-module (irrlicht foreign)
+ #:use-module (irrlicht io)
#:use-module (irrlicht irr)
#:use-module (irrlicht gui)
#:use-module (irrlicht scene)
vsync
receiver)))
+(define-method (get-file-system (device <irrlicht-device>))
+ (let ((getFileSystem (get-irrlicht-proc "getFileSystem" device)))
+ (make <file-system>
+ #:irr-pointer (getFileSystem device))))
+
(define-method (get-gui-environment (device <irrlicht-device>))
(let ((getGUIEnvironment (get-irrlicht-proc "getGUIEnvironment" device)))
(make <gui-environment>
((get-irrlicht-proc "setWindowCaption" device)
device text))
-(export create-device get-gui-environment get-scene-manager get-video-driver run
+(export create-device get-file-system get-gui-environment get-scene-manager get-video-driver run
set-window-caption!)
(define remote-proc-table (make-hash-table))
(define (get-irrlicht-proc proc-name . objects)
+ (format #t "Objects: ~a ~a~%" objects irr-class)
+ (format #t "Classes: ~a~%" (map irr-class objects))
(let* ((name (if (null? objects)
proc-name
(let ((classes (map irr-class objects)))
(define-module (irrlicht io)
#:use-module (oop goops)
+ #:use-module (ice-9 optargs)
#:use-module (irrlicht foreign)
#:use-module (irrlicht irr))
(irr-class #:init-value "IAttributeExchangingObject" #:getter irr-class))
(export <attribute-exchanging-object>)
+
+
+;;IFileArchive
+(define-class <file-archive> (<reference-counted>)
+ (irr-class #:init-value "IFileArchive" #:getter irr-class))
+
+(export <file-archive>)
+
+
+;;IFileSystem
+(define-class <file-system> (<reference-counted>)
+ (irr-class #:init-value "IFileSystem" #:getter irr-class))
+
+(define-method (add-file-archive! (file-system <file-system>) filename . rest)
+ (let-keywords rest #f
+ ((ignore-case #t)
+ (ignore-paths #t)
+ (archive-type 'unknown)
+ (password "")
+ (ret-archive (make <file-archive>)))
+ (let ((addFileArchive (get-irrlicht-proc "addFileArchive" file-system)))
+ (addFileArchive
+ file-system filename ignore-case ignore-paths archive-type password ret-archive))))
+
+(export <file-system> add-file-archive!)
((get-irrlicht-proc "endScene" video-driver)
video-driver))
+(define-method (get-name (video-driver <video-driver>))
+ (let ((getName (get-irrlicht-proc "getName" video-driver)))
+ (getName video-driver)))
+
(define-method (get-texture (video-driver <video-driver>) filename)
(make <texture>
#:irr-pointer
video-driver
filename)))
-(export <video-driver> begin-scene end-scene get-texture)
+(export <video-driver> begin-scene end-scene get-name get-texture)
#include "rect.h"
#include "vertex3d.h"
#include "video-driver.h"
+#include "wchar.h"
#include "wrapped.h"
using namespace irr;
return scm_from_int32 (driver->getFPS ());
}
+SCM
+IVideoDriver_getName (SCM video_driver)
+{
+ video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_irr_pointer (video_driver);
+ return scm_from_wide_char_string (driver->getName ());
+}
+
SCM
IVideoDriver_getTexture (SCM video_driver,
SCM filename)
IVideoDriver_drawVertexPrimitiveList);
DEFINE_GSUBR ("IVideoDriver_endScene", 1, 0, 0, IVideoDriver_endScene);
DEFINE_GSUBR ("IVideoDriver_getFPS", 1, 0, 0, IVideoDriver_getFPS);
+ DEFINE_GSUBR ("IVideoDriver_getName", 1, 0, 0, IVideoDriver_getName);
DEFINE_GSUBR ("IVideoDriver_getTexture", 2, 0, 0, IVideoDriver_getTexture);
DEFINE_GSUBR ("IVideoDriver_setMaterial", 2, 0, 0, IVideoDriver_setMaterial);
DEFINE_GSUBR ("IVideoDriver_setTransform", 3, 0, 0, IVideoDriver_setTransform);