This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Cannot run "Breakout" from sebity.com

3 posts · 3674 views

A co-worker is asking for my help in trying to run the game "Breakout" which is found on http://www.sebity.com/games/breakout.php but we are stumped. We are using CLISP in Windows 7 32 bit OS, and we are have tried installing Quicklisp but we are encountering the "not a 32-bit integer: -1" error. We don't have any background on LISP and we are not even sure if the said source code could run in Windows.

Can anyone enlighten us please? TIA

http://i.imgur.com/dGksAQ4.jpg?1

Re: Cannot run "Breakout" from sebity.com

Well, this is interesting. At least I learned something today. It's bugfuck nuts, but it's definitely something. See, the SDL_ListModes function—which is called by the code in question—has a return type of a pointer (specifically: a pointer to a pointer), but one of the possible return values is -1.

Now, I thought I was fluent in C, but I didn't even know that worked, since I was never mentally imbalanced enough to try it. The effect is to return an all-bits-1 pointer, or (depending on how you look at it, I guess) an actual 'negative' pointer. So the Lisp interface to SDL is attempting to replicate this idiom (as a load-time-value) in order to interpret the return value.

And CLISP, apparently, chokes on the idiom—I say apparently because I don't have CLISP installed, but CFFI:INC-POINTER is defined in terms of two CLISP functions that deal only with unsigned integers—namely, FOREIGN-ADDRESS-UNSIGNED and UNSIGNED-FOREIGN-ADDRESS. So somebody who knows CLISP should step in here and figure out how to cope with it.