parent
82d8c4b230
commit
eacf849e3a
@ -253,17 +253,6 @@ typedef struct {FONTS_DATA_HEAD} *FONTS_DATA_HANDLE;
|
|||||||
|
|
||||||
#define clear_sprite_position(cell) (cell).sprite_x = 0; (cell).sprite_y = 0; (cell).sprite_z = 0;
|
#define clear_sprite_position(cell) (cell).sprite_x = 0; (cell).sprite_y = 0; (cell).sprite_z = 0;
|
||||||
|
|
||||||
#define left_shift_line(line, at, num) { \
|
|
||||||
for(index_type __i__ = (at); __i__ < (line)->xnum - (num); __i__++) { \
|
|
||||||
COPY_CELL(line, __i__ + (num), line, __i__) \
|
|
||||||
} \
|
|
||||||
if ((((line)->gpu_cells[(at)].attrs) & WIDTH_MASK) != 1) { \
|
|
||||||
(line)->cpu_cells[(at)].ch = BLANK_CHAR; \
|
|
||||||
(line)->gpu_cells[(at)].attrs = BLANK_CHAR ? 1 : 0; \
|
|
||||||
clear_sprite_position((line)->gpu_cells[(at)]); \
|
|
||||||
}\
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ensure_space_for(base, array, type, num, capacity, initial_cap, zero_mem) \
|
#define ensure_space_for(base, array, type, num, capacity, initial_cap, zero_mem) \
|
||||||
if ((base)->capacity < num) { \
|
if ((base)->capacity < num) { \
|
||||||
size_t _newcap = MAX((size_t)initial_cap, MAX(2 * (base)->capacity, (size_t)num)); \
|
size_t _newcap = MAX((size_t)initial_cap, MAX(2 * (base)->capacity, (size_t)num)); \
|
||||||
|
|||||||
@ -54,6 +54,18 @@ line_reset_cells(Line *line, index_type start, index_type num, GPUCell *gpu_cell
|
|||||||
memcpy(line->cpu_cells + start, cpu_cells + start, sizeof(CPUCell) * num);
|
memcpy(line->cpu_cells + start, cpu_cells + start, sizeof(CPUCell) * num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
left_shift_line(Line *line, index_type at, index_type num) {
|
||||||
|
for (index_type i = at; i < line->xnum - num; i++) {
|
||||||
|
COPY_CELL(line, i + num, line, i);
|
||||||
|
}
|
||||||
|
if (at < line->xnum && ((line->gpu_cells[at].attrs) & WIDTH_MASK) != 1) {
|
||||||
|
line->cpu_cells[at].ch = BLANK_CHAR;
|
||||||
|
line->gpu_cells[at].attrs = BLANK_CHAR ? 1 : 0;
|
||||||
|
clear_sprite_position(line->gpu_cells[at]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef Line*(get_line_func)(void *, int);
|
typedef Line*(get_line_func)(void *, int);
|
||||||
void line_clear_text(Line *self, unsigned int at, unsigned int num, char_type ch);
|
void line_clear_text(Line *self, unsigned int at, unsigned int num, char_type ch);
|
||||||
void line_apply_cursor(Line *self, Cursor *cursor, unsigned int at, unsigned int num, bool clear_char);
|
void line_apply_cursor(Line *self, Cursor *cursor, unsigned int at, unsigned int num, bool clear_char);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user