From a47da9acb6d222a499dcf142c70dfac9684fdea9 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Thu, 20 May 2004 07:47:28 +0000 Subject: [PATCH] fix funky ogl gammaramp palette when getting hit sometimes (didn't handle negative palette steps) (d1x r1.34) --- ChangeLog | 3 +++ arch/ogl/gr.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5cf49e5..c6dcc7ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-05-20 Matthew Mueller + * arch/ogl/gr.c: fix funky ogl gammaramp palette when getting hit + sometimes (didn't handle negative palette steps) (d1x r1.34) + * arch/ogl/ogl.c: add caching of weapon inner models, screen shatter effects, robot explosions and weapons, and some more always present stuff. Also clean up ogl_cache_weapon_textures diff --git a/arch/ogl/gr.c b/arch/ogl/gr.c index 008fdd79..9b10a6da 100644 --- a/arch/ogl/gr.c +++ b/arch/ogl/gr.c @@ -1,4 +1,4 @@ -/* $Id: gr.c,v 1.23 2004-05-20 05:15:55 btb Exp $ */ +/* $Id: gr.c,v 1.24 2004-05-20 07:47:28 btb Exp $ */ /* * * OGL video functions. - Added 9/15/99 Matthew Mueller @@ -601,9 +601,9 @@ void gr_palette_step_up(int r, int g, int b) old_b_g = ogl_brightness_g; old_b_b = ogl_brightness_b; - ogl_brightness_r = r + gr_palette_gamma; - ogl_brightness_g = g + gr_palette_gamma; - ogl_brightness_b = b + gr_palette_gamma; + ogl_brightness_r = max(r + gr_palette_gamma, 0); + ogl_brightness_g = max(g + gr_palette_gamma, 0); + ogl_brightness_b = max(b + gr_palette_gamma, 0); if (ogl_setgammaramp_ok && (old_b_r != ogl_brightness_r || -- 2.39.2