This is basically a simplified version of the ScummVM coroutines,
since we just need the ability to consistently break out to the
main game loop when a call is made to the error method
I'm going to be shortly formatting the code and doing refactoring
to work around the setjmp calls in the original, so there's little
point in keeping the system specific ifdef blocks from the original