Talkback #1 written by Zip on 2004-06-12.
void Wait(int wait_delay)Use to stop everything for a set unit of time. Good for a quick delay, but will prevent all processing, screen display and inputs during that time: so not good if any of those things still need to be going on.
// Does nothing for set time period
// Pass: how long to wait for in 100ths of a second
// Credit to Shadow64 for ShadowClock here
{
int wait_till = timer + wait_delay + 1; // Sets when the delay will run till
wait_delay = timer; // Record current timer value (see below)
while(timer < wait_till) // Untill time is reached
{
UpdateControls(); // Check inputs
}
timer = wait_delay; // Reset timer to what it started as (optional)
}
void autoexec()
{
int i; // To increase over time
for(i = 0; i < 10; i++) // Adds one each time until 10 is reached
{
// Prints the current number in the buffer
PrintString(10 * i, 10, screen, 0, "..."+str(i));
ShowPage(); // Puts the buffer on the screen
Wait(100); // Waits 1 second
}
exit("10 seconds passed");
}
Doc Nav |
Your docs |