Ignore:
Timestamp:
Oct 29, 2006, 1:53:46 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Use the LSB of alpha and blue components to encode additional flags such as bold or underline. No higher level support for these yet, but at least everything is consistent.
  • Created cucul_set_attr_ansi() and cucul_set_attr_argb() which are bound to replace cucul_set_color() and cucul_set_truecolor().
File:
1 edited

Legend:

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

    r1218 r1254  
    202202{
    203203    int x, y;
    204     uint32_t *attr = dp->cv->attr;
     204    uint32_t *attrs = dp->cv->attrs;
    205205    uint32_t *chars = dp->cv->chars;
    206206    for(y = 0; y < (int)dp->cv->height; y++)
     
    218218             * bright backgrounds, it's just fucked up. */
    219219#if 0
    220             uint8_t fgcolor = _cucul_argb32_to_ansi4fg(*attr);
    221             uint8_t bgcolor = _cucul_argb32_to_ansi4bg(*attr);
     220            uint8_t fgcolor = _cucul_attr_to_ansi4fg(*attrs);
     221            uint8_t bgcolor = _cucul_attr_to_ansi4bg(*attrs);
    222222
    223223            if(fgcolor == bgcolor)
     
    232232                SLsmg_set_color(slang_assoc[fgcolor + 16 * bgcolor]);
    233233                SLsmg_write_char(' ');
    234                 attr++;
     234                attrs++;
    235235            }
    236236            else
    237237#endif
    238238            {
    239                 SLsmg_set_color(slang_assoc[_cucul_argb32_to_ansi8(*attr++)]);
     239                SLsmg_set_color(slang_assoc[_cucul_attr_to_ansi8(*attrs++)]);
    240240                slang_write_utf32(ch);
    241241            }
    242242#else
    243             SLsmg_set_color(_cucul_argb32_to_ansi8(*attr++));
     243            SLsmg_set_color(_cucul_attr_to_ansi8(*attrs++));
    244244            slang_write_utf32(ch);
    245245#endif
Note: See TracChangeset for help on using the changeset viewer.