void _dtvcc_get_win_write_interval(ccx_dtvcc_window *window, int row_index, int *first, int *last) { for (*first = 0; *first < CCX_DTVCC_MAX_COLUMNS; (*first)++) if (CCX_DTVCC_SYM_IS_SET(window->rows[row_index][*first])) break; for (*last = CCX_DTVCC_MAX_COLUMNS - 1; *last > 0; (*last)--) if (CCX_DTVCC_SYM_IS_SET(window->rows[row_index][*last])) break; }
void _dtvcc_get_write_interval(dtvcc_tv_screen *tv, int row_index, int *first, int *last) { for (*first = 0; *first < CCX_DTVCC_SCREENGRID_COLUMNS; (*first)++) if (CCX_DTVCC_SYM_IS_SET(tv->chars[row_index][*first])) break; for (*last = CCX_DTVCC_SCREENGRID_COLUMNS - 1; *last > 0; (*last)--) if (CCX_DTVCC_SYM_IS_SET(tv->chars[row_index][*last])) break; }
int _dtvcc_is_win_row_empty(ccx_dtvcc_window *window, int row_index) { for (int j = 0; j < CCX_DTVCC_MAX_COLUMNS; j++) { if (CCX_DTVCC_SYM_IS_SET(window->rows[row_index][j])) return 0; } return 1; }
int _dtvcc_is_row_empty(dtvcc_tv_screen *tv, int row_index) { for (int j = 0; j < CCX_DTVCC_SCREENGRID_COLUMNS; j++) { if (CCX_DTVCC_SYM_IS_SET(tv->chars[row_index][j])) return 0; } return 1; }