Rip out the old sprite update code

This commit is contained in:
Kovid Goyal
2017-10-31 14:23:09 +05:30
parent 38a5e76c50
commit f25d2ea540
14 changed files with 216 additions and 343 deletions

View File

@@ -8,18 +8,6 @@
#include "data-types.h"
static inline void
update_sprites_in_line(Cell *cells, index_type xnum) {
if (LIKELY(xnum > 0)) {
if (CHAR_IS_BLANK(cells->ch)) { clear_sprite_position(cells[0]); }
else set_sprite_position(cells, NULL);
for (index_type i = 1; i < xnum; i++) {
if (CHAR_IS_BLANK(cells[i].ch)) { clear_sprite_position(cells[i]); }
else set_sprite_position(cells + i, cells + i - 1);
}
}
}
static inline void
set_attribute_on_line(Cell *cells, uint32_t shift, uint32_t val, index_type xnum) {
// Set a single attribute on all cells in the line
@@ -27,7 +15,6 @@ set_attribute_on_line(Cell *cells, uint32_t shift, uint32_t val, index_type xnum
attrs_type aval = (val & mask) << shift;
mask = ~(mask << shift);
for (index_type i = 0; i < xnum; i++) cells[i].attrs = (cells[i].attrs & mask) | aval;
if (shift == BOLD_SHIFT || shift == ITALIC_SHIFT) update_sprites_in_line(cells, xnum);
}
static inline void