Every effort has been made to make certain that this library functions in the same manner as the C SDL library. However, certain changes were made to better fit Scheme. The following differences in functionality should be noted: NAMING CONVENTIONS: ------------------- Structure, variable, and function names were changed to a Scheme style. Examples: SLD_PixelFormat => sdl-pixel-format SDL_CreateRGBSurface => sdl-create-rgb-surface STRUCTURES: ----------- Structure members cannot be accessed as in C so many accessor functions were written. SDL FUNCTIONS: -------------- sdl-list-modes: Rather than returning an array of pointers, a proper list of 's is returned. sdl-update-rects: The "rects" parameters is a proper list of 's. sdl-set-colors: The "colors" parameters is a proper list of 's. sdl-set-palette: The "colors" parameters is a proper list of 's. sdl-get-gamma-ramp: Each parameter is a of size 256. sdl-set-gamma-ramp: Each parameter is a of size 256. sdl-get-rgb: Instead of updating three parameters, a list containing r, g, and b values is returned. sdl-get-rgba: Instead of updating four parameters, a list containing r, g, b, and a values is returned. sdl-create-rgb-surface-from: The pixels parameter is a of any size. sdl-create-cursor: The data and mask parameters are of any size. sdl-must-lock: Used in place of the macro SDL_MUSTLOCK, it returns #t or #f. sdl-wm-set-icon: The mask parameter is a of any size. sdl-peep-events: Instead of updating the events parameter, a list containing the events is returned. sdl-get-key-state: Returns a . sdl-get-mouse-state: Instead of updating two parameters, a list containing the button, x and y is returned. sdl-get-relative-mouse-state: Instead of updating two parameters, a list containing the button, x and y is returned. sdl-joystick-get-ball: Instead of updating two parameters, a list containing x and y is returned. sdl-open-audio: Instead of updating the obtained parameter, an is returned. sdl-load-wav: Takes only the file parameter. Returns an object. The functions sdl-wav-audio-spec and sdl-wav-buffer were created to allow access to the WAV data. sdl-mix-audio: The dst and src parameters are of any length. sdl-rw-read: Instead of updating the ptr parameter, a is returned. SDL_GFX FUNCTIONS: ------------------ sdl-init-framerate: Instead of updating the manager parameter, an is returned. SDL_IMAGE FUNCTIONS: -------------------- img-load-rw: The freesrc parameter is not used since handle their own garbage collection. img-load-typed-rw: The freesrc parameter is not used since handle their own garbage collection. img-read-xmp-from-array: The src parameter is a of any length. img-is-*: Instead of returning 1 or 0, #t or #f is returned. SDL_MIXER FUNCTIONS: -------------------- mix-query-spec: Instead of updating three parameters, a list of frequency, format, and channels is returned. mix-load-wav-rw: The freesrc parameter is not used. mix-quick-load-wav: The mem parameter is a . mix-quick-load-raw: The mem parameter is a . The len parameter is not used, but taken to be the size of the . SDL_TTF FUNCTION: ----------------- ttf-size-text: The ttf-size-utf8 and ttf-size-unicode are not necessary for Gauche as Gauche has one internal encoding for strings. By default, this library assumes Gauche has been compiled with UTF-8 encoding. Future versions of sdl.ttf will convert non-UTF-8 strings into UTF-8 strings if Gauche is compiled for a different encoding. It is suggested that Gauche always be compiled for UTF-8 as this and other libraries rely heavily on UTF-8. ttf-render-text-*: As with ttf-size-text, the ttf-render-utf8-* and ttf-render-unicode-* functions are not necessary. MISCELLANEOUS: -------------- I decided against including the SDL thread API, figuring the Gauche thread mechanism should be used instead. I haven't figured out how to make C callback functions from Scheme closures, so some features of the SDL library are not yet available: SDL_GL_GetProcAddess, SDL_SetEventFilter, SDL_GetEventFilter, SDL_AddTimer, SDL_RemoveTimer, and SDL_SetTimer