… | |
… | |
687 | #define Col2Pixel(col) ((int32_t)Width2Pixel(col)) |
687 | #define Col2Pixel(col) ((int32_t)Width2Pixel(col)) |
688 | #define Row2Pixel(row) ((int32_t)Height2Pixel(row)) |
688 | #define Row2Pixel(row) ((int32_t)Height2Pixel(row)) |
689 | #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) |
689 | #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) |
690 | #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) |
690 | #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) |
691 | |
691 | |
692 | #define OPTION(opt) (options & (opt)) |
|
|
693 | #define DEFAULT_OPTIONS (Opt_scrollBar \ |
|
|
694 | | Opt_scrollTtyOutput \ |
|
|
695 | | Opt_jumpScroll \ |
|
|
696 | | Opt_secondaryScreen \ |
|
|
697 | | Opt_secondaryScroll \ |
|
|
698 | | Opt_pastableTabs \ |
|
|
699 | | Opt_intensityStyles) |
|
|
700 | |
|
|
701 | // for m >= -n, ensure remainder lies between 0..n-1 |
692 | // for m >= -n, ensure remainder lies between 0..n-1 |
702 | #define MOD(m,n) (((m) + (n)) % (n)) |
693 | #define MOD(m,n) (((m) + (n)) % (n)) |
703 | |
694 | |
704 | #define LINENO(n) MOD (term_start + int(n), total_rows) |
695 | #define LINENO(n) MOD (term_start + int(n), total_rows) |
705 | #define ROW(n) row_buf [LINENO (n)] |
696 | #define ROW(n) row_buf [LINENO (n)] |
… | |
… | |
1294 | { |
1285 | { |
1295 | int base = GET_BASEFG (r); |
1286 | int base = GET_BASEFG (r); |
1296 | #ifndef NO_BRIGHTCOLOR |
1287 | #ifndef NO_BRIGHTCOLOR |
1297 | if (r & RS_Bold |
1288 | if (r & RS_Bold |
1298 | # if ENABLE_STYLES |
1289 | # if ENABLE_STYLES |
1299 | && OPTION (Opt_intensityStyles) |
1290 | && option (Opt_intensityStyles) |
1300 | # endif |
1291 | # endif |
1301 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
1292 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
1302 | base += minBrightCOLOR - minCOLOR; |
1293 | base += minBrightCOLOR - minCOLOR; |
1303 | #endif |
1294 | #endif |
1304 | return base; |
1295 | return base; |
… | |
… | |
1308 | { |
1299 | { |
1309 | int base = GET_BASEBG (r); |
1300 | int base = GET_BASEBG (r); |
1310 | #ifndef NO_BRIGHTCOLOR |
1301 | #ifndef NO_BRIGHTCOLOR |
1311 | if (r & RS_Blink |
1302 | if (r & RS_Blink |
1312 | # if ENABLE_STYLES |
1303 | # if ENABLE_STYLES |
1313 | && OPTION (Opt_intensityStyles) |
1304 | && option (Opt_intensityStyles) |
1314 | # endif |
1305 | # endif |
1315 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
1306 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
1316 | base += minBrightCOLOR - minCOLOR; |
1307 | base += minBrightCOLOR - minCOLOR; |
1317 | #endif |
1308 | #endif |
1318 | return base; |
1309 | return base; |
1319 | } |
1310 | } |
1320 | |
1311 | |
1321 | bool option (uint32_t opt) const NOTHROW |
1312 | bool option (uint8_t opt) const NOTHROW |
1322 | { |
1313 | { |
1323 | return OPTION (opt); |
1314 | return options[opt >> 3] & (1 << (opt & 7)); |
1324 | } |
1315 | } |
1325 | |
1316 | |
1326 | void set_option (uint32_t opt, bool set) NOTHROW |
1317 | void set_option (uint8_t opt, bool set = true) NOTHROW |
1327 | { |
1318 | { |
1328 | if (set) |
1319 | if (set) |
1329 | options |= opt; |
1320 | options[opt >> 3] |= (1 << (opt & 7)); |
1330 | else |
1321 | else |
1331 | options &= ~opt; |
1322 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1332 | } |
1323 | } |
1333 | |
1324 | |
1334 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1325 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1335 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1326 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1336 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
1327 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |