intro: animate following orca move, not before #1616

pull/1621/head
nick black 3 years ago
parent 6944dd5bf8
commit 745cbfb41b
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -100,6 +100,7 @@ orcaride(struct notcurses* nc, struct ncplane* on, int iterations){
if(ncplane_move_yx(on, oy, ox)){
return -1;
}
//fprintf(stderr, "ON THE MOVE (%d/%d through %d/%d)\n", ncplane_y(on), ncplane_x(on), ncplane_y(on) + ncplane_dim_y(on) - 1, ncplane_x(on) + ncplane_dim_x(on) - 1);
DEMO_RENDER(nc);
return 0;
}
@ -232,10 +233,6 @@ int intro(struct notcurses* nc){
int flipmode = 0;
struct ncplane* on = NULL;
do{
int err;
if( (err = animate(nc, ncp, &flipmode)) ){
return err;
}
demo_nanosleep(nc, &iter);
clock_gettime(CLOCK_MONOTONIC, &now);
if(!on){
@ -245,6 +242,10 @@ int intro(struct notcurses* nc){
}else{
orcaride(nc, on, expected_iter);
}
int err;
if( (err = animate(nc, ncp, &flipmode)) ){
return err;
}
}while(timespec_to_ns(&now) < deadline || flipmode < expected_iter);
ncplane_destroy(on);
struct ncplane* gscott = NULL;

Loading…
Cancel
Save