Closed dankamongmen closed 4 years ago
As for the background, it's definitely shifting from NCBLIT_2x1
to NCBLIT_1x1
(in effect if not in call). That suggests that I'm lacking some type of transparency in the playing area. But why only after a piece hits the bottom?
OHHHHHHHHHHHHHHHHHHH I bet this is ncplane_mergedown()
's fault, yes, that's gotta be it.
Likewise, I think the artifact on the top is excess of a gradient operation -- if I comment out the ncplane_mergedown()
, the entire playing area runs rampant with it.
This all makes sense if we're writing foreground-transparent spaces as we fall. (1) they would be stained, and (2) they would block the underlying glyph
OK, the weird color artifacts at the top arise from going tripartite wrt transparency during 1.6.0 development, that makes sense.
We wouldn't be staining if we weren't filling the board with spaces, and if we weren't filling the board with spaces, we wouldn't be blurring. Figuring that out will solve both problems.
and yes, locked ncplane_mergedown()
as to the source of the spaces.
in postpaint()
:
if(targc->gcluster == 0){
targc->gcluster = ' ';
}
that's what's fucking us fo' sho.
Yeah, comment out those two lines, and notcurses-tetris
is flawless. Let's see why they were necessary in the first place...
OK, I believe the change I just committed is safe, and it definitely remedies the background. The color artifacts still need be dealt with. Checking for nul and not coloring it in ncplane_stain()
remedies the problem, but I'm unsure that's the right approach. Need to test it further. If we decide against it, we can do a postpass scrubbing NULs....
OK, that seems sensible actually. All unit tests pass, and the demo seems unaffected. I think we're done here.
Not sure how new this first one is; I'm seeing it on tip of 1.6.0. It doesn't happen with every line we clear, but it's not difficult to reproduce, either.
The other weird issue has been there since the beginning--when the first piece touches the ground, the background transmogrifies, and not in a good way. If I had to guess, it's shifting from 2x1/2x2 to 1x1 for whatever reason. This is completely reproducible.