Ignore:
Timestamp:
Nov 11, 2006, 9:44:14 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of _cucul_attr_to_ansi4[fb]g() and replace all calls with the now official cucul_attr_to_ansi_[fb]g().
Location:
libcaca/trunk/caca
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_slang.c

    r1257 r1332  
    218218             * bright backgrounds, it's just fucked up. */
    219219#if 0
    220             uint8_t fgcolor = _cucul_attr_to_ansi4fg(*attrs);
    221             uint8_t bgcolor = _cucul_attr_to_ansi4bg(*attrs);
     220            uint8_t fgcolor = cucul_attr_to_ansi_fg(*attrs);
     221            uint8_t bgcolor = cucul_attr_to_ansi_bg(*attrs);
     222
     223            if(fgcolor >= 0x10)
     224                fgcolor = CUCUL_LIGHTGRAY;
     225
     226            if(bgcolor >= 0x10)
     227                bgcolor = CUCUL_BLACK; /* FIXME: handle transparency */
    222228
    223229            if(fgcolor == bgcolor)
  • libcaca/trunk/caca/driver_win32.c

    r1254 r1332  
    199199    {
    200200        uint32_t ch = *chars++;
     201        uint8_t fg = cucul_attr_to_ansi_fg(*attrs);
     202        uint8_t bg = cucul_attr_to_ansi_bg(*attrs);
    201203
    202204#if 0
     
    214216#endif
    215217
    216         buffer->Attributes =
    217                 win32_fg_palette[_cucul_attr_to_ansi4fg(*attrs)]
    218                  | win32_bg_palette[_cucul_attr_to_ansi4bg(*attrs)];
     218        buffer->Attributes = win32_fg_palette[fg < 0x10 ? fg : CUCUL_LIGHTGRAY]
     219                              | win32_bg_palette[bg < 0x10 ? bg : CUCUL_BLACK];
    219220        attrs++;
    220221        buffer++;
Note: See TracChangeset for help on using the changeset viewer.