Re: [AD] 4.0.2 release

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


Sven Sandberg wrote:
However, on all platforms (or at least djgpp, watcom and linux),
exlights looks wrong. One 'pie slice' of the light sprite is black
rather than colored, and a few pixels in the top left corner contain
garbage. I'll investigate it when I get time.

The attached patch should fix this problem (negative hue was not
treated in hsv_to_rgb(); apparantly it was introduced when a 'bug in
the hue blender' was fixed six weeks ago).

--
Sven Sandberg   svsa1977@xxxxxxxxxx   home.student.uu.se/svsa1977
Index: src/color.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/color.c,v
retrieving revision 1.13
diff -u -r1.13 color.c
--- src/color.c	17 May 2002 17:20:45 -0000	1.13
+++ src/color.c	11 Jun 2002 18:48:30 -0000
@@ -355,6 +355,9 @@
    }
    else {
       h = fmod(h, 360.0) / 60.0;
+      if (h < 0)
+	 h += 6.0;
+
       i = (int)h;
       f = h - i;
       x = v * (1.0f - s);


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