|
|
@ -582,16 +582,15 @@ int kitty_destroy(const notcurses* nc, const ncpile* p, FILE* out, sprixel* s){
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//fprintf(stderr, "FROM: %d/%d state: %d s->n: %p\n", s->movedfromy, s->movedfromx, s->invalidated, s->n);
|
|
|
|
//fprintf(stderr, "FROM: %d/%d state: %d s->n: %p\n", s->movedfromy, s->movedfromx, s->invalidated, s->n);
|
|
|
|
const ncplane* stdn = notcurses_stdplane_const(nc);
|
|
|
|
|
|
|
|
for(int yy = s->movedfromy ; yy < s->movedfromy + s->dimy && yy < p->dimy ; ++yy){
|
|
|
|
for(int yy = s->movedfromy ; yy < s->movedfromy + s->dimy && yy < p->dimy ; ++yy){
|
|
|
|
for(int xx = s->movedfromx ; xx < s->movedfromx + s->dimx && xx < p->dimx ; ++xx){
|
|
|
|
for(int xx = s->movedfromx ; xx < s->movedfromx + s->dimx && xx < p->dimx ; ++xx){
|
|
|
|
const int ridx = (yy - stdn->absy) * p->dimx + (xx - stdn->absx);
|
|
|
|
const int ridx = (yy - nc->margin_t) * p->dimx + (xx - nc->margin_l);
|
|
|
|
struct crender *r = &p->crender[ridx];
|
|
|
|
struct crender *r = &p->crender[ridx];
|
|
|
|
if(!r->sprixel){
|
|
|
|
if(!r->sprixel){
|
|
|
|
if(s->n){
|
|
|
|
if(s->n){
|
|
|
|
//fprintf(stderr, "CHECKING %d/%d\n", yy - s->movedfromy, xx - s->movedfromx);
|
|
|
|
//fprintf(stderr, "CHECKING %d/%d\n", yy - s->movedfromy, xx - s->movedfromx);
|
|
|
|
sprixcell_e state = sprixel_state(s, yy - s->movedfromy + s->n->absy - stdn->absy,
|
|
|
|
sprixcell_e state = sprixel_state(s, yy - s->movedfromy + s->n->absy - nc->margin_t,
|
|
|
|
xx - s->movedfromx + s->n->absx - stdn->absx);
|
|
|
|
xx - s->movedfromx + s->n->absx - nc->margin_l);
|
|
|
|
if(state == SPRIXCELL_OPAQUE_KITTY){
|
|
|
|
if(state == SPRIXCELL_OPAQUE_KITTY){
|
|
|
|
r->s.damaged = 1;
|
|
|
|
r->s.damaged = 1;
|
|
|
|
}else if(s->invalidated == SPRIXEL_MOVED){
|
|
|
|
}else if(s->invalidated == SPRIXEL_MOVED){
|
|
|
|