SCI: Fix blend rounding, style

svn-id: r54093
This commit is contained in:
Willem Jan Palenstijn 2010-11-05 12:33:07 +00:00
parent 4f3cedd11f
commit e065a8a797

View File

@ -197,9 +197,9 @@ static byte blendColours(byte c1, byte c2) {
// return (c1/2+c2/2)+((c1&1)+(c2&1))/2;
// gamma 2.2
double t = 0.5 + (pow (c1/255.0, 2.2/1.0) * 255.0) +
0.5 + (pow (c2/255.0, 2.2/1.0) * 255.0);
return (byte)(0.5 + (pow (0.5*t/255.0, 1.0/2.2) * 255.0));
double t = (pow(c1/255.0, 2.2/1.0) * 255.0) +
(pow(c2/255.0, 2.2/1.0) * 255.0);
return (byte)(0.5 + (pow(0.5*t/255.0, 1.0/2.2) * 255.0));
}
void GfxPalette::setEGA() {