#:use-module ((irrlicht bindings) #:prefix ffi:)
#:use-module ((irrlicht bindings core) #:prefix ffi-core:)
#:use-module ((irrlicht bindings video) #:prefix ffi-video:)
+ #:use-module (irrlicht util)
#:export (create-device
get-cursor-control
get-file-system
('count ffi-video:EDT_COUNT)))
(wsize (make-c-struct ffi-core:dimension2d window-size)))
(let ((device (ffi:create-device driver wsize bits
- (if fullscreen 1 0)
- (if stencilbuffer 1 0)
- (if vsync 1 0))))
+ (bool->integer fullscreen)
+ (bool->integer stencilbuffer)
+ (bool->integer vsync))))
(if (null-pointer? device) #f device))))
(define (get-cursor-control device)
(ffi:get-scene-manager device))
(define (is-window-active? device)
- (if (> (ffi:is-window-active device) 0) #t #f))
+ (integer->bool (ffi:is-window-active device)))
(define (set-window-caption! device text)
(ffi:set-window-caption device (string->pointer text)))
(define (device-run? device)
- (if (> (ffi:run device) 0) #t #f))
+ (integer->bool (ffi:run device)))
(define (device-drop! device)
- (if (> (ffi:drop device) 0) #t #f))
+ (integer->bool (ffi:drop device)))