rem: SetSemaphore (&GraphicsSem);
add: SetSemaphore (GraphicsSem);
context: DrawMenuStateStrings (BYTE beg_index, BYTE NewState){	BYTE end_index;	RECT r;	STAMP s;	CONTEXT OldContext;	extern FRAME PlayFrame;	switch (beg_index)	{		case PM_SCAN:			end_index = PM_NAVIGATE;			break;		case PM_MIN_SCAN:			end_index = PM_LAUNCH_LANDER;			break;		case PM_SAVE_GAME:			end_index = PM_EXIT_MENU1;			break;		case PM_CONVERSE:			end_index = PM_SAVE_LOAD1;			break;		case PM_FUEL:			end_index = PM_EXIT_MENU2;			break;		case PM_CREW:			end_index = PM_EXIT_MENU3;			break;		case PM_SOUND_ON:			end_index = PM_EXIT_MENU4;			break;		default:			end_index = beg_index;			break;	}	s.frame = 0;	if (NewState <= end_index - beg_index)		s.frame = SetAbsFrameIndex (PlayFrame, beg_index + NewState);	SetSemaphore (&GraphicsSem);	OldContext = SetContext (StatusContext);	GetContextClipRect (&r);	s.origin.x = RADAR_X - r.corner.x;	s.origin.y = RADAR_Y - r.corner.y;	r.corner.x = s.origin.x - 1;	r.corner.y = s.origin.y - 11;	r.extent.width = RADAR_WIDTH + 2;	r.extent.height = 11;	BatchGraphics ();	SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08));	DrawFilledRectangle (&r);	if (s.frame)	{		DrawStamp (&s);		switch (beg_index + NewState)		{			TEXT t;			UNICODE buf[4];			case PM_CREW:				t.baseline.x = s.origin.x + RADAR_WIDTH - 2;				t.baseline.y = s.origin.y + RADAR_HEIGHT - 2;				t.align = ALIGN_RIGHT;				t.CharCount = (COUNT)~0;				t.pStr = buf;				wsprintf (buf, "%u", GLOBAL (CrewCost));				SetContextFont (TinyFont);				SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02));				DrawText (&t);				break;			case PM_FUEL:				t.baseline.x = s.origin.x + RADAR_WIDTH - 2;				t.baseline.y = s.origin.y + RADAR_HEIGHT - 2;				t.align = ALIGN_RIGHT;				t.CharCount = (COUNT)~0;				t.pStr = buf;				wsprintf (buf, "%u", GLOBAL (FuelCost));				SetContextFont (TinyFont);				SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02));				DrawText (&t);				break;		}	}	UnbatchGraphics ();	if (flash_task			&& flash_rect.corner.x == RADAR_X			&& flash_rect.corner.y == RADAR_Y			&& flash_rect.extent.width == RADAR_WIDTH			&& flash_rect.extent.height == RADAR_HEIGHT)		SetFlashRect ((PRECT)~0L, (FRAME)0);	SetContext (OldContext);	ClearSemaphore (&GraphicsSem);}