mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
[postpaint_cell] don't damage cells hidden by sprixel #1527
This commit is contained in:
parent
5a702512c5
commit
420c967605
@ -948,6 +948,7 @@ static inline bool sprixel_kitty_p(const tinfo* t){
|
||||
static inline sprixcell_e sprixel_state(sprixel* s, int y, int x){
|
||||
int localy = y - s->n->absy;
|
||||
int localx = x - s->n->absx;
|
||||
//fprintf(stderr, "TAM %d at %d/%d (%d/%d)\n", s->n->tacache[localy * s->dimx + localx], localy, localx, y, x);
|
||||
return s->n->tacache[localy * s->dimx + localx];
|
||||
}
|
||||
|
||||
|
@ -386,7 +386,13 @@ postpaint_cell(nccell* lastframe, int dimx, struct crender* 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");
|
||||
crender->s.damaged = 1;
|
||||
if(crender->sprixel){
|
||||
if(!crender->s.p_beats_sprixel && sprixel_state(crender->sprixel, y, *x) != SPRIXCELL_OPAQUE){
|
||||
crender->s.damaged = 1;
|
||||
}
|
||||
}else{
|
||||
crender->s.damaged = 1;
|
||||
}
|
||||
assert(!nccell_wide_right_p(targc));
|
||||
const int width = targc->width;
|
||||
for(int i = 1 ; i < width ; ++i){
|
||||
|
Loading…
x
Reference in New Issue
Block a user