+
+ gamma = 1;
+ scale = 1;
+ base = 0;
+ i = COM_CheckParm("-texgamma");
+ if (i)
+ gamma = atof(com_argv[i + 1]);
+ i = COM_CheckParm("-texcontrast");
+ if (i)
+ scale = atof(com_argv[i + 1]);
+ i = COM_CheckParm("-texbrightness");
+ if (i)
+ base = atof(com_argv[i + 1]);
+ gamma = bound(0.01, gamma, 10.0);
+ scale = bound(0.01, scale, 10.0);
+ base = bound(0, base, 0.95);
+
+ BuildGammaTable8(1.0f, gamma, scale, base, temp);
+ for (i = 3;i < 765;i++)
+ host_basepal[i] = temp[host_basepal[i]];
+