All pastes #709988 Raw Edit

Unnamed

public c v1 · immutable
#709988 ·published 2007-09-25 03:47 UTC
rendered paste body
void mirror_sprite32(unsigned long *dest, unsigned long *sprite, int height) {	unsigned long *out=dest;	unsigned long *in=sprite;	int i=0;	int w=0;	unsigned long temp;		for(i=0;i<height;i++,in++,out++) {		for(w=0;w<16;w++) {			temp=(*in)&(1ul<<(w+16));						if((*in)&(1<<(15-w)))				*out|=(1ul<<(w+16));			else				*out&=~(1ul<<(w+16));							if(temp)				*out|=(1<<(15-w));			else				*out&=~(1<<(15-w));		}	}}