Chicken SDL v0.3p1
Wed 1 Dec 2004 13:50 GMT
A new release of chicken-sdl is available from our arch archive. You can download the egg file here.
Below is the relevant part of the changelog:
2004-12-01 13:18:11 GMT Tony Garnock-Jones <tonyg@kcbbs.gen.nz> patch-10 Summary: Incorporate changes suggested by Alex Shinn Revision: chicken-sdl--main--0--patch-10 - (sdl-fill-rect) is now generic in the kind of colour it expects - either an unsigned integer, or an SDL_Color structure. - Added procedures (ttf-size-text!) and (ttf-size-utf8!). 2004-11-19 16:38:01 GMT Tony Garnock-Jones <tonyg@lshift.net> patch-9 Summary: Returned TTF_Fonts now have a NULL check Revision: chicken-sdl--main--0--patch-9 Previously, calling (ttf-open-font) when the path specified was invalid in some way would result in the construction of a ttf-font structure with a pointer value of #f, and there was no way of checking the success or failure of (ttf-open-font) without explicitly calling (ttf-font-pointer), which is bad style. I've changed the foreign-type wrap procedure to check for a #f pointer before constructing the ttf-font structure. If the pointer is #f, the whole result is #f - otherwise a ttf-font structure is built as usual. 2004-11-15 12:09:04 GMT Tony Garnock-Jones <tonyg@kcbbs.gen.nz> patch-8 Summary: Replace timer functionality Revision: chicken-sdl--main--0--patch-8 It is problematic supporting SDL_AddTimer and SDL_RemoveTimer from chicken, since they a) are implemented using setitimer(2) and b) involve callbacks from C to Scheme. Each would be fine on its own, but taken together they interfere with the main Scheme thread. As it happens, the SDL_WaitEvent function is implemented in terms of polling (!) for events, with a short delay if none present themselves - the usual pragmatic tradeoff for event-based systems on Unix-like machines - and so we will be doing no worse if we do a similar thing ourselves. Hence, I've written a Scheme-based timer library which integrates with SDL's event loop, calling SDL_Delay(10) when there's no work just like SDL_WaitEvent. This does of course mean that the user must now either use (sdl-wait-event!), which manages timeouts itself, or must instead somehow arrange for periodic calls to (sdl-process-timer-queue!). The timer library is implemented in timer.scm, and depends on a leftist-heap implementation from heap.scm. These two modules ought probably to be split out into eggs of their own, and distributed as part of some kind of general utility library for chicken. For now, they're (include)d directly into sdl.scm, to avoid needing to install more than one file for this extension.