add: {   RECT r; SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xE, 0xE, 0xE), 0x00)); r.corner.x = 0; r.corner.y = 0; r.extent.width = RADAR_WIDTH - 1; r.extent.height = 1; DrawFilledRectangle (&r); r.extent.width = 1; r.extent.height = RADAR_HEIGHT - 1; DrawFilledRectangle (&r);  SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x6, 0x6, 0x6), 0x00)); r.corner.x = RADAR_WIDTH - 1; r.corner.y = 1; r.extent.height = RADAR_HEIGHT - 1; DrawFilledRectangle (&r); r.corner.x = 1; r.corner.y = RADAR_HEIGHT - 1; r.extent.width = RADAR_WIDTH - 2; r.extent.height = 1; DrawFilledRectangle (&r);  SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x8, 0x8, 0x8), 0x00)); r.corner.x = 0; DrawPoint (&r.corner); r.corner.x = RADAR_WIDTH - 1; r.corner.y = 0; DrawPoint (&r.corner); }
context: SeedUniverse (void){	COORD ox, oy;	COORD ux, uy, sx, sy, ex, ey;	POINT universe;	FRAME blip_frame;	STAMP s;	STAR_DESCPTR SDPtr;	HELEMENT hHyperSpaceElement;	ELEMENTPTR HyperSpaceElementPtr;	ClockTick ();	universe.x = LOGX_TO_UNIVERSE (GLOBAL_SIS (log_x));	universe.y = LOGY_TO_UNIVERSE (GLOBAL_SIS (log_y));	blip_frame = SetAbsFrameIndex (stars_in_space, 90);	SetContext (RadarContext);	BatchGraphics ();		ox = (COORD)((long)universe.x			* RADAR_WIDTH / RADAR_SCAN_WIDTH)			- (RADAR_WIDTH >> 1);	oy = (COORD)((long)(MAX_Y_UNIVERSE - universe.y)			* RADAR_HEIGHT / RADAR_SCAN_HEIGHT)			- (RADAR_HEIGHT >> 1);	ex = (COORD)((long)GLOBAL (ShipStamp.origin.x)			* RADAR_WIDTH / RADAR_SCAN_WIDTH)			- (RADAR_WIDTH >> 1);	ey = (COORD)((long)(MAX_Y_UNIVERSE			- GLOBAL (ShipStamp.origin.y))			* RADAR_HEIGHT / RADAR_SCAN_HEIGHT)			- (RADAR_HEIGHT >> 1);	ux = GET_GAME_STATE (ARILOU_SPACE_COUNTER);	uy = GET_GAME_STATE (ARILOU_SPACE_SIDE);//    if (ox != ex || oy != ey)	{		DrawHyperGrid (universe.x, universe.y, ox, oy);		{			SDPtr = 0;			while ((SDPtr = FindStar (SDPtr, &universe, XOFFS, YOFFS)))			{				BYTE star_type;				ex = SDPtr->star_pt.x;				ey = SDPtr->star_pt.y;				star_type = STAR_TYPE (SDPtr->Type);				if (uy >= 2 && ex == ARILOU_HOME_X && ey == ARILOU_HOME_Y)					star_type = SUPER_GIANT_STAR;				s.origin.x = (COORD)((long)ex * RADAR_WIDTH						/ RADAR_SCAN_WIDTH) - ox;				s.origin.y = (COORD)((long)(MAX_Y_UNIVERSE - ey) * RADAR_HEIGHT						/ RADAR_SCAN_HEIGHT) - oy;				s.frame = SetRelFrameIndex (blip_frame,						star_type + 2);				DrawStamp (&s);			}		}	}	if ((ex = GET_GAME_STATE (PORTAL_COUNTER)) || ux)	{		COUNT i;		STAR_DESC SD[2];		i = 0;		if (ex)		{			static POINT portal_pt;			SD[i].Index = ((ex - 1) >> 1) + 18;			if (ex == 1)				portal_pt = universe;			SD[i].star_pt = portal_pt;			++i;			if (++ex == (10 + 1))				ex = (9 + 1);			SET_GAME_STATE (PORTAL_COUNTER, ex);		}		if (ux)		{			SD[i].Index = ux >> 1;			if (uy <= 1)			{				SD[i].Index += 18;				SD[i].star_pt.x = ARILOU_SPACE_X;				SD[i].star_pt.y = ARILOU_SPACE_Y;			}			else			{				SD[i].star_pt.x = QUASI_SPACE_X;				SD[i].star_pt.y = QUASI_SPACE_Y;			}			++i;		}		do		{			--i;			sx = SD[i].star_pt.x - universe.x + XOFFS;			sy = SD[i].star_pt.y - universe.y + YOFFS;			if (sx >= 0 && sy >= 0					&& sx < (XOFFS << 1) && sy < (YOFFS << 1))			{				ex = SD[i].star_pt.x;				ey = SD[i].star_pt.y;				s.origin.x = (COORD)((long)ex * RADAR_WIDTH						/ RADAR_SCAN_WIDTH) - ox;				s.origin.y = (COORD)((long)(MAX_Y_UNIVERSE - ey)						* RADAR_HEIGHT						/ RADAR_SCAN_HEIGHT) - oy;				s.frame = SetAbsFrameIndex (stars_in_space, 95);				DrawStamp (&s);				if ((ex -= universe.x) < 0)					ex = -ex;				if ((ey -= universe.y) < 0)					ey = -ey;				if (ex <= (XOFFS / NUM_RADAR_SCREENS)						&& ey <= (YOFFS / NUM_RADAR_SCREENS)						&& (hHyperSpaceElement =						AllocHyperElement ((STAR_DESCPTR)&SD[i])) != 0)				{					LockElement (hHyperSpaceElement, &HyperSpaceElementPtr);					HyperSpaceElementPtr->current.image.frame = SetAbsFrameIndex (							hyperstars[1 + (GET_GAME_STATE (ARILOU_SPACE_SIDE) >> 1)],							SD[i].Index							);					HyperSpaceElementPtr->preprocess_func =							HyperSpaceElementPtr->postprocess_func = NULL_PTR;					HyperSpaceElementPtr->collision_func = arilou_space_collision;					SetUpElement (HyperSpaceElementPtr);					if (uy == 1 || uy == 2)						HyperSpaceElementPtr->death_func = arilou_space_death;					else					{						HyperSpaceElementPtr->death_func = NULL_PTR;						HyperSpaceElementPtr->IntersectControl.IntersectStamp.frame =								DecFrameIndex (stars_in_space);					}					UnlockElement (hHyperSpaceElement);					InsertElement (hHyperSpaceElement, GetHeadElement ());				}			}		} while (i);	}	{		SDPtr = 0;		while ((SDPtr = FindStar (SDPtr, &universe, XOFFS, YOFFS)))		{			ex = SDPtr->star_pt.x;			ey = SDPtr->star_pt.y;			if ((ex -= universe.x) < 0)				ex = -ex;			if ((ey -= universe.y) < 0)				ey = -ey;			if (ex <= (XOFFS / NUM_RADAR_SCREENS)					&& ey <= (YOFFS / NUM_RADAR_SCREENS)					&& (hHyperSpaceElement = AllocHyperElement (SDPtr)) != 0)			{				BYTE star_type;				star_type = SDPtr->Type;				LockElement (hHyperSpaceElement, &HyperSpaceElementPtr);				HyperSpaceElementPtr->current.image.frame = SetAbsFrameIndex (						hyperstars[1 + (GET_GAME_STATE (ARILOU_SPACE_SIDE) >> 1)],						STAR_TYPE (star_type)						* NUM_STAR_COLORS						+ STAR_COLOR (star_type)						);				HyperSpaceElementPtr->preprocess_func =						HyperSpaceElementPtr->postprocess_func = NULL_PTR;				HyperSpaceElementPtr->collision_func = hyper_collision;				SetUpElement (HyperSpaceElementPtr);				if (SDPtr == CurStarDescPtr						&& GET_GAME_STATE (PORTAL_COUNTER) == 0)					HyperSpaceElementPtr->death_func = hyper_death;				else				{					HyperSpaceElementPtr->death_func = NULL_PTR;					HyperSpaceElementPtr->IntersectControl.IntersectStamp.frame =							DecFrameIndex (stars_in_space);				}				UnlockElement (hHyperSpaceElement);				InsertElement (hHyperSpaceElement, GetHeadElement ());			}		}		ProcessEncounters (&universe, ox, oy);	}	s.origin.x = RADAR_WIDTH >> 1;	s.origin.y = RADAR_HEIGHT >> 1;	s.frame = blip_frame;	DrawStamp (&s);		UnbatchGraphics ();	SetContext (StatusContext);	if (!(LOWORD (TFB_Random ()) & 7))		AddAmbientElement ();	if (universe.x != GLOBAL (ShipStamp.origin.x)			|| universe.y != GLOBAL (ShipStamp.origin.y))	{		GLOBAL (ShipStamp.origin) = universe;		DrawHyperCoords (universe);	}}