No subject


Fri Jan 4 16:38:04 CST 2008


/*
DDSDecompressARGB8888()
decompresses an argb 8888 format texture
*/

static int DDSDecompressARGB8888( ddsBuffer_t *dds, int width, int
height, unsigned char *pixels )
{
	int							x, y;
	unsigned char				*in, *out;
	
	
	/* setup */
	in = dds->data;
	out = pixels;
	
	/* walk y */
	for( y = 0; y < height; y++ )
	{
		/* walk x */
		for( x = 0; x < width; x++ )
		{
			//It will segfault write here on the first or second texture loaded.
			//Around x = 100-200, and y = 400-512
			*out++ = *in++;
			*out++ = *in++;
			*out++ = *in++;
			*out++ = *in++;
		}
	}
	
	/* return ok */
	return 0;
}



More information about the Gtkradiant mailing list