All pastes #2056471 Raw Edit

Stuff

public text v1 · immutable
#2056471 ·published 2011-05-10 22:04 UTC
rendered paste body
static void rotate_tile(unsigned int size,unsigned char *target)
{
	unsigned int i,j,k,l=0;
	
	for (k=0;k<size;k++)
	{
		unsigned char temp[8][8];
		for(i=0;i<8;i++)
			for(j=0;j<4;j++)
			{
				temp[i][j<<1]=target[l+(i*4)+j]>>4;
				temp[i][(j<<1)+1]=target[l+(i*4)+j]&0x0f;
			}

		for(i=0;i<8;i++)
			for(j=0;j<8;j+=2)
				target[l+(i<<2)+(j>>1)]= (temp[8-j-1][i]<<4)|temp[8-j-2][i] ;
		l+=32;
	}	
}