rem: SleepTask (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND * 2));
add: SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND * 2));
context: VisitStarBase (void){	MENU_STATE MenuState;	CONTEXT OldContext;	if (GET_GAME_STATE (CHMMR_BOMB_STATE) == 2)	{		CurStarDescPtr = 0;		goto TimePassage;	}	else if (!GET_GAME_STATE (STARBASE_AVAILABLE))	{		HSTARSHIP hStarShip;		SHIP_FRAGMENTPTR FragPtr;		pMenuState = 0;		InitCommunication (COMMANDER_CONVERSATION);		if (!GET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER)				|| (GLOBAL (CurrentActivity) & CHECK_ABORT))			goto ExitStarBase;		hStarShip = CloneShipFragment (				ILWRATH_SHIP,				&GLOBAL (npc_built_ship_q), 7				);		FragPtr = (SHIP_FRAGMENTPTR)LockStarShip (				&GLOBAL (npc_built_ship_q), hStarShip				);		SET_RACE_ID (FragPtr, (BYTE)~0);		UnlockStarShip (				&GLOBAL (npc_built_ship_q), hStarShip				);		InitCommunication (ILWRATH_CONVERSATION);		if (GLOBAL_SIS (CrewEnlisted) == (COUNT)~0				|| (GLOBAL (CurrentActivity) & CHECK_ABORT))			return;		SET_GAME_STATE (GLOBAL_FLAGS_AND_DATA, (BYTE)~0);		{#define LOST_DAYS 14			COUNT i;			BYTE clut_buf[1];			pMenuState = &MenuState;			InitCommunication (COMMANDER_CONVERSATION);TimePassage:			SET_GAME_STATE (GLOBAL_FLAGS_AND_DATA, (BYTE)~0);			clut_buf[0] = FadeAllToBlack;			SleepTask (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND * 2));			for (i = 0; i < LOST_DAYS; ++i)			{				while (ClockTick () > 0)					;				ResumeGameClock ();				SleepTask (GetTimeCounter () + 2);				SuspendGameClock ();			}		}	}	pMenuState = &MenuState;	memset ((PMENU_STATE)&MenuState, 0, sizeof (MenuState));	MenuState.InputFunc = DoStarBase;	if (GET_GAME_STATE (MOONBASE_ON_SHIP)			|| GET_GAME_STATE (CHMMR_BOMB_STATE) == 2)	{		MenuState.Initialized = TRUE;		MenuState.CurState = TALK_COMMANDER;	}	OldContext = SetContext (ScreenContext);	DoInput ((PVOID)pMenuState);	SetContext (OldContext);	pMenuState = 0;ExitStarBase:	if (!(GLOBAL (CurrentActivity) & (CHECK_LOAD | CHECK_ABORT)))	{		extern ACTIVITY NextActivity;		SET_GAME_STATE (GLOBAL_FLAGS_AND_DATA, 0);		GLOBAL (CurrentActivity) = CHECK_LOAD;		NextActivity = MAKE_WORD (IN_INTERPLANETARY, 0)				| START_INTERPLANETARY;	}}