('opengl ffi-video:EDT_OPENGL)
('count ffi-video:EDT_COUNT))))
(let ((device (ffi:create-device driver
- (dimension2d->pointer window-size)
+ (foreign-record->pointer window-size)
bits
(bool->integer fullscreen)
(bool->integer stencilbuffer)
#:export (dimension2d
make-dimension2d
dimension2d?
- dimension2d->pointer
dimension2d-width
dimension2d-height))
(define-foreign-record-type dimension2d
(make-dimension2d width height)
dimension2d?
- dimension2d->pointer
(width uint32 dimension2d-width)
(height uint32 dimension2d-height))
#:use-module (system foreign)
#:use-module ((irrlicht bindings core) #:prefix ffi-core:)
#:use-module ((irrlicht bindings gui) #:prefix ffi-gui:)
- #:use-module (irrlicht rect)
#:use-module (irrlicht util)
#:export (add-static-text!
gui-draw-all
(fill-background #f))
(ffi-gui:add-static-text gui-env
(string->pointer text)
- (rect->pointer rectangle)
+ (foreign-record->pointer rectangle)
(bool->integer border)
(bool->integer word-wrap)
parent
#:export (rect
make-rect
rect?
- rect->pointer
rect-x
rect-y
rect-x2
(define-foreign-record-type rect
(make-rect x y x2 y2)
rect?
- rect->pointer
(x int32 rect-x)
(y int32 rect-y)
(x2 int32 rect-x2)
#:export (bool->integer
integer->bool
define-foreign
- define-foreign-record-type))
+ define-foreign-record-type
+ foreign-record->pointer))
(define (bool->integer var)
(if var 1 0))
(iota (length field-specs))))
(syntax-case x ()
- ((_ name (make-name make-arg ...) predicate? unwrap-record field-spec ...)
+ ((_ name (make-name make-arg ...) predicate? field-spec ...)
(with-syntax (((type-id ...) (field-types #'(field-spec ...)))
((field-name ...) (field-names #'(field-spec ...)))
(((getter getter-id) ...) (field-getters #'(field-spec ...)))
(else #f))))
(if procedure
(apply procedure bv 0 value '()))))
+
+(define (foreign-record->pointer record)
+ (struct-ref record 0))