rem: SetSemaphore (&GraphicsSem);
add: SetSemaphore (GraphicsSem);
context: Buy (RESPONSE_REF Response){	if (PLAYER_SAID (Response, want_to_buy)			|| PLAYER_SAID (Response, im_ready_to_buy))	{		NPCPhrase (READY_TO_SELL);		if (!GET_GAME_STATE (ROSY_SPHERE))			NPCPhrase (HAVE_SPHERE);		if (!GET_GAME_STATE (ARTIFACT_2_ON_SHIP))			NPCPhrase (HAVE_ART_1);		if (!GET_GAME_STATE (ARTIFACT_3_ON_SHIP))			NPCPhrase (HAVE_ART_2);		NPCPhrase (SHIPS_AND_FUEL);		SET_GAME_STATE (KNOW_DRUUGE_SLAVERS, 3);	}	else if (PLAYER_SAID (Response, buy_druuge_ship))	{#define SHIP_CREW_COST 100		if (GLOBAL_SIS (CrewEnlisted) < SHIP_CREW_COST)			NPCPhrase (NOT_ENOUGH_CREW);		else if (ActivateStarShip (DRUUGE_SHIP, FEASIBILITY_STUDY) == 0)			NPCPhrase (NOT_ENOUGH_ROOM);		else		{			SetSemaphore (&GraphicsSem);			DeltaSISGauges (-SHIP_CREW_COST, 0, 0);			ClearSemaphore (&GraphicsSem);			SlaveryCount += SHIP_CREW_COST;			ActivateStarShip (DRUUGE_SHIP, 1);			NPCPhrase (BOUGHT_SHIP);		}	}#define ARTIFACT_CREW_COST 100	else if (PLAYER_SAID (Response, buy_rosy_sphere))	{		if (GLOBAL_SIS (CrewEnlisted) < ARTIFACT_CREW_COST)			NPCPhrase (NOT_ENOUGH_CREW);		else		{			SetSemaphore (&GraphicsSem);			DeltaSISGauges (-ARTIFACT_CREW_COST, 0, 0);			ClearSemaphore (&GraphicsSem);			SlaveryCount += ARTIFACT_CREW_COST;			SET_GAME_STATE (ROSY_SPHERE_ON_SHIP, 1);			SET_GAME_STATE (ROSY_SPHERE, 1);			NPCPhrase (BOUGHT_SPHERE);		}	}	else if (PLAYER_SAID (Response, buy_art_1))	{		if (GLOBAL_SIS (CrewEnlisted) < ARTIFACT_CREW_COST)			NPCPhrase (NOT_ENOUGH_CREW);		else		{			SetSemaphore (&GraphicsSem);			DeltaSISGauges (-ARTIFACT_CREW_COST, 0, 0);			ClearSemaphore (&GraphicsSem);			SlaveryCount += ARTIFACT_CREW_COST;			SET_GAME_STATE (ARTIFACT_2_ON_SHIP, 1);			NPCPhrase (BOUGHT_ART_1);		}	}	else if (PLAYER_SAID (Response, buy_art_2))	{		if (GLOBAL_SIS (CrewEnlisted) < ARTIFACT_CREW_COST)			NPCPhrase (NOT_ENOUGH_CREW);		else		{			SetSemaphore (&GraphicsSem);			DeltaSISGauges (-ARTIFACT_CREW_COST, 0, 0);			ClearSemaphore (&GraphicsSem);			SlaveryCount += ARTIFACT_CREW_COST;			SET_GAME_STATE (ARTIFACT_3_ON_SHIP, 1);			NPCPhrase (BOUGHT_ART_2);		}	}	else if (PLAYER_SAID (Response, buy_fuel))	{#define FUEL_CREW_COST 10		if (GLOBAL_SIS (CrewEnlisted) < FUEL_CREW_COST)			NPCPhrase (NOT_ENOUGH_CREW);		else		{			SetSemaphore (&GraphicsSem);			DeltaSISGauges (-FUEL_CREW_COST,					FUEL_CREW_COST * FUEL_TANK_SCALE, 0);			ClearSemaphore (&GraphicsSem);			SlaveryCount += FUEL_CREW_COST;			NPCPhrase (BOUGHT_FUEL);		}	}	Response (buy_druuge_ship, Buy);	if (!GET_GAME_STATE (ROSY_SPHERE))		Response (buy_rosy_sphere, Buy);	if (!GET_GAME_STATE (ARTIFACT_2_ON_SHIP))		Response (buy_art_1, Buy);	if (!GET_GAME_STATE (ARTIFACT_3_ON_SHIP))		Response (buy_art_2, Buy);	Response (buy_fuel, Buy);	Response (done_buying, TradeWorld);}