rem: SetSemaphore (GraphicsSem);
context: PauseGame (void){	RECT r;	STAMP s;	BOOLEAN ClockActive;	CONTEXT OldContext;	FRAME F;	HOT_SPOT OldHot;	if (ActivityFrame == 0			|| (GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_PAUSE))			|| (LastActivity & (CHECK_LOAD | CHECK_RESTART)))		return (FALSE);			GLOBAL (CurrentActivity) |= CHECK_PAUSE;	ClockActive = (BOOLEAN)(			LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE			&& GameClockRunning ()			);	if (ClockActive)		SuspendGameClock ();	else if (CommData.ConversationPhrases && PlayingTrack ())		PauseTrack ();	SetSemaphore (GraphicsSem);	OldContext = SetContext (ScreenContext);	OldHot = SetFrameHot (Screen, MAKE_HOT_SPOT (0, 0));	GetFrameRect (ActivityFrame, &r);	r.corner.x = (SCREEN_WIDTH - r.extent.width) >> 1;	r.corner.y = (SCREEN_HEIGHT - r.extent.height) >> 1;	s.origin = r.corner;	s.frame = ActivityFrame;	F = CaptureDrawable (LoadDisplayPixmap (&r, (FRAME)0));	DrawStamp (&s);	ClearSemaphore (GraphicsSem);	FlushGraphics ();	SetSemaphore (GraphicsSem);	{		BYTE scan;		scan = KBDToUNICODE (SK_F1);		while (KeyDown (scan))			TaskSwitch ();	}	FlushInput ();	while (KeyHit () != SK_F1)		TaskSwitch ();	s.frame = F;	DrawStamp (&s);	DestroyDrawable (ReleaseDrawable (s.frame));	SetFrameHot (Screen, OldHot);	SetContext (OldContext);	WaitForNoInput (ONE_SECOND / 4);	FlushInput ();	ClearSemaphore (GraphicsSem);	if (ClockActive)		ResumeGameClock ();	else if (CommData.ConversationPhrases && PlayingTrack ())		ResumeTrack ();	TaskSwitch ();	GLOBAL (CurrentActivity) &= ~CHECK_PAUSE;	return (TRUE);}