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