Permalink
Browse files

Added error conditionification to ilut.

  • Loading branch information...
Ralith authored and Josh Marchán committed Jan 18, 2010
1 parent f975abf commit 1c45e0dab610285a6818e1e868c7d4c9cb8ee4af
Showing with 27 additions and 13 deletions.
  1. +27 −13 ilut.lisp
View
@@ -32,26 +32,40 @@
(:direct3d8 3)
(:direct3d9 4))
-(defcfun ("ilutRenderer" renderer) :boolean (renderer renderer))
-(defcfun ("ilutEnable" enable) :boolean (state state-definition))
-(defcfun ("ilutDisable" disable) :boolean (state state-definition))
-(defcfun ("ilutGetBoolean" get-boolean) :boolean (state state-definition))
-(defcfun ("ilutInit" init) :boolean)
+(defcfun ("ilutRenderer" %renderer) :boolean (renderer renderer))
+(deferrwrap renderer (renderer))
+(defcfun ("ilutEnable" %enable) :boolean (state state-definition))
+(deferrwrap enable (state))
+(defcfun ("ilutDisable" %disable) :boolean (state state-definition))
+(deferrwrap disable (state))
+(defcfun ("ilutGetBoolean" %get-boolean) :boolean (state state-definition))
+(deferrwrap get-boolean (state))
+(defcfun ("ilutInit" %init) :boolean)
+(deferrwrap init)
;;; OpenGL
(defcfun ("ilutGLBindTexImage" gl-bind-tex-image) :uint)
(defcfun ("ilutGLBindMipmaps" gl-bind-mipmaps) :uint)
-(defcfun ("ilutGLBuildMipmaps" gl-build-mipmaps) :boolean)
+(defcfun ("ilutGLBuildMipmaps" %gl-build-mipmaps) :boolean)
+(deferrwrap gl-build-mipmaps)
(defcfun ("ilutGLLoadImage" gl-load-image) :uint (file-name :string))
-(defcfun ("ilutGLScreen" gl-screen) :boolean)
-(defcfun ("ilutGLScreenie" gl-screenie) :boolean)
-(defcfun ("ilutGLSaveImage" gl-save-image) :boolean (file-name :string) (tex-id :uint))
-(defcfun ("ilutGLSetTex" gl-set-tex) :boolean (tex-id :uint))
-(defcfun ("ilutGLTexImage" gl-tex-image) :boolean (level :uint))
-(defcfun ("ilutGLSubTex" gl-sub-tex) :boolean (tex-id :uint) (x-offset :uint) (y-offset :uint))
+(defcfun ("ilutGLScreen" %gl-screen) :boolean)
+(deferrwrap gl-screen)
+(defcfun ("ilutGLScreenie" %gl-screenie) :boolean)
+(deferrwrap gl-screenie)
+(defcfun ("ilutGLSaveImage" %gl-save-image) :boolean (file-name :string) (texture-id :uint))
+(deferrwrap gl-save-image (file-name texture-id))
+(defcfun ("ilutGLSetTex" %gl-set-tex) :boolean (texture-id :uint))
+(deferrwrap gl-set-tex (texture-id))
+(defcfun ("ilutGLTexImage" %gl-tex-image) :boolean (level :uint))
+(deferrwrap gl-tex-image (level))
+(defcfun ("ilutGLSubTex" %gl-sub-tex) :boolean (texture-id :uint) (x :uint) (y :uint))
+(deferrwrap gl-sub-tex (texture-id x y))
;;; SDL
#-win32
(defcfun ("ilutConvertToSDLSurface" convert-to-sdl-surface) :pointer (flags :uint))
#-win32
(defcfun ("ilutSDLSurfaceLoadImage" sdl-surface-load-image) :pointer (file-name :string))
#-win32
-(defcfun ("ilutSDLSurfaceFromBitmap" sdl-surface-from-bitmap) :boolean (surface :pointer))
+(progn
+ (defcfun ("ilutSDLSurfaceFromBitmap" %sdl-surface-from-bitmap) :boolean (surface :pointer))
+ (deferrwrap sdl-surface-from-bitmap (surface)))

0 comments on commit 1c45e0d

Please sign in to comment.