rem: pCurCMap = (DWORD *)((BYTE *)_varPLUTs + (*ColorMapPtr * PLUT_BYTE_SIZE)); pOldCMap = control->OldCMap; for (i = 0; i < NUMBER_OF_PLUT_UINT32s; ++i) *pOldCMap++ = *pCurCMap++;
add: memcpy (control->OldCMap, GET_VAR_PLUT (*ColorMapPtr), PLUT_BYTE_SIZE);
context: XFormPLUT (COLORMAPPTR ColorMapPtr, SIZE TimeInterval){	if (ColorMapPtr)	{		DWORD *pOldCMap, *pCurCMap;		XFORM_CONTROL *control;		int i;		// FlushPLUTXForms ();		LockMutex (XFormControl.XFormLock);		while (XFormControl.XFormsPending				&& (XFormControl.XFormInsertPoint == XFormControl.XFormCurrent))		{			UnlockMutex (XFormControl.XFormLock);			FlushPLUTXForms ();			LockMutex (XFormControl.XFormLock);		}				control = &XFormControl.TaskControl[XFormControl.XFormInsertPoint];		pCurCMap = (DWORD *)((BYTE *)_varPLUTs + (*ColorMapPtr * PLUT_BYTE_SIZE));		pOldCMap = control->OldCMap;		for (i = 0; i < NUMBER_OF_PLUT_UINT32s; ++i)			*pOldCMap++ = *pCurCMap++;		control->CMapPtr = ColorMapPtr;		if ((control->Ticks = TimeInterval) <= 0)			control->Ticks = 1; /* prevent divide by zero and negative fade */		control->TTotal = control->TOrig = TimeInterval;		if (++XFormControl.XFormInsertPoint >= MAX_XFORMS)			XFormControl.XFormInsertPoint = 0;		XFormControl.XFormsPending = TRUE;		UnlockMutex (XFormControl.XFormLock);			}	return (0);}