Skip to content

Commit

Permalink
kitty: don't preserve RGBA data for new selfref animation #1900
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jul 26, 2021
1 parent e8cdff6 commit 8e6fa10
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/lib/kitty.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,18 +695,20 @@ write_kitty_data(FILE* fp, int linesize, int leny, int lenx, int cols,
int ycell = y / cdimy;
int tyx = xcell + ycell * cols;
//fprintf(stderr, "Tyx: %d y: %d (%d) * %d x: %d (%d) state %d %p\n", tyx, y, y / cdimy, cols, x, x / cdimx, tam[tyx].state, tam[tyx].auxvector);
// animated auxvecs carry the entirety of the replacement data in
// them. on the first pixel of the cell, ditch the previous auxvec
// in its entirety, and copy over the entire cell.
if(animated && x % cdimx == 0 && y % cdimy == 0){
uint8_t* tmp;
tmp = kitty_anim_auxvec(leny, lenx, y, x, cdimy, cdimx,
data, linesize, tam[tyx].auxvector,
transcolor);
if(tmp == NULL){
goto err;
// old-style animated auxvecs carry the entirety of the replacement
// data in them. on the first pixel of the cell, ditch the previous
// auxvec in its entirety, and copy over the entire cell.
if(level == KITTY_ANIMATION){
if(x % cdimx == 0 && y % cdimy == 0){
uint8_t* tmp;
tmp = kitty_anim_auxvec(leny, lenx, y, x, cdimy, cdimx,
data, linesize, tam[tyx].auxvector,
transcolor);
if(tmp == NULL){
goto err;
}
tam[tyx].auxvector = tmp;
}
tam[tyx].auxvector = tmp;
}
if(tam[tyx].state >= SPRIXCELL_ANNIHILATED){
if(!animated){
Expand Down

0 comments on commit 8e6fa10

Please sign in to comment.