From f2435b8a6463313be1f8a94d1ca800f1f5c48dff Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Thu, 12 Apr 2001 03:48:26 +0000 Subject: [PATCH] Round, rather than truncate. --- qw/source/vid_common_gl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qw/source/vid_common_gl.c b/qw/source/vid_common_gl.c index 1ed2d1f73..3d6ffddbd 100644 --- a/qw/source/vid_common_gl.c +++ b/qw/source/vid_common_gl.c @@ -159,7 +159,7 @@ VID_InitGamma (unsigned char *pal) Cvar_SetFlags (vid_gamma, vid_gamma->flags | CVAR_ROM); for (i = 0; i < 256; i++) { // Create the gamma-correction table - v = (int) (255.0 * pow ((double) i / 255.0, g)); + v = (int) (255.0 * pow ((double) i / 255.0, g) + 0.5); gammatable[i] = bound (0, v, 255); } }