… | |
… | |
699 | #define Col2Pixel(col) ((int32_t)Width2Pixel(col)) |
699 | #define Col2Pixel(col) ((int32_t)Width2Pixel(col)) |
700 | #define Row2Pixel(row) ((int32_t)Height2Pixel(row)) |
700 | #define Row2Pixel(row) ((int32_t)Height2Pixel(row)) |
701 | #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) |
701 | #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) |
702 | #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) |
702 | #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) |
703 | |
703 | |
|
|
704 | #define OPTION(opt) (options & (opt)) |
|
|
705 | #define DEFAULT_OPTIONS (Opt_scrollBar | Opt_scrollTtyOutput \ |
|
|
706 | | Opt_jumpScroll | Opt_secondaryScreen \ |
|
|
707 | | Opt_pastableTabs | Opt_intensityStyles) |
|
|
708 | |
704 | // for m >= -n, ensure remainder lies between 0..n-1 |
709 | // for m >= -n, ensure remainder lies between 0..n-1 |
705 | #define MOD(m,n) (((m) + (n)) % (n)) |
710 | #define MOD(m,n) (((m) + (n)) % (n)) |
706 | |
711 | |
707 | #define LINENO(n) MOD (term_start + int(n), total_rows) |
712 | #define LINENO(n) MOD (term_start + int(n), total_rows) |
708 | #define ROW(n) row_buf [LINENO (n)] |
713 | #define ROW(n) row_buf [LINENO (n)] |
… | |
… | |
1439 | # endif |
1444 | # endif |
1440 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
1445 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
1441 | base += minBrightCOLOR - minCOLOR; |
1446 | base += minBrightCOLOR - minCOLOR; |
1442 | #endif |
1447 | #endif |
1443 | return base; |
1448 | return base; |
|
|
1449 | } |
|
|
1450 | |
|
|
1451 | bool option (uint32_t opt) |
|
|
1452 | { |
|
|
1453 | return OPTION (opt); |
|
|
1454 | } |
|
|
1455 | |
|
|
1456 | void set_option (uint32_t opt, bool set) |
|
|
1457 | { |
|
|
1458 | if (set) |
|
|
1459 | options |= opt; |
|
|
1460 | else |
|
|
1461 | options &= ~opt; |
1444 | } |
1462 | } |
1445 | |
1463 | |
1446 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1464 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1447 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1465 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1448 | int scr_scroll_text (int row1, int row2, int count); |
1466 | int scr_scroll_text (int row1, int row2, int count); |