diff --git a/src/demo/chunli.c b/src/demo/chunli.c index 66c6af305..fd7ce7699 100644 --- a/src/demo/chunli.c +++ b/src/demo/chunli.c @@ -10,9 +10,9 @@ typedef struct chunli { // test of sprites from files int chunli_demo(struct notcurses* nc){ - struct ncplane* stdn = notcurses_stdplane(nc); - cell c = CELL_SIMPLE_INITIALIZER(' '); - ncplane_set_base(stdn, &c); + cell b = CELL_TRIVIAL_INITIALIZER; + cell_set_fg_alpha(&b, CELL_ALPHA_TRANSPARENT); + cell_set_bg_alpha(&b, CELL_ALPHA_TRANSPARENT); struct timespec iterdelay; timespec_div(&demodelay, 10, &iterdelay); int averr, dimy, dimx; @@ -33,6 +33,7 @@ int chunli_demo(struct notcurses* nc){ return -1; } chuns[i].n = ncvisual_plane(chuns[i].ncv); + ncplane_set_base(chuns[i].n, &b); int thisx, thisy; ncplane_dim_yx(chuns[i].n, &thisy, &thisx); if(ncplane_move_yx(chuns[i].n, (dimy - thisy) / 2, (dimx - thisx) / 2)){ @@ -55,9 +56,6 @@ int chunli_demo(struct notcurses* nc){ return -1; } struct ncplane* ncp = ncvisual_plane(ncv); - cell b = CELL_TRIVIAL_INITIALIZER; - cell_set_fg_alpha(&b, CELL_ALPHA_TRANSPARENT); - cell_set_bg_alpha(&b, CELL_ALPHA_TRANSPARENT); ncplane_set_base(ncp, &b); const int offsets[] = { 0, 50, 100, 154, 208, 260, 312, 368, 420, 479, 538, 588, 638, 688, 736, 786, 836, 888, 942 diff --git a/src/demo/view.c b/src/demo/view.c index 0bfce9383..252e2074e 100644 --- a/src/demo/view.c +++ b/src/demo/view.c @@ -123,6 +123,10 @@ int view_demo(struct notcurses* nc){ ncplane_destroy(dsplane); return -1; } + cell b = CELL_TRIVIAL_INITIALIZER; + cell_set_fg_alpha(&b, CELL_ALPHA_TRANSPARENT); + cell_set_bg_alpha(&b, CELL_ALPHA_TRANSPARENT); + ncplane_set_base(ncvisual_plane(ncv2), &b); ncvisual_destroy(ncv); ncvisual_destroy(ncv2); demo_render(nc); diff --git a/src/lib/libav.c b/src/lib/libav.c index a3d697fbd..e33ffc633 100644 --- a/src/lib/libav.c +++ b/src/lib/libav.c @@ -347,9 +347,6 @@ int ncvisual_render(const ncvisual* ncv, int begy, int begx, int leny, int lenx) if(!rgbbase_up[3] || !rgbbase_down[3]){ cell_set_bg_alpha(c, CELL_ALPHA_TRANSPARENT); if(!rgbbase_up[3] && !rgbbase_down[3]){ - if(cell_load(ncv->ncp, c, " ") <= 0){ - return -1; - } cell_set_fg_alpha(c, CELL_ALPHA_TRANSPARENT); }else if(!rgbbase_up[3]){ // down has the color if(cell_load(ncv->ncp, c, "\u2584") <= 0){ // lower half block