engine/EngineVideoTextureManager.c
/*	Return image with width padded up to power-of-two dimentions
*/
Return image with width padded up to power-of-two dimentions
Return image with width padded up to power - of - two dimentions
uint8_t *TexMgr_PadImageW(uint8_t *in, int width, int height, uint8_t padbyte)
{
	int i, j, outwidth;
	uint8_t *out, *data;
	if (width == TexMgr_Pad(width))
		return in;
	outwidth = TexMgr_Pad(width);
	out = data = (uint8_t*)Hunk_Alloc(outwidth*height);
	for (i=0; i<height; i++)
	{
		for (j=0; j<width; j++)
			*out++ = *in++;
		for (   ; j<outwidth; j++)
			*out++ = padbyte;
	}
	return data;
}
uint8_t * TexMgr_PadImageW ( uint8_t * in , int width , int height , uint8_t padbyte ) { int i , j , outwidth ; uint8_t * out , * data ; if ( width == TexMgr_Pad ( width ) ) return in ; outwidth = TexMgr_Pad ( width ) ; out = data = ( uint8_t * ) Hunk_Alloc ( outwidth * height ) ; for ( i = 0 ; i < height ; i ++ ) { for ( j = 0 ; j < width ; j ++ ) * out ++ = * in ++ ; for ( ; j < outwidth ; j ++ ) * out ++ = padbyte ; } return data ; }
Return image with width padded up to power-of-two dimentions
Return image with width padded up to power - of - two dimentions