rem: SleepTask (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));
add: SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));
context: DoRestart (INPUT_STATE InputState, PMENU_STATE pMS){	if (!pMS->Initialized)	{		DrawRestartMenu ((BYTE)~0, pMS->CurState, pMS->CurFrame);		pMS->Initialized = TRUE;		{			BYTE clut_buf[] = {FadeAllToColor};							SleepTask (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));		}	}#ifdef TESTINGelse if (InputState & DEVICE_EXIT) return (FALSE);#endif /* TESTING */	else if (InputState == 0)	{		if (GetTimeCounter () - InTime < ONE_SECOND * 15)			return (TRUE);		GLOBAL (CurrentActivity) = (ACTIVITY)~0;		return (FALSE);	}	else if (InputState & DEVICE_BUTTON1)	{		switch (pMS->CurState)		{			case LOAD_SAVED_GAME:				LastActivity = CHECK_LOAD;				GLOBAL (CurrentActivity) = IN_INTERPLANETARY;				break;			case START_NEW_GAME:				LastActivity = CHECK_LOAD | CHECK_RESTART;				GLOBAL (CurrentActivity) = IN_INTERPLANETARY;				break;			case PLAY_SUPER_MELEE:				GLOBAL (CurrentActivity) = SUPER_MELEE;				break;		}		SetSemaphore (&GraphicsSem);		SetFlashRect (NULL_PTR, (FRAME)0);		ClearSemaphore (&GraphicsSem);		return (FALSE);	}	else	{		BYTE NewState;		NewState = pMS->CurState;		if (GetInputXComponent (InputState) > 0				|| GetInputYComponent (InputState) > 0)		{			if (NewState-- == START_NEW_GAME)				NewState = PLAY_SUPER_MELEE;		}		else if (GetInputXComponent (InputState) < 0				|| GetInputYComponent (InputState) < 0)		{			if (NewState++ == PLAY_SUPER_MELEE)				NewState = START_NEW_GAME;		}		if (NewState != pMS->CurState)		{			DrawRestartMenu (pMS->CurState, NewState, pMS->CurFrame);			pMS->CurState = NewState;		}	}	InTime = GetTimeCounter ();	return (TRUE);}