From c2829ce5fe2a802f0ebd59cbecddf904e3e9fed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Sat, 25 Dec 2021 15:12:30 +0100 Subject: [PATCH] ppu: remove the last(?) remnants of single layer logic --- src/devices/ppu.c | 2 -- src/devices/ppu.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/devices/ppu.c b/src/devices/ppu.c index d3ab8be..9576ca6 100644 --- a/src/devices/ppu.c +++ b/src/devices/ppu.c @@ -48,8 +48,6 @@ ppu_palette(Ppu *p, Uint8 *addr) b = (*(addr + 4 + i / 2) >> (!(i % 2) << 2)) & 0x0f; p->palette[i] = 0xff000000 | (r << 20) | (r << 16) | (g << 12) | (g << 8) | (b << 4) | b; } - for(i = 4; i < 16; ++i) - p->palette[i] = p->palette[i / 4]; p->fg.changed = p->bg.changed = 1; } diff --git a/src/devices/ppu.h b/src/devices/ppu.h index 138001b..39848f6 100644 --- a/src/devices/ppu.h +++ b/src/devices/ppu.h @@ -23,7 +23,7 @@ typedef struct Layer { typedef struct Ppu { Uint16 width, height; - Uint32 palette[16]; + Uint32 palette[4]; Layer fg, bg; } Ppu;