示例#1
0
static void tga_comp_rgb32( qbyte *pout, qbyte *pin, int size )
{
	int header, pixelcount;
	int blue, green, red, alpha;
	int i, pix;

	for( i = 0; i < size; )
	{
		header = *pin++;
		pixelcount = (header & 0x7f) + 1;
		if( header & 0x80 )
		{
			READPIXEL(pin);
			Q_memset32( pout, pix, pixelcount );
			pout += pixelcount * 4;
			i += pixelcount;
		}
		else
		{
			memcpy( pout, pin, pixelcount * 4 );
			pin += pixelcount * 4;
			pout += pixelcount * 4;
			i += pixelcount;
		}
	}
}
示例#2
0
static void tga_comp_rgb24( qbyte *pout, qbyte *pin, int size )
{
	int header, pixelcount;
	int blue, green, red;
	int i, j;

	for( i = 0; i < size; )
	{
		header = *pin++;
		pixelcount = (header & 0x7f) + 1;
		if( header & 0x80 )
		{
			READPIXEL(pin);
			for( j = 0; j < pixelcount; j++ )
			{
				WRITEPIXEL( pout );
			}
			i += pixelcount;
		}
		else
		{
			memcpy( pout, pin, pixelcount * 3 );
			pin += pixelcount * 3;
			pout += pixelcount * 3;
			i += pixelcount;
		}
	}
}
示例#3
0
static void tga_cm32( qbyte *pout, qbyte *pin, qbyte palette[256][4], int size )
{
	int blue, green, red, alpha;
	int i;

	for( i = 0; i < size; i++ )
	{
		READPIXEL(pin);
		WRITEPIXEL(pout);
	}
}
示例#4
0
static void tga_cm24( uint8_t *pout, uint8_t *pin, uint8_t palette[256][4], int size )
{
	int blue, green, red;
	int i;

	for( i = 0; i < size; i++ )
	{
		READPIXEL(pin);
		WRITEPIXEL(pout);
	}
}