rem: SetSemaphore (&GraphicsSem);
add: SetSemaphore (GraphicsSem);
context: EncounterBattle (void){	MEM_HANDLE hLastIndex;	ACTIVITY OldActivity;	extern UWORD nth_frame;	extern BOOLEAN LoadSC2Data (void);	extern BOOLEAN FreeSC2Data (void);	SetSemaphore (&GraphicsSem);	SET_GAME_STATE (BATTLE_SEGUE, 1);	hLastIndex = SetResourceIndex (hResIndex);	OldActivity = GLOBAL (CurrentActivity);	if (LOBYTE (OldActivity) == IN_LAST_BATTLE)		GLOBAL (CurrentActivity) = MAKE_WORD (IN_LAST_BATTLE, 0);	else		GLOBAL (CurrentActivity) = MAKE_WORD (IN_ENCOUNTER, 0);//    FreeSC2Data ();//    DestroyFont (ReleaseFont (MicroFont));	while (SoundPlaying ())		;//    DestroySound (ReleaseSound (MenuSounds));	if (GLOBAL (glob_flags) & CYBORG_ENABLED)	{		BYTE cur_speed;		cur_speed = (BYTE)(GLOBAL (glob_flags) & COMBAT_SPEED_MASK)				>> COMBAT_SPEED_SHIFT;		if (cur_speed == 1)			cur_speed = 0;		else if (cur_speed == 2)			++cur_speed;		else /* if (cur_speed == 3) */			cur_speed = (BYTE)~0;		nth_frame = MAKE_WORD (1, cur_speed);		PlayerControl[0] = CYBORG_CONTROL | AWESOME_RATING;		PlayerInput[0] = ComputerInput;	}	GameSounds = CaptureSound (LoadSound (GAME_SOUNDS));	ClearSemaphore (&GraphicsSem);	Battle ();	SetSemaphore (&GraphicsSem);	DestroySound (ReleaseSound (GameSounds));	GameSounds = 0;	if (GLOBAL (CurrentActivity) & CHECK_ABORT)		GLOBAL_SIS (CrewEnlisted) = (COUNT)~0;	if (GLOBAL (glob_flags) & CYBORG_ENABLED)	{		nth_frame = MAKE_WORD (0, 0);		PlayerControl[0] = HUMAN_CONTROL | STANDARD_RATING,		PlayerInput[0] = NormalInput;	}	SetResourceIndex (hResIndex);//    MicroFont = CaptureFont (// LoadGraphic (MICRO_FONT)// );//    MenuSounds = CaptureSound (LoadSound (MENU_SOUNDS));//    LoadSC2Data ();	GLOBAL (CurrentActivity) = OldActivity;	SetResourceIndex (hLastIndex);	ClearSemaphore (&GraphicsSem);}