From 74e513e71b1be8cda7f29aa38ddb5df8e95e0d70 Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 2 Feb 2021 00:04:38 -0500 Subject: [PATCH] paint(): need invert bits not logic for stacked blitters #1068 --- src/lib/render.c | 3 ++- tests/stacking.cpp | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/render.c b/src/lib/render.c index 07f1936cb9..b53d577430 100644 --- a/src/lib/render.c +++ b/src/lib/render.c @@ -312,7 +312,8 @@ paint(const ncplane* p, struct crender* rvec, int dstleny, int dstlenx, // Evaluate the background first, in case we have HIGHCONTRAST fg text. if(cell_bg_alpha(targc) > CELL_ALPHA_OPAQUE){ const nccell* vis = &p->fb[nfbcellidx(p, y, x)]; - if(!((!crender->s.blittedquads) & cell_blittedquadrants(vis))){ +//fprintf(stderr, "y/x: %d/%d crenderbq: 0x%x visbq: 0x%x\n", y, x, crender->s.blittedquads, cell_blittedquadrants(vis)); + if(!((~crender->s.blittedquads) & cell_blittedquadrants(vis))){ if(cell_bg_default_p(vis)){ vis = &p->basecell; } diff --git a/tests/stacking.cpp b/tests/stacking.cpp index b7be9030b1..6cb4cea924 100644 --- a/tests/stacking.cpp +++ b/tests/stacking.cpp @@ -154,11 +154,9 @@ TEST_CASE("Stacking") { .leny = 2, .lenx = 2, .blitter = NCBLIT_2x2, .flags = 0, }; CHECK(top == ncvisual_render(nc_, ncv, &vopts)); - /* -cell c = CELL_TRIVIAL_INITIALIZER; -ncplane_at_yx_cell(top, 0, 0, &c); -fprintf(stderr, "[[[%s]]] %016lx\n", cell_extended_gcluster(top, &c), c.channels); -*/ +//cell c = CELL_TRIVIAL_INITIALIZER; +//ncplane_at_yx_cell(top, 0, 0, &c); +//fprintf(stderr, "[[[%s]]] %016lx\n", cell_extended_gcluster(top, &c), c.channels); ncvisual_destroy(ncv); // create an ncvisual of 2 rows, 2 columns, with the tr, bl 0xffffff