From ddc39b6acc4ffea677826e6dcb401be96552698d Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Mon, 9 Sep 2024 21:28:50 -0700 Subject: vcr: clear shadow layer for entire row This should have been changed when transitioning to nibbles and the separators became generated @ present time when serializing to png. The first pass clears the shadow layer while assigning the first offset part of the shadow. But it was staying within the separators, which is now resulting in small bits of littered shadow corruption in the separators barely visible in the PNGs. Fix is trivial; initialize the separator bits when shadowing the row as well. --- src/vcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vcr.c b/src/vcr.c index 60f9522..1a47ae0 100644 --- a/src/vcr.c +++ b/src/vcr.c @@ -1488,7 +1488,7 @@ void vcr_shadow_row(vcr_t *vcr, vcr_layer_t layer, int row) /* TODO: optimize this abomination, maybe switch to shadowing the text @ serialization to png time for the mem->png headless scenario? */ /* first pass has to clean up the shadow plane while doing one offset of shadow bits */ - for (int i = 1; i < VCR_ROW_HEIGHT - 1; i++) { + for (int i = 0; i < VCR_ROW_HEIGHT; i++) { uint8_t *s = &vcr->mem.bits[(row * VCR_ROW_HEIGHT + i) * vcr->mem.pitch]; uint8_t *d = &vcr->mem.bits[(row * VCR_ROW_HEIGHT + i) * vcr->mem.pitch + 1]; -- cgit v1.2.3