On Fri, 2004-02-13 at 09:21, Jens Rieks wrote: > This patch fixes _SDL_WaitEvent a bit; SDL_WaitEvent returns an integer and > not a SDL_Event. > It also introduces _SDL_PollEvent which is mostly a copy of _SDL_WaitEvent. > Finally, _SDL_loop is modified to allow an "idle" event entry that gets called > if no events are pending. If such an event is defined, _SDL_PollEvent is used > to check whether events are pending. The idle callback is made every 50ms, > "timer callback" might be a better name.
Thanks, applied with a few tweaks. We can figure out a slightly nicer interface as we start to use it in real PIR programs -- and from higher level languages. > It is also necessary to add code for SDL_PollEvent to library/sdl.pasm. Done. > I propose to rename this file to sdl_init.pasm; I'am working on a sdl.imc file > that makes it much easier to use SDL with PIR, because it hides much of the > 'internals'. I will send the file to the list in a few minutes (the > documentation if not yet sufficient at the moment). I'm not sure of the best way to organize these. Maybe we should wait until object support improves. On the other hand, I would like to see how Perl 6 or Pirate would call these libraries before commiting one way or the other. -- c