From f386c3f79c2a02598fa8e87a13823da2c7b76e9e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 2 Oct 2000 16:13:12 +0000 Subject: [PATCH] bring over Deek's palette shift removal from newtree. I think I got everything. --- source/gl_view.c | 65 +++++++----------------------------------------- 1 file changed, 9 insertions(+), 56 deletions(-) diff --git a/source/gl_view.c b/source/gl_view.c index cf78833..d21516d 100644 --- a/source/gl_view.c +++ b/source/gl_view.c @@ -88,39 +88,33 @@ V_UpdatePalette */ void V_UpdatePalette (void) { - int i, j; + int i, j; qboolean new; - byte *basepal, *newpal; - byte pal[768]; - float r,g,b,a; - int ir, ig, ib; - qboolean force; + qboolean force; V_CalcPowerupCshift (); new = false; - for (i=0 ; i 255) - ir = 255; - if (ig > 255) - ig = 255; - if (ib > 255) - ib = 255; - - ramps[0][i] = gammatable[ir]; - ramps[1][i] = gammatable[ig]; - ramps[2][i] = gammatable[ib]; - } - - basepal = host_basepal; - newpal = pal; - - for (i=0 ; i<256 ; i++) - { - ir = basepal[0]; - ig = basepal[1]; - ib = basepal[2]; - basepal += 3; - - newpal[0] = ramps[0][ir]; - newpal[1] = ramps[1][ig]; - newpal[2] = ramps[2][ib]; - newpal += 3; - } - - VID_ShiftPalette (pal); } /*