[ab] Bug in sdl:draw-pixel-* and sdl:read-pixel-*

Luke Crook luke at balooga.com
Tue Dec 18 15:09:26 CST 2007


Michael Ben-Yosef <septagon at ...> writes:

> In the definitions of the above-mentioned lispbuilder-sdl functions, the 
> macro sdl-base::check-bounds is used incorrectly, with (width surface) 
> and (height surface) as the upper bounds, instead of (- (width surface) 
> 1) and (- (height surface) 1), respectively. 

Ok, thanks for that fix. I'll add the patch to SVN.

> I haven't had any problems with sdl-gfx:draw-pixel-*. (Now I see that 
> the SDL_gfx library does the range checking itself.) If one uses 
> lispbuilder-sdl-gfx, should one use the sdl-gfx version of a symbol 
> whenever it is exported by both the sdl and sdl-gfx packages?

If you are using the sdl_gfx library then you may as well use the functions in 
lispbuilder-sdl-gfx as these functions will always be more efficient than the 
Lisp native functions in lispbuilder-sdl. However, 90% of the functions in 
SDL_gfx have lispbuilder-sdl equivalents.

What functions in sdl-gfx are you using?

- Luke



More information about the application-builder mailing list