[AD] A small bugfix to exflame.c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


While creating the palette for the flames, an overflow causes some pixels to have a (slightly) incorrect color. The offending line:
 palette[c].b = c - 192; <- This causes negative values since in this occasion 128 <= c < 192.
should read:
 palette[c].b = c - 128;

I have verified that this produces the correct result.

Now that's a huge update isn't it ;)

--- examples/exflame.c    Sun Feb 13 21:01:29 2005 UTC
+++ examples/exflame.c    Fri Apr 08 18:47:40 2005 UTC
@@ -98,7 +98,7 @@
    for (c=128; c<192; c++) {
       palette[c].r = 63;
       palette[c].g = 63;
-      palette[c].b = c-192;
+      palette[c].b = c-128;
    }
    for (c=192; c<256; c++) {
       palette[c].r = 63;


--
Who is General Protection Fault and why is he reading my drive?!

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/