rem: GetFrameRect (SetAbsFrameIndex (MeleeFrame, 27), &r);
add: GetFrameRect (BuildPickFrame, &r);
context: DoPickShip (PMELEE_STATE pMS){	STARSHIPPTR StarShipPtr;	if (GLOBAL (CurrentActivity) & CHECK_ABORT)		return (FALSE);	SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT);	if (pMS->Initialized <= 0)	{		if (pMS->CurIndex == (BYTE)~0 && pMS->Initialized == 0)			pMS->CurIndex = 0;		else if (pMS->CurIndex != (BYTE)~0)		{			DeleteCurrentShip (pMS);		}		if (pMS->Initialized == 0)		{			LockMutex (GraphicsLock);			Deselect (EDIT_MELEE);			pMS->InputFunc = DoPickShip;			DrawPickFrame (pMS);			pMS->Initialized = TRUE;			UnlockMutex (GraphicsLock);		}		else		{			LockMutex (GraphicsLock);			Deselect (EDIT_MELEE);			pMS->Initialized = TRUE;			AdvanceCursor (pMS);			pMS->CurIndex = pMS->TeamImage[pMS->side].ShipList[pMS->row][pMS->col];			UnlockMutex (GraphicsLock);			DrawMeleeShipStrings (pMS, (BYTE)(pMS->CurIndex));		}	}	else if (PulsedInputState.key[KEY_MENU_SELECT] || PulsedInputState.key[KEY_MENU_CANCEL])	{		pMS->InputFunc = 0; /* disable ship flashing */		if (!PulsedInputState.key[KEY_MENU_CANCEL])		{			HSTARSHIP hStarShip;						hStarShip = GetStarShipFromIndex (&master_q, pMS->CurIndex);			StarShipPtr = LockStarShip (&master_q, hStarShip);			pMS->star_bucks[pMS->side] +=					StarShipPtr->RaceDescPtr->ship_info.ship_cost;			UnlockStarShip (&master_q, hStarShip);			pMS->TeamImage[pMS->side].ShipList[pMS->row][pMS->col] = pMS->CurIndex;			LockMutex (GraphicsLock);			DrawTeamString (pMS, 4);			DrawShipBox (pMS, FALSE);			UnlockMutex (GraphicsLock);			AdvanceCursor (pMS);		}		{			RECT r;						GetFrameRect (SetAbsFrameIndex (MeleeFrame, 27), &r);			LockMutex (GraphicsLock);			RepairMeleeFrame (&r);			UnlockMutex (GraphicsLock);		}		pMS->CurIndex = pMS->TeamImage[pMS->side].ShipList[pMS->row][pMS->col];		DrawMeleeShipStrings (pMS, (BYTE)pMS->CurIndex);		pMS->InputFunc = DoEdit;		return (TRUE);	}	else if (PulsedInputState.key[KEY_MENU_SPECIAL])	{		DoShipSpin (pMS->CurIndex, (MUSIC_REF)0);			return (TRUE);	}	{		BYTE NewStarShip;		NewStarShip = pMS->CurIndex;		if (PulsedInputState.key[KEY_MENU_LEFT])		{			if (NewStarShip-- % NUM_PICK_COLS == 0)				NewStarShip += NUM_PICK_COLS;		}		else if (PulsedInputState.key[KEY_MENU_RIGHT])		{			if (++NewStarShip % NUM_PICK_COLS == 0)				NewStarShip -= NUM_PICK_COLS;		}				if (PulsedInputState.key[KEY_MENU_UP])		{			if (NewStarShip >= NUM_PICK_COLS)				NewStarShip -= NUM_PICK_COLS;			else				NewStarShip += NUM_PICK_COLS * (NUM_PICK_ROWS - 1);		}		else if (PulsedInputState.key[KEY_MENU_DOWN])		{			if (NewStarShip < NUM_PICK_COLS * (NUM_PICK_ROWS - 1))				NewStarShip += NUM_PICK_COLS;			else				NewStarShip -= NUM_PICK_COLS * (NUM_PICK_ROWS - 1);		}		if (NewStarShip != pMS->CurIndex)		{			LockMutex (GraphicsLock);			Deselect (EDIT_MELEE);			pMS->CurIndex = NewStarShip;			UnlockMutex (GraphicsLock);			DrawMeleeShipStrings (pMS, NewStarShip);		}	}	return (TRUE);}