rem: SetSemaphore (&GraphicsSem);
add: SetSemaphore (GraphicsSem);
context: AlienTalkSegue (COUNT wait_track){	if ((GLOBAL (CurrentActivity) & CHECK_ABORT)			|| (CommData.AlienTransitionDesc.AnimFlags & TALK_INTRO))		return;	SetSemaphore (&GraphicsSem);	if (!pCurInputState->Initialized)	{		SetColorMap (GetColorMapAddress (CommData.AlienColorMap), TFB_COLORMAP_COMM);		DrawAlienFrame (CommData.AlienFrame, NULL_PTR);UpdateSpeechGraphics (TRUE);		if (LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE				|| (!GET_GAME_STATE (PLAYER_HYPNOTIZED)				&& !GET_GAME_STATE (CHMMR_EMERGING)				&& GET_GAME_STATE (CHMMR_BOMB_STATE) != 2				&& (pMenuState == 0 || !GET_GAME_STATE (MOONBASE_ON_SHIP)				|| GET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER))))		{RECT r;	if (pMenuState == 0){	r.corner.x = SIS_ORG_X;	r.corner.y = SIS_ORG_Y;	r.extent.width = SIS_SCREEN_WIDTH;	r.extent.height = SIS_SCREEN_HEIGHT;	ScreenTransition (3, &r);}else{	r.corner.x = 0;	r.corner.y = 0;	r.extent.width = SCREEN_WIDTH;	r.extent.height = SCREEN_HEIGHT;	ScreenTransition (3, &r);}UnbatchGraphics ();		}		else		{			BYTE clut_buf[] = {FadeAllToColor};UnbatchGraphics ();			if (GET_GAME_STATE (MOONBASE_ON_SHIP)					|| GET_GAME_STATE (CHMMR_BOMB_STATE) == 2)				XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND * 2);			else if (GET_GAME_STATE (CHMMR_EMERGING))				XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND * 2);			else				XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND * 5);		}		pCurInputState->Initialized = TRUE;		PlayMusic ((MUSIC_REF)CommData.AlienSong, TRUE, 1);		SetMusicVolume (BACKGROUND_VOL);		{			DWORD TimeOut;			TimeOut = GetTimeCounter () + (ONE_SECOND >> 1);/* if (CommData.NumAnimations) */				pCurInputState->AnimTask = AddTask (ambient_anim_task, 3072);			ClearSemaphore (&GraphicsSem);			SleepTask (TimeOut);			SetSemaphore (&GraphicsSem);		}		LastActivity &= ~CHECK_LOAD;	}if (wait_track == (COUNT)~0 || CommData.AlienTalkDesc.NumFrames){	if (!(CommData.AlienTransitionDesc.AnimFlags & TALK_INTRO))	{		CommData.AlienTransitionDesc.AnimFlags |= TALK_INTRO;		if (CommData.AlienTransitionDesc.NumFrames)			CommData.AlienTalkDesc.AnimFlags |= TALK_INTRO;	}						CommData.AlienTransitionDesc.AnimFlags &= ~PAUSE_TALKING;	if (CommData.AlienTalkDesc.NumFrames)		CommData.AlienTalkDesc.AnimFlags |= WAIT_TALKING;	while (CommData.AlienTalkDesc.AnimFlags & TALK_INTRO)	{		ClearSemaphore (&GraphicsSem);		TaskSwitch ();		SetSemaphore (&GraphicsSem);	}}	if (!SpewPhrases (wait_track) || wait_track == (COUNT)~0)		FadeMusic (FOREGROUND_VOL, ONE_SECOND);	else		CommData.AlienTransitionDesc.AnimFlags &= ~TALK_INTRO;if (wait_track == (COUNT)~0 || CommData.AlienTalkDesc.NumFrames){	CommData.AlienTransitionDesc.AnimFlags |= TALK_DONE;	if ((CommData.AlienTalkDesc.AnimFlags & WAIT_TALKING))		CommData.AlienTalkDesc.AnimFlags |= PAUSE_TALKING;}	ClearSemaphore (&GraphicsSem);	do		TaskSwitch ();	while (CommData.AlienTalkDesc.AnimFlags & PAUSE_TALKING);}