|
|
@ -1001,15 +1001,15 @@ sprite_rebuild(const notcurses* nc, sprixel* s, int ycell, int xcell){
|
|
|
|
int ret = 0;
|
|
|
|
int ret = 0;
|
|
|
|
// special case the transition back to SPRIXCELL_TRANSPARENT; this can be
|
|
|
|
// special case the transition back to SPRIXCELL_TRANSPARENT; this can be
|
|
|
|
// done in O(1), since the actual glyph needn't change.
|
|
|
|
// done in O(1), since the actual glyph needn't change.
|
|
|
|
|
|
|
|
uint8_t* auxvec = s->n->tam[s->dimx * ycell + xcell].auxvector;
|
|
|
|
|
|
|
|
assert(auxvec);
|
|
|
|
if(s->n->tam[s->dimx * ycell + xcell].state == SPRIXCELL_ANNIHILATED_TRANS){
|
|
|
|
if(s->n->tam[s->dimx * ycell + xcell].state == SPRIXCELL_ANNIHILATED_TRANS){
|
|
|
|
s->n->tam[s->dimx * ycell + xcell].state = SPRIXCELL_TRANSPARENT;
|
|
|
|
s->n->tam[s->dimx * ycell + xcell].state = SPRIXCELL_TRANSPARENT;
|
|
|
|
}else if(s->n->tam[s->dimx * ycell + xcell].state == SPRIXCELL_ANNIHILATED){
|
|
|
|
}else if(s->n->tam[s->dimx * ycell + xcell].state == SPRIXCELL_ANNIHILATED){
|
|
|
|
uint8_t* auxvec = s->n->tam[s->dimx * ycell + xcell].auxvector;
|
|
|
|
|
|
|
|
assert(auxvec);
|
|
|
|
|
|
|
|
// sets the new state itself
|
|
|
|
// sets the new state itself
|
|
|
|
ret = nc->tcache.pixel_rebuild(s, ycell, xcell, auxvec);
|
|
|
|
ret = nc->tcache.pixel_rebuild(s, ycell, xcell, auxvec);
|
|
|
|
free(auxvec);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
free(auxvec);
|
|
|
|
s->n->tam[s->dimx * ycell + xcell].auxvector = NULL;
|
|
|
|
s->n->tam[s->dimx * ycell + xcell].auxvector = NULL;
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|