NetDeck: freeze tint stamps a checkered 8x8 sprite pattern
- replace the nonexistent draw16bppSprite_P(NULL,...) call with pushImage(bx, by, 8, 8, checkered8x8): device = TFT_eSprite::pushImage (blits into the fb sprite), emulator = new shim TFT_eSPI::pushImage blit into the host framebuffer — same signature on both backends - shim: define PROGMEM (no-op on host/ESP32, flash is memory-mapped) - pattern data fixed into a real 2px checkerboard (black / 0x1F1F teal) - E2E pixel assertions updated to the checker geometry Verified: make netdeck (both targets) + full test suite, 0 failures
This commit is contained in:
+21
-2
@@ -1264,10 +1264,29 @@ static void renderCursor()
|
||||
}
|
||||
}
|
||||
|
||||
// 8x8 stamp for the tactical-freeze tint: 2px checkerboard of black and a
|
||||
// dark teal (the map stays readable underneath). RGB565 has no alpha, so a
|
||||
// dither is the way to "tint" — same trick the old scanlines used.
|
||||
static const uint16_t PROGMEM checkered8x8[64] = {
|
||||
0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F,
|
||||
0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F,
|
||||
0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000,
|
||||
0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F,
|
||||
0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F,
|
||||
0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000,
|
||||
0x1F1F, 0x1F1F, 0x0000, 0x0000, 0x1F1F, 0x1F1F, 0x0000, 0x0000,
|
||||
};
|
||||
|
||||
static void renderFreezeTint()
|
||||
{
|
||||
for (int y = 0; y < nd::VIEW_H; y += 3) {
|
||||
GFXP->drawFastHLine(0, y, nd::VIEW_W, 0x0000);
|
||||
// Stamp the checkered 8x8 pattern across the view. pushImage() exists on
|
||||
// BOTH backends: device = TFT_eSprite::pushImage (blits into the fb
|
||||
// sprite RAM), emulator = the shim blit into the host framebuffer.
|
||||
for (int by = 0; by < nd::VIEW_H; by += 8) {
|
||||
for (int bx = 0; bx < nd::VIEW_W; bx += 8) {
|
||||
GFXP->pushImage(bx, by, 8, 8, checkered8x8);
|
||||
}
|
||||
}
|
||||
GFXP->setTextDatum(TR_DATUM);
|
||||
GFXP->setTextColor(nd::C_FREEZE, 0x0000);
|
||||
|
||||
Reference in New Issue
Block a user