sprite_wipe_cell -> sprite_wipe

pull/1567/head
nick black 3 years ago
parent f19c6c88ff
commit 6a509328fa
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -914,6 +914,9 @@ plane_debug(const ncplane* n, bool details){
// throughout to 0. the same trick doesn't work on sixel, but there we
// can just print directly over the bitmap.
int sprite_kitty_cell_wipe(const notcurses* nc, sprixel* s, int y, int x);
// cell coordinates *within the sprixel*, not absolute
int sprite_wipe(const notcurses* nc, sprixel* s, int y, int x);
int sixel_wipe(const notcurses* nc, sprixel* s, int ycell, int xcell);
void sprixel_free(sprixel* s);
void sprixel_hide(sprixel* s);
@ -926,7 +929,6 @@ sprixel* sprixel_recycle(ncplane* n);
// takes ownership of s on success.
int sprixel_load(sprixel* spx, char* s, int bytes, int placey, int placex,
int pixy, int pixx, int parse_start);
int sprite_wipe_cell(const notcurses* nc, sprixel* s, int y, int x);
int sixel_delete(const notcurses* nc, const ncpile* p, FILE* out, sprixel* s);
int kitty_delete(const notcurses* nc, const ncpile* p, FILE* out, sprixel* s);
int kitty_init(int fd);

@ -134,6 +134,7 @@ highcontrast(uint32_t bchannel){
return conrgb;
}
// wants coordinates within the sprixel, not absolute
static void
paint_sprixel(const ncplane* p, const nccell* vis, struct crender* crender,
int y, int x){
@ -145,8 +146,8 @@ paint_sprixel(const ncplane* p, const nccell* vis, struct crender* crender,
if(crender->p || crender->s.bgblends){
// if sprite_wipe_cell() fails, we presumably do not have the
// ability to wipe, and must reprint the character
if(sprite_wipe_cell(nc, p->sprite, y, x)){
//fprintf(stderr, "damaging due to wipe %d/%d\n", y, x);
if(sprite_wipe(nc, p->sprite, y, x)){
//fprintf(stderr, "damaging due to wipe [%s] %d/%d\n", nccell_extended_gcluster(crender->p, &crender->c), y, x);
crender->s.damaged = 1;
}
crender->s.p_beats_sprixel = 1;
@ -385,7 +386,7 @@ postpaint_cell(nccell* lastframe, int dimx, struct crender* crender,
lock_in_highcontrast(targc, crender);
nccell* prevcell = &lastframe[fbcellidx(y, dimx, *x)];
if(cellcmp_and_dupfar(pool, prevcell, crender->p, targc) > 0){
//fprintf(stderr, "damaging due to cmp\n");
//fprintf(stderr, "damaging due to cmp [%s] %d %d\n", nccell_extended_gcluster(crender->p, &crender->c), y, *x);
if(crender->sprixel){
if(!crender->s.p_beats_sprixel && sprixel_state(crender->sprixel, y, *x) != SPRIXCELL_OPAQUE){
crender->s.damaged = 1;

@ -123,7 +123,7 @@ int sprixel_load(sprixel* spx, char* s, int bytes, int placey, int placex,
// returns 1 if already annihilated, 0 if we successfully annihilated the cell,
// or -1 if we could not annihilate the cell (i.e. we're sixel).
int sprite_wipe_cell(const notcurses* nc, sprixel* s, int ycell, int xcell){
int sprite_wipe(const notcurses* nc, sprixel* s, int ycell, int xcell){
if(s->invalidated == SPRIXEL_HIDE){ // no need to do work if we're killing it
return 0;
}

Loading…
Cancel
Save