On Wed, 2006-07-26 at 07:47 -0700, Luke J Crook wrote: > Samium Gromoff wrote: > > i sbcl --load a .lisp file containing the two folowing toplevels, only: > > > > (asdf:oos 'asdf:load-op 'lispbuilder-sdl) > > > > (let ((foo 1)) > > (sdl_videoinfo-flags foo)) > > > > ; in: LAMBDA NIL > > ; (SDL_VIDEOINFO-FLAGS FOO) > > ; > > ; caught STYLE-WARNING: > > ; undefined function: SDL_VIDEOINFO-FLAGS > > > ; caught STYLE-WARNING: > > ; This function is undefined: > > ; SDL_VIDEOINFO-FLAGS > > > > The function SDL_VIDEOINFO-FLAGS is undefined. > > > > You are calling the incorrect function incorrectly. hehe. > > Use SDL:GET-VIDEO-INFO > > "Returns information about the video hardware. > GET-VIDEO-INFO :video-info <pointer to a SDL_VIDEOINFO structure> > :info (one of :hw_available | :wm_available | > :blit_hw | :blit_hw_cc | :blit_hw_a | > :blit_sw | :blit_sw_cc | :blit_sw_a | > :blit_fill | > :video_mem | > :pixelformat ) > Usage: get-video-info should be called after sdl_init > > e.g (get-video-info :info :video_mem), or > (get-video-info :video-info (sdl_getvideoinfo) :info :video_mem) > > Will return the amount video memory available."
No no, the above example does not, indeed, reflect my needs, other than the need to access a field of a structure -- and that this very access cannot be performed is, in fact, the culprit. It is not that i am unaware that the SDL_VideoInfo structure has to be initialised by a call to SDL_GetVideoInfo -- it is that i cannot /use/ the structure after that, because the accessor is undefined. > So your code should look like: > > (let ((foo (sdl:get-video-info :info :video_mem))) > (format t "foo is: ~A~%" foo)) > > You need to call sdl:get-video-info within an sdl:with-init() or > something nasty may happen. This i did not know... > - Luke regards, Samium Gromoff _______________________________________________ application-builder mailing list application-builder@lispniks.com http://www.lispniks.com/mailman/listinfo/application-builder