notcurses_fade.3: break up typedef across lines

This commit is contained in:
nick black 2021-03-23 19:34:29 -04:00 committed by Nick Black
parent 0a86ce83cc
commit a27fc0e3f7
2 changed files with 13 additions and 10 deletions

View File

@ -17,7 +17,8 @@ struct ncfadectx;
// returned, the fading operation ceases immediately, and that value is
// propagated out. If provided and not NULL, the faders will not themselves
// call notcurses_render().
typedef int (*fadecb)(struct notcurses* nc, struct ncplane* ncp, const struct timespec*, void* curry);
typedef int (*fadecb)(struct notcurses* nc, struct ncplane* ncp,
const struct timespec*, void* curry);
```
**bool notcurses_canfade(const struct notcurses* ***nc***);**

View File

@ -49,16 +49,20 @@ orcashow(struct notcurses* nc){
}
static int
orcaride(struct notcurses* nc, struct ncplane* on, int dimy, int dimx){
orcaride(struct notcurses* nc, struct ncplane* on, int dimy, int dimx, int iteration){
if(iteration % 2){
return 0;
}
int odimy, odimx, oy, ox;
ncplane_yx(on, &oy, &ox);
ncplane_dim_yx(on, &odimy, &odimx);
DEMO_RENDER(nc);
if(oy + odimy + 5 < dimy){
oy += 5;
if(iteration % 4 == 0){
if(oy + odimy + 5 < dimy){
oy += 5;
}
}
if(ox + odimx + 10 < dimx){
ox += 10;
if(ox + odimx + 5 < dimx){
ox += 5;
}
if(ncplane_move_yx(on, oy, ox)){
return -1;
@ -202,9 +206,7 @@ int intro(struct notcurses* nc){
timespec_div(&demodelay, 10, &iter);
demo_nanosleep(nc, &iter);
clock_gettime(CLOCK_MONOTONIC, &now);
if(flipmode % 3 == 0){
orcaride(nc, on, rows, cols);
}
orcaride(nc, on, rows, cols, flipmode);
}while(timespec_to_ns(&now) < deadline);
ncplane_destroy(on);
if(!notcurses_canfade(nc)){