[postpaint_cell] don't damage cells hidden by sprixel #1527

pull/1549/head
nick black 4 years ago
parent 5a702512c5
commit 420c967605
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -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…
Cancel
Save