diff --git a/data/chunli01.png b/data/chunli01.png new file mode 100644 index 000000000..f2a1f888b Binary files /dev/null and b/data/chunli01.png differ diff --git a/data/chunli02.png b/data/chunli02.png new file mode 100644 index 000000000..8a081600f Binary files /dev/null and b/data/chunli02.png differ diff --git a/data/chunli03.png b/data/chunli03.png new file mode 100644 index 000000000..cb3b29970 Binary files /dev/null and b/data/chunli03.png differ diff --git a/data/chunli04.png b/data/chunli04.png new file mode 100644 index 000000000..7633c8472 Binary files /dev/null and b/data/chunli04.png differ diff --git a/data/chunli05.png b/data/chunli05.png new file mode 100644 index 000000000..41d116ac1 Binary files /dev/null and b/data/chunli05.png differ diff --git a/data/chunli06.png b/data/chunli06.png new file mode 100644 index 000000000..c039cae9c Binary files /dev/null and b/data/chunli06.png differ diff --git a/data/chunli07.png b/data/chunli07.png new file mode 100644 index 000000000..5c3458c3f Binary files /dev/null and b/data/chunli07.png differ diff --git a/data/chunli08.png b/data/chunli08.png new file mode 100644 index 000000000..64d7e982d Binary files /dev/null and b/data/chunli08.png differ diff --git a/data/chunli09.png b/data/chunli09.png new file mode 100644 index 000000000..ba217d3a7 Binary files /dev/null and b/data/chunli09.png differ diff --git a/data/chunli1.png b/data/chunli1.png deleted file mode 100644 index b8e9e3a06..000000000 Binary files a/data/chunli1.png and /dev/null differ diff --git a/data/chunli10.png b/data/chunli10.png new file mode 100644 index 000000000..07bd1e7b6 Binary files /dev/null and b/data/chunli10.png differ diff --git a/data/chunli11.png b/data/chunli11.png new file mode 100644 index 000000000..c46f04a59 Binary files /dev/null and b/data/chunli11.png differ diff --git a/data/chunli12.png b/data/chunli12.png new file mode 100644 index 000000000..69aa892e2 Binary files /dev/null and b/data/chunli12.png differ diff --git a/data/chunli13.png b/data/chunli13.png new file mode 100644 index 000000000..586638814 Binary files /dev/null and b/data/chunli13.png differ diff --git a/data/chunli14.png b/data/chunli14.png new file mode 100644 index 000000000..c03125db5 Binary files /dev/null and b/data/chunli14.png differ diff --git a/data/chunli15.png b/data/chunli15.png new file mode 100644 index 000000000..48a00082a Binary files /dev/null and b/data/chunli15.png differ diff --git a/data/chunli16.png b/data/chunli16.png new file mode 100644 index 000000000..b2b7234e9 Binary files /dev/null and b/data/chunli16.png differ diff --git a/data/chunli17.png b/data/chunli17.png new file mode 100644 index 000000000..e759791ff Binary files /dev/null and b/data/chunli17.png differ diff --git a/data/chunli18.png b/data/chunli18.png new file mode 100644 index 000000000..783847da2 Binary files /dev/null and b/data/chunli18.png differ diff --git a/data/chunli19.png b/data/chunli19.png new file mode 100644 index 000000000..c92326a76 Binary files /dev/null and b/data/chunli19.png differ diff --git a/data/chunli2.png b/data/chunli2.png deleted file mode 100644 index 11cb38b36..000000000 Binary files a/data/chunli2.png and /dev/null differ diff --git a/data/chunli20.png b/data/chunli20.png new file mode 100644 index 000000000..3b87f4cbf Binary files /dev/null and b/data/chunli20.png differ diff --git a/data/chunli21.png b/data/chunli21.png new file mode 100644 index 000000000..624c0efc3 Binary files /dev/null and b/data/chunli21.png differ diff --git a/data/chunli22.png b/data/chunli22.png new file mode 100644 index 000000000..f778bf379 Binary files /dev/null and b/data/chunli22.png differ diff --git a/data/chunli23.png b/data/chunli23.png new file mode 100644 index 000000000..16b73531d Binary files /dev/null and b/data/chunli23.png differ diff --git a/data/chunli24.png b/data/chunli24.png new file mode 100644 index 000000000..502e94855 Binary files /dev/null and b/data/chunli24.png differ diff --git a/data/chunli3.png b/data/chunli3.png deleted file mode 100644 index ed7b87c18..000000000 Binary files a/data/chunli3.png and /dev/null differ diff --git a/data/chunli4.png b/data/chunli4.png deleted file mode 100644 index bc4ac04d2..000000000 Binary files a/data/chunli4.png and /dev/null differ diff --git a/data/chunli5.png b/data/chunli5.png deleted file mode 100644 index 90d579f09..000000000 Binary files a/data/chunli5.png and /dev/null differ diff --git a/data/chunli6.png b/data/chunli6.png deleted file mode 100644 index 28fcf8d5c..000000000 Binary files a/data/chunli6.png and /dev/null differ diff --git a/data/chunli7.png b/data/chunli7.png deleted file mode 100644 index 0db40aaf2..000000000 Binary files a/data/chunli7.png and /dev/null differ diff --git a/src/demo/chunli.c b/src/demo/chunli.c index 1f1b2877b..c3100d045 100644 --- a/src/demo/chunli.c +++ b/src/demo/chunli.c @@ -41,7 +41,7 @@ chunli_draw(struct notcurses* nc, const char* ext, int count, const cell* b){ if(demo_render(nc)){ return -1; } - nanosleep(&iterdelay, NULL); + demo_nanosleep(nc, &iterdelay); ncvisual_destroy(chuns[i].ncv); free(chuns[i].path); } @@ -56,8 +56,24 @@ int chunli_demo(struct notcurses* nc){ cell b = CELL_TRIVIAL_INITIALIZER; cell_set_fg_alpha(&b, CELL_ALPHA_TRANSPARENT); cell_set_bg_alpha(&b, CELL_ALPHA_TRANSPARENT); + char file[PATH_MAX]; + for(int i = 1 ; i < 100 ; ++i){ + snprintf(file, sizeof(file), "chunli%02d.png", i); + char* path = find_data(file); + struct ncvisual* ncv = ncvisual_open_plane(nc, path, &averr, 0, 0, NCSCALE_NONE); + if(ncv == NULL){ + free(path); + break; + } + free(path); + if(ncvisual_stream(nc, ncv, &averr, 1, ncvisual_simple_streamer, NULL) < 0){ + ncvisual_destroy(ncv); + return -1; + } + demo_nanosleep(nc, &iterdelay); + ncvisual_destroy(ncv); + } chunli_draw(nc, "bmp", CHUNS, &b); - chunli_draw(nc, "png", 7, &b); char* victory = find_data("chunlivictory.png"); struct ncvisual* ncv = ncvisual_open_plane(nc, victory, &averr, 0, 0, NCSCALE_NONE); if(ncv == NULL){