Round, rather than truncate.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-04-12 03:48:26 +00:00
parent a3215e4dd0
commit f2435b8a64

View file

@ -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);
}
}