It isn't SDL, it's Tk; but see Anatomy of an Eventloop. It may give you an idea of what is going on in SDL.
P.S. I tried to run your code, but couldn't find what "use btype" is, or "ship.pm". Your code is indeed a batch of spaghetti. :-)
In reply to Re^5: SDLx::App event loop
by zentara
in thread SDLx::App event loop
by Ransom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |