|
|
@ -728,7 +728,6 @@ write_kitty_data(FILE* fp, int linesize, int leny, int lenx, int cols,
|
|
|
|
// old-style animated auxvecs carry the entirety of the replacement
|
|
|
|
// old-style animated auxvecs carry the entirety of the replacement
|
|
|
|
// data in them. on the first pixel of the cell, ditch the previous
|
|
|
|
// data in them. on the first pixel of the cell, ditch the previous
|
|
|
|
// auxvec in its entirety, and copy over the entire cell.
|
|
|
|
// auxvec in its entirety, and copy over the entire cell.
|
|
|
|
// FIXME HERE
|
|
|
|
|
|
|
|
if(x % cdimx == 0 && y % cdimy == 0){
|
|
|
|
if(x % cdimx == 0 && y % cdimy == 0){
|
|
|
|
if(level == KITTY_ANIMATION){
|
|
|
|
if(level == KITTY_ANIMATION){
|
|
|
|
uint8_t* tmp;
|
|
|
|
uint8_t* tmp;
|
|
|
@ -740,7 +739,11 @@ write_kitty_data(FILE* fp, int linesize, int leny, int lenx, int cols,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tam[tyx].auxvector = tmp;
|
|
|
|
tam[tyx].auxvector = tmp;
|
|
|
|
}else if(level == KITTY_SELFREF){
|
|
|
|
}else if(level == KITTY_SELFREF){
|
|
|
|
tam[tyx].auxvector = malloc(1);
|
|
|
|
tam[tyx].auxvector = malloc(sizeof(tam[tyx].state));
|
|
|
|
|
|
|
|
if(tam[tyx].auxvector == NULL){
|
|
|
|
|
|
|
|
goto err;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
memcpy(tam[tyx].auxvector, &tam[tyx].state, sizeof(tam[tyx].state));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(tam[tyx].state >= SPRIXCELL_ANNIHILATED){
|
|
|
|
if(tam[tyx].state >= SPRIXCELL_ANNIHILATED){
|
|
|
@ -813,7 +816,6 @@ err:
|
|
|
|
// with t=z, we can reference the original frame, and say "redraw this region",
|
|
|
|
// with t=z, we can reference the original frame, and say "redraw this region",
|
|
|
|
// thus avoiding the need to carry the original data around in our auxvecs.
|
|
|
|
// thus avoiding the need to carry the original data around in our auxvecs.
|
|
|
|
int kitty_rebuild_selfref(sprixel* s, int ycell, int xcell, uint8_t* auxvec){
|
|
|
|
int kitty_rebuild_selfref(sprixel* s, int ycell, int xcell, uint8_t* auxvec){
|
|
|
|
(void)auxvec;
|
|
|
|
|
|
|
|
if(init_sprixel_animation(s)){
|
|
|
|
if(init_sprixel_animation(s)){
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -828,7 +830,7 @@ int kitty_rebuild_selfref(sprixel* s, int ycell, int xcell, uint8_t* auxvec){
|
|
|
|
xcell * s->cellpxx, ycell * s->cellpxy,
|
|
|
|
xcell * s->cellpxx, ycell * s->cellpxy,
|
|
|
|
xlen, ylen, s->id);
|
|
|
|
xlen, ylen, s->id);
|
|
|
|
const int tyx = xcell + ycell * s->dimx;
|
|
|
|
const int tyx = xcell + ycell * s->dimx;
|
|
|
|
s->n->tam[tyx].state = SPRIXCELL_MIXED_KITTY;
|
|
|
|
memcpy(&s->n->tam[tyx].state, auxvec, sizeof(s->n->tam[tyx].state));
|
|
|
|
s->invalidated = SPRIXEL_INVALIDATED;
|
|
|
|
s->invalidated = SPRIXEL_INVALIDATED;
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|