[corman-sdl-cvs] CVS update: corman-sdl/ffi/sdl-util.lisp

Luke J Crook lcrook at common-lisp.net
Wed Apr 21 01:23:08 UTC 2004


Update of /project/corman-sdl/cvsroot/corman-sdl/ffi
In directory common-lisp.net:/tmp/cvs-serv28576/ffi

Modified Files:
	sdl-util.lisp 
Log Message:

Date: Tue Apr 20 21:23:07 2004
Author: lcrook

Index: corman-sdl/ffi/sdl-util.lisp
diff -u corman-sdl/ffi/sdl-util.lisp:1.1 corman-sdl/ffi/sdl-util.lisp:1.2
--- corman-sdl/ffi/sdl-util.lisp:1.1	Tue Apr 13 13:09:40 2004
+++ corman-sdl/ffi/sdl-util.lisp	Tue Apr 20 21:23:07 2004
@@ -11,7 +11,7 @@
 (in-package :sdl)
 
 (export '(for while aif fformat to-radian to-degree calculate-timescale get-timescale display flip with-locksurface
-        DisplayFormat set-flags init-sdl set-videomode destruct-sdl geterror with-events with-init loadbmp
+        DisplayFormat set-flags init-sdl set-videomode new-screen destruct-sdl geterror with-events with-init loadbmp
         get-key new-event new-rect push-quitevent getvideoinfo listmodes videomodeok add-surface get-surface
         calculate-timescale init-success pixelformat fill-display clear-display blit-to-display blit-to-surface
         fill-surface update-display set-colorkey clear-colorkey is-key moveby-rectangle moveto-rectangle
@@ -133,6 +133,14 @@
         (if (ct:cpointer-null surface)
             (set-display nil)
             (set-display surface))))
+
+(defun new-screen (width height &key (bpp 0) (flags sdl:SDL_SWSURFACE))
+    "A synonym for set-videomode.
+    Sets the videomode.
+    Returns a new SDL_Surface if successful.
+    Returns NIL if failed.
+    Use the function (DISPLAY) to retrieve the SDL_Surface returned by NEW SCREEN."
+    (set-videomode width height :bpp bpp :flags flags))
 
 (defun destruct-sdl ()
     "Shuts down SDL using SDL_Quit"





More information about the Corman-sdl-cvs mailing list