Ignore:
Timestamp:
Oct 29, 2006, 9:54:51 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of cucul_set_attr_ansi() and cucul_set_attr_argb and merge the functionality into cucul_set_attr().
  • Add cucul_ansi_to_attr() and cucul_argb_to_attr().
  • Rename CUCUL_COLOR_* to CUCUL_*.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/export.c

    r1254 r1257  
    231231                continue;
    232232
    233             fg = ((attr & 0xeffe) == (CUCUL_COLOR_DEFAULT << 4)) ?
     233            fg = (((attr >> 4) & 0x7ffe) == (CUCUL_DEFAULT << 4)) ?
    234234                     0x10 : palette[_cucul_attr_to_ansi4fg(attr)];
    235             bg = (((attr >> 16) & 0xeffe) == (CUCUL_COLOR_TRANSPARENT << 4)) ?
     235            bg = (((attr >> 18) & 0x7ffe) == (CUCUL_TRANSPARENT << 4)) ?
    236236                     0x10 : palette[_cucul_attr_to_ansi4bg(attr)];
    237237
     
    538538                continue;
    539539
    540             if((attr & 0xeffe) == (CUCUL_COLOR_DEFAULT << 4))
     540            if(((attr >> 4) & 0x7ffe) == (CUCUL_DEFAULT << 4))
    541541                fg = 0x10;
    542542
    543             if(((attr >> 16) & 0xeffe) == (CUCUL_COLOR_TRANSPARENT << 4))
     543            if(((attr >> 18) & 0x7ffe) == (CUCUL_TRANSPARENT << 4))
    544544                bg = 0x10;
    545545
Note: See TracChangeset for help on using the changeset viewer.