Re: [AD] default mouse pointer with gui colors

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


David A. Capello <davidcapello@xxxxxxxxxx> wrote:
> OK, but, there is no reason for the mouse sprite to use the
> colors 16 and 255 in 8 bpp modes... ¿or yes?...

Probably not.  This change was committed:

Index: mouse.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/mouse.c,v
retrieving revision 1.4
diff -u -r1.4 mouse.c
--- mouse.c     2001/02/14 23:34:03     1.4
+++ mouse.c     2001/02/19 00:55:49
@@ -774,20 +774,11 @@
 
       for (y=0; y<DEFAULT_SPRITE_H; y++) {
         for (x=0; x<DEFAULT_SPRITE_W; x++) {
-           if (bitmap_color_depth(_mouse_pointer) == 8) {
-              switch (mouse_pointer_data[y][x]) {
-                 case 1:  col = 16;  break;
-                 case 2:  col = 255; break;
-                 default: col = 0;   break;
-              }
+           switch (mouse_pointer_data[y][x]) {
+              case 1:  col = makecol(255, 255, 255);             break;
+              case 2:  col = makecol(0, 0, 0);                   break;
+              default: col = _mouse_pointer->vtable->mask_color; break;
            }
-           else {
-              switch (mouse_pointer_data[y][x]) {
-                 case 1:  col = makecol(255, 255, 255);             break;
-                 case 2:  col = makecol(0, 0, 0);                   break;
-                 default: col = _mouse_pointer->vtable->mask_color; break;
-              }
-           } 
            putpixel(_mouse_pointer, x, y, col);
         }
       }



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