… | |
… | |
827 | #define ROW(n) row_buf [LINENO (n)] |
827 | #define ROW(n) row_buf [LINENO (n)] |
828 | |
828 | |
829 | /* how to build & extract colors and attributes */ |
829 | /* how to build & extract colors and attributes */ |
830 | #define GET_BASEFG(x) (((x) & RS_fgMask)) |
830 | #define GET_BASEFG(x) (((x) & RS_fgMask)) |
831 | #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) |
831 | #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) |
832 | #ifndef NO_BRIGHTCOLOR |
|
|
833 | # define GET_FGCOLOR(x) ( \ |
|
|
834 | !((x) & RS_Bold) \ |
|
|
835 | || (ENABLE_STYLES && !(options & Opt_intensityStyles)) \ |
|
|
836 | || !IN_RANGE_INC (GET_BASEFG (x), minCOLOR, minBrightCOLOR) \ |
|
|
837 | ? GET_BASEFG (x) \ |
|
|
838 | : (GET_BASEFG (x) + (minBrightCOLOR - minCOLOR))) |
|
|
839 | # define GET_BGCOLOR(x) ( \ |
|
|
840 | !((x) & RS_Blink) \ |
|
|
841 | || (ENABLE_STYLES && !(options & Opt_intensityStyles)) \ |
|
|
842 | || !IN_RANGE_INC (GET_BASEBG (x), minCOLOR, minBrightCOLOR) \ |
|
|
843 | ? GET_BASEBG (x) \ |
|
|
844 | : (GET_BASEBG (x) + (minBrightCOLOR - minCOLOR))) |
|
|
845 | #else |
|
|
846 | # define GET_FGCOLOR(x) GET_BASEFG(x) |
|
|
847 | # define GET_BGCOLOR(x) GET_BASEBG(x) |
|
|
848 | #endif |
|
|
849 | |
832 | |
850 | #define GET_FONT(x) (((x) & RS_fontMask) >> RS_fontShift) |
833 | #define GET_FONT(x) (((x) & RS_fontMask) >> RS_fontShift) |
851 | #define SET_FONT(x,fid) (((x) & ~RS_fontMask) | ((fid) << RS_fontShift)) |
834 | #define SET_FONT(x,fid) (((x) & ~RS_fontMask) | ((fid) << RS_fontShift)) |
852 | |
835 | |
853 | #define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift) |
836 | #define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift) |
… | |
… | |
1493 | |
1476 | |
1494 | l.l = min (l.l, ncol); |
1477 | l.l = min (l.l, ncol); |
1495 | |
1478 | |
1496 | if (ncol > prev_ncol) |
1479 | if (ncol > prev_ncol) |
1497 | scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE); |
1480 | scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE); |
|
|
1481 | } |
|
|
1482 | |
|
|
1483 | int fgcolor_of (rend_t r) |
|
|
1484 | { |
|
|
1485 | int base = GET_BASEFG (r); |
|
|
1486 | #ifndef NO_BRIGHTCOLOR |
|
|
1487 | if (r & RS_Bold |
|
|
1488 | && (!ENABLE_STYLES || OPTION (Opt_intensityStyles)) |
|
|
1489 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
|
|
1490 | base += minBrightCOLOR - minCOLOR; |
|
|
1491 | #endif |
|
|
1492 | return base; |
|
|
1493 | } |
|
|
1494 | |
|
|
1495 | int bgcolor_of (rend_t r) |
|
|
1496 | { |
|
|
1497 | int base = GET_BASEBG (r); |
|
|
1498 | #ifndef NO_BRIGHTCOLOR |
|
|
1499 | if (r & RS_Blink |
|
|
1500 | && (!ENABLE_STYLES || OPTION (Opt_intensityStyles)) |
|
|
1501 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
|
|
1502 | base += minBrightCOLOR - minCOLOR; |
|
|
1503 | #endif |
|
|
1504 | return base; |
1498 | } |
1505 | } |
1499 | |
1506 | |
1500 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1507 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1501 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1508 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1502 | int scr_scroll_text (int row1, int row2, int count); |
1509 | int scr_scroll_text (int row1, int row2, int count); |