Source/ThunderBeast/QuakeToonProto1/ref_gl/gl_image.c
void GL_LightScaleTexture (unsigned *in, int inwidth, int inheight, qboolean only_gamma )
{
	if ( only_gamma )
	{
		int		i, c;
		byte	*p;

		p = (byte *)in;

		c = inwidth*inheight;
		for (i=0 ; i<c ; i++, p+=4)
		{
			p[0] = gammatable[p[0]];
			p[1] = gammatable[p[1]];
			p[2] = gammatable[p[2]];
		}
	}
	else
	{
		int		i, c;
		byte	*p;

		p = (byte *)in;

		c = inwidth*inheight;
		for (i=0 ; i<c ; i++, p+=4)
		{
			p[0] = gammatable[intensitytable[p[0]]];
			p[1] = gammatable[intensitytable[p[1]]];
			p[2] = gammatable[intensitytable[p[2]]];
		}
	}
}
/*
================
GL_LightScaleTexture

Scale up the pixel values in a texture to increase the
lighting range
================
*/
GL_LightScaleTexture
Scale up the pixel values in a texture to increase the
lighting range
GL_LightScaleTexture Scale up the pixel values in a texture to increase the lighting range
void GL_LightScaleTexture (unsigned *in, int inwidth, int inheight, qboolean only_gamma )
{
	if ( only_gamma )
	{
		int		i, c;
		byte	*p;
		p = (byte *)in;
		c = inwidth*inheight;
		for (i=0 ; i<c ; i++, p+=4)
		{
			p[0] = gammatable[p[0]];
			p[1] = gammatable[p[1]];
			p[2] = gammatable[p[2]];
		}
	}
	else
	{
		int		i, c;
		byte	*p;
		p = (byte *)in;
		c = inwidth*inheight;
		for (i=0 ; i<c ; i++, p+=4)
		{
			p[0] = gammatable[intensitytable[p[0]]];
			p[1] = gammatable[intensitytable[p[1]]];
			p[2] = gammatable[intensitytable[p[2]]];
		}
	}
}
void GL_LightScaleTexture ( unsigned * in , int inwidth , int inheight , qboolean only_gamma ) { if ( only_gamma ) { int i , c ; byte * p ; p = ( byte * ) in ; c = inwidth * inheight ; for ( i = 0 ; i < c ; i ++ , p += 4 ) { p [ 0 ] = gammatable [ p [ 0 ] ] ; p [ 1 ] = gammatable [ p [ 1 ] ] ; p [ 2 ] = gammatable [ p [ 2 ] ] ; } } else { int i , c ; byte * p ; p = ( byte * ) in ; c = inwidth * inheight ; for ( i = 0 ; i < c ; i ++ , p += 4 ) { p [ 0 ] = gammatable [ intensitytable [ p [ 0 ] ] ] ; p [ 1 ] = gammatable [ intensitytable [ p [ 1 ] ] ] ; p [ 2 ] = gammatable [ intensitytable [ p [ 2 ] ] ] ; } } }
GL_LightScaleTexture
Scale up the pixel values in a texture to increase the
lighting range
GL_LightScaleTexture Scale up the pixel values in a texture to increase the lighting range