mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
notcurses_fade.3: break up typedef across lines
This commit is contained in:
parent
0a86ce83cc
commit
a27fc0e3f7
@ -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***);**
|
||||
|
@ -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)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user