engine/EngineVideoTextureManager.c
/*
===============
TexMgr_PadEdgeFixH -- special case of AlphaEdgeFix for textures that only need it because they were padded

operates in place on 32bit data, and expects unpadded height and width values
===============
*/
- special case of AlphaEdgeFix for textures that only need it because they were padded
operates in place on 32bit data, and expects unpadded height and width values
- special case of AlphaEdgeFix for textures that only need it because they were padded operates in place on 32bit data and expects unpadded height and width values
void TexMgr_PadEdgeFixH(uint8_t *data, int width, int height)
{
	uint8_t *src, *dst;
	int i, padw, padh;
	padw = TexMgr_PadConditional(width);
	padh = TexMgr_PadConditional(height);
	dst = data + height * padw * 4;
	src = dst - padw * 4;
	for (i=0; i<padw; i++)
	{
		dst[0] = src[0];
		dst[1] = src[1];
		dst[2] = src[2];
		src += 4;
		dst += 4;
	}
	dst = data + (padh - 1) * padw * 4;
	src = data;
	for (i=0; i<padw; i++)
	{
		dst[0] = src[0];
		dst[1] = src[1];
		dst[2] = src[2];
		src += 4;
		dst += 4;
	}
}
void TexMgr_PadEdgeFixH ( uint8_t * data , int width , int height ) { uint8_t * src , * dst ; int i , padw , padh ; padw = TexMgr_PadConditional ( width ) ; padh = TexMgr_PadConditional ( height ) ; dst = data + height * padw * 4 ; src = dst - padw * 4 ; for ( i = 0 ; i < padw ; i ++ ) { dst [ 0 ] = src [ 0 ] ; dst [ 1 ] = src [ 1 ] ; dst [ 2 ] = src [ 2 ] ; src += 4 ; dst += 4 ; } dst = data + ( padh - 1 ) * padw * 4 ; src = data ; for ( i = 0 ; i < padw ; i ++ ) { dst [ 0 ] = src [ 0 ] ; dst [ 1 ] = src [ 1 ] ; dst [ 2 ] = src [ 2 ] ; src += 4 ; dst += 4 ; } }
TexMgr_PadEdgeFixH -- special case of AlphaEdgeFix for textures that only need it because they were padded
operates in place on 32bit data, and expects unpadded height and width values
TexMgr_PadEdgeFixH -- special case of AlphaEdgeFix for textures that only need it because they were padded operates in place on 32bit data and expects unpadded height and width values
//copy last full row to first empty row, leaving alpha byte at zero //copy first full row to last empty row, leaving alpha byte at zero