src/sgp/VObject_Blitters.cc
void Blt8BPPDataTo16BPPBufferShadow( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex)
{
	UINT8  *DestPtr;
	UINT32 LineSkip;

	// Assertions
	Assert( hSrcVObject != NULL );
	Assert( pBuffer != NULL );

	// Get Offsets from Index into structure
	ETRLEObject const& pTrav    = hSrcVObject->SubregionProperties(usIndex);
	UINT32             usHeight = pTrav.usHeight;
	UINT32      const  usWidth  = pTrav.usWidth;

	// Add to start position of dest buffer
	INT32 const iTempX = iX + pTrav.sOffsetX;
	INT32 const iTempY = iY + pTrav.sOffsetY;

	// Validations
	CHECKV(iTempX >= 0);
	CHECKV(iTempY >= 0);

	UINT8 const* SrcPtr = hSrcVObject->PixData(pTrav);
	DestPtr = (UINT8 *)pBuffer + (uiDestPitchBYTES*iTempY) + (iTempX*2);
	LineSkip=(uiDestPitchBYTES-(usWidth*2));

	do
	{
		for (;;)
		{
			UINT8 data = *SrcPtr++;

			if (data == 0) break;
			if (data & 0x80)
			{
				data &= 0x7F;
				DestPtr += 2 * data;
			}
			else
			{
				SrcPtr += data;
				do
				{
					*(UINT16*)DestPtr = ShadeTable[*(UINT16*)DestPtr];
					DestPtr += 2;
				}
				while (--data  > 0);
			}
		}
		DestPtr += LineSkip;
	}
	while (--usHeight > 0);
}
/**********************************************************************************************
Blt8BPPDataTo16BPPBufferShadow

	Modifies the destination buffer. Darkens the destination pixels by 25%, using the source
	image as a mask. Any Non-zero index pixels are used to darken destination pixels.

**********************************************************************************************/
Blt8BPPDataTo16BPPBufferShadow
Modifies the destination buffer. Darkens the destination pixels by 25%, using the source
image as a mask. Any Non-zero index pixels are used to darken destination pixels.
Blt8BPPDataTo16BPPBufferShadow Modifies the destination buffer . Darkens the destination pixels by 25% using the source image as a mask . Any Non - zero index pixels are used to darken destination pixels .
void Blt8BPPDataTo16BPPBufferShadow( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex)
{
	UINT8  *DestPtr;
	UINT32 LineSkip;
	Assert( hSrcVObject != NULL );
	Assert( pBuffer != NULL );
	ETRLEObject const& pTrav    = hSrcVObject->SubregionProperties(usIndex);
	UINT32             usHeight = pTrav.usHeight;
	UINT32      const  usWidth  = pTrav.usWidth;
	INT32 const iTempX = iX + pTrav.sOffsetX;
	INT32 const iTempY = iY + pTrav.sOffsetY;
	CHECKV(iTempX >= 0);
	CHECKV(iTempY >= 0);
	UINT8 const* SrcPtr = hSrcVObject->PixData(pTrav);
	DestPtr = (UINT8 *)pBuffer + (uiDestPitchBYTES*iTempY) + (iTempX*2);
	LineSkip=(uiDestPitchBYTES-(usWidth*2));
	do
	{
		for (;;)
		{
			UINT8 data = *SrcPtr++;
			if (data == 0) break;
			if (data & 0x80)
			{
				data &= 0x7F;
				DestPtr += 2 * data;
			}
			else
			{
				SrcPtr += data;
				do
				{
					*(UINT16*)DestPtr = ShadeTable[*(UINT16*)DestPtr];
					DestPtr += 2;
				}
				while (--data  > 0);
			}
		}
		DestPtr += LineSkip;
	}
	while (--usHeight > 0);
}
void Blt8BPPDataTo16BPPBufferShadow ( UINT16 * pBuffer , UINT32 uiDestPitchBYTES , HVOBJECT hSrcVObject , INT32 iX , INT32 iY , UINT16 usIndex ) { UINT8 * DestPtr ; UINT32 LineSkip ; Assert ( hSrcVObject != NULL ) ; Assert ( pBuffer != NULL ) ; ETRLEObject const & pTrav = hSrcVObject -> SubregionProperties ( usIndex ) ; UINT32 usHeight = pTrav . usHeight ; UINT32 const usWidth = pTrav . usWidth ; INT32 const iTempX = iX + pTrav . sOffsetX ; INT32 const iTempY = iY + pTrav . sOffsetY ; CHECKV ( iTempX >= 0 ) ; CHECKV ( iTempY >= 0 ) ; UINT8 const * SrcPtr = hSrcVObject -> PixData ( pTrav ) ; DestPtr = ( UINT8 * ) pBuffer + ( uiDestPitchBYTES * iTempY ) + ( iTempX * 2 ) ; LineSkip = ( uiDestPitchBYTES - ( usWidth * 2 ) ) ; do { for ( ; ; ) { UINT8 data = * SrcPtr ++ ; if ( data == 0 ) break ; if ( data & 0x80 ) { data &= 0x7F ; DestPtr += 2 * data ; } else { SrcPtr += data ; do { * ( UINT16 * ) DestPtr = ShadeTable [ * ( UINT16 * ) DestPtr ] ; DestPtr += 2 ; } while ( -- data > 0 ) ; } } DestPtr += LineSkip ; } while ( -- usHeight > 0 ) ; }
Blt8BPPDataTo16BPPBufferShadow
Modifies the destination buffer.
Blt8BPPDataTo16BPPBufferShadow Modifies the destination buffer .
// Assertions // Get Offsets from Index into structure // Add to start position of dest buffer // Validations