[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] sdl.egg v0.2

From: Alex Shinn
Subject: Re: [Chicken-users] sdl.egg v0.2
Date: Wed, 03 Nov 2004 05:00:38 -0600
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Tue, 02 Nov 2004 16:59:10 +0000, Tony Garnock-Jones wrote:
> I've followed Alex' suggestions (I hope in the way he intended - Alex?). 

Yes, this is great!  It's now compatible with a lot of my existing SDL
code :)

Your definition of sdl-with-clip-rect uses the wrong procedure names
though, it should be

(define (sdl-with-clip-rect s r thunk)
  (let ((orig-clip-rect (make-sdl-rect 0 0 0 0)))
        (lambda ()
          (sdl-get-clip-rect! s orig-clip-rect)
          (sdl-set-clip-rect! s r))
        (lambda ()
          (sdl-set-clip-rect! s orig-clip-rect)))))

I agree with you that using numbers for flags instead of symbols is
simpler and makes more sense for tight C integeration.  However, in
the README you should probably recommend using bitwise-ior for joining
flags rather than +, since a common idiom is

  (bitwise-ior current-flags new-flag)

and here + instead of bitwise-ior would fail if the flag was already
set.  Unsetting a flag would be

  (bitwise-and current-flags (bitwise-not del-flag))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]