From 961f998423ad530efb861f0ad14b378557549cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Sun, 16 Jan 2022 13:36:13 +0000 Subject: [PATCH] Treat BG colour as transparent --- switcher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/switcher.c b/switcher.c index 51bb399..40a2fba 100644 --- a/switcher.c +++ b/switcher.c @@ -360,7 +360,8 @@ static void draw_tile(enum palette tile[], size_t x, size_t y) { for (size_t ty = 0; ty < TILE_SIDE; ty++) { for (size_t tx = 0; tx < TILE_SIDE; tx++) { enum palette pixel = tile[ty * TILE_SIDE + tx]; - playfield[(y + ty) * PLAYFIELD_SIDE + x + tx] = pixel; + if (pixel != BG) + playfield[(y + ty) * PLAYFIELD_SIDE + x + tx] = pixel; } } }