Is there a command in Saturn C that is similiar to SLEEP in basic. That stops the program until a button is pressed or the time goes out? Please help. I am making a game and i would need this!
That won't do what he was asking for... I think what's needed is something like this (again, this isn't guaranteed to be correct):
Code:
void sleepuntilbutton (Uint32 frames)
{
while (frames > 0)
{
SlSynch();
if (Smpc_Peripheral[0].data && PER_DGT_TX) return;
frames--
}
}
This would (in theory) sleep for the specified number of frames, or until the X button is pressed. Of course, for a "real" program you'd probably want to abstract the button handling somehow...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.