# HG changeset patch # User reimar # Date 1239526160 0 # Node ID 1273a2b9c32ad08ee8c080aaf7baabf530674da9 # Parent 7aa7c5853bb65e66b9449573e0ada7b0fcfb67a7 Slightly improve/correct description of wc3_pal_lookup diff -r 7aa7c5853bb6 -r 1273a2b9c32a wc3movie.c --- a/wc3movie.c Sun Apr 12 08:35:26 2009 +0000 +++ b/wc3movie.c Sun Apr 12 08:49:20 2009 +0000 @@ -76,9 +76,9 @@ * palette lookup table that does gamma correction * * can be calculated by this formula: - * for i between 0 and 252 inclusive: - * wc3_pal_lookup[i] = pow(i / 256.0, 0.8) * 256; - * values 253, 254 and 255 are all 0xFD + * for i between 0 and 251 inclusive: + * wc3_pal_lookup[i] = round(pow(i / 256.0, 0.8) * 256); + * values 252, 253, 254 and 255 are all 0xFD * calculating this at runtime should not cause any * rounding issues, the maximum difference between * the table values and the calculated doubles is