Tony Kemp <[EMAIL PROTECTED]> writes: > > Hi, > > I've written a simple macro that places a vecto image at the centre of > the SDL *default-display*, calculating the co-ordinates based upon the > size of the *default-display* and the size of the vecto image. I am > trying to get the size of the *default-display* using sdl-base:surf-w > and sdl:base:surf-h rather than hard-coding the values, but when I do > so, I get the following error:
Hi Tony, *default-display*, *default-surface* etc. are CLOS objects. The functions in SDL-BASE expect foreign pointers. If you want to use sdl-base::surf-w and sdl- base:surf-h then you must pass the functions in SDL-BASE the pointer to the SDL surface stored in *default-display* using SDL:FP. For example: (sdl-base::surf-w (sdl:fp *default-display*)) (sdl-base::surf-h (sdl:fp *default-display*)) However I would suggest using the accessors in the SDL package to do the same thing. For example: (sdl:width *default-display*) (sdl:height *default-display*) - Luke _______________________________________________ application-builder mailing list [email protected] http://www.lispniks.com/mailman/listinfo/application-builder
