rem: ClearSemaphore (&GraphicsSem);
add: ClearSemaphore (GraphicsSem);
context: InitLander (BYTE LanderFlags){	RECT r;	SetSemaphore (&GraphicsSem);	SetContext (RadarContext);		BatchGraphics ();		r.corner.x = 0;	r.corner.y = 0;	r.extent.width = RADAR_WIDTH;	r.extent.height = RADAR_HEIGHT;	SetContextForeGroundColor (BLACK_COLOR);	DrawFilledRectangle (&r);		if (GLOBAL_SIS (NumLanders) || LanderFlags)	{		BYTE ShieldFlags, capacity_shift;		COUNT free_space;		STAMP s;		s.origin.x = 0; /* set up powered-down lander */		s.origin.y = 0;		s.frame = SetAbsFrameIndex (LanderFrame[0],				ANGLE_TO_FACING (FULL_CIRCLE) << 1);		DrawStamp (&s);		if (LanderFlags == 0)		{			ShieldFlags = GET_GAME_STATE (LANDER_SHIELDS);			capacity_shift = GET_GAME_STATE (IMPROVED_LANDER_CARGO);		}		else		{			ShieldFlags = (unsigned char)(LanderFlags &					((1 << EARTHQUAKE_DISASTER)					| (1 << BIOLOGICAL_DISASTER)					| (1 << LIGHTNING_DISASTER)					| (1 << LAVASPOT_DISASTER)));			s.frame = IncFrameIndex (s.frame);			DrawStamp (&s);			if (LanderFlags & (1 << (4 + 0)))				s.frame = SetAbsFrameIndex (s.frame, 57);			else			{				s.frame = SetAbsFrameIndex (s.frame,						(ANGLE_TO_FACING (FULL_CIRCLE) << 1) + 3);				DrawStamp (&s);				s.frame = IncFrameIndex (s.frame);			}			DrawStamp (&s);			if (!(LanderFlags & (1 << (4 + 1))))				capacity_shift = 0;			else			{				capacity_shift = 1;				s.frame = SetAbsFrameIndex (s.frame, 58);				DrawStamp (&s);			}			if (LanderFlags & (1 << (4 + 2)))				s.frame = SetAbsFrameIndex (s.frame, 57);			else				s.frame = SetAbsFrameIndex (s.frame,						(ANGLE_TO_FACING (FULL_CIRCLE) << 1) + 2);			DrawStamp (&s);		}		if ((int)(free_space = GetSBayCapacity (NULL_PTR)				- GLOBAL_SIS (TotalElementMass)) <				(int)(MAX_SCROUNGED << capacity_shift))		{			r.corner.x = 1;			r.extent.width = 4;			r.extent.height = MAX_SCROUNGED					- (free_space >> capacity_shift) + 1;			SetContextForeGroundColor (BLACK_COLOR);			DrawFilledRectangle (&r);		}		s.frame = SetAbsFrameIndex (s.frame, 37);		if (ShieldFlags & (1 << EARTHQUAKE_DISASTER))			DrawStamp (&s);		s.frame = IncFrameIndex (s.frame);		if (ShieldFlags & (1 << BIOLOGICAL_DISASTER))			DrawStamp (&s);		s.frame = IncFrameIndex (s.frame);		if (ShieldFlags & (1 << LIGHTNING_DISASTER))			DrawStamp (&s);		s.frame = IncFrameIndex (s.frame);		if (ShieldFlags & (1 << LAVASPOT_DISASTER))			DrawStamp (&s);	}	UnbatchGraphics ();	ClearSemaphore (&GraphicsSem);}