From ae3bb940361f11ad336d8824559f1f6653b9cf57 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Sun, 8 Jan 2023 01:36:58 -0600 Subject: [PATCH] fix(ppu): draw file select sprites in amazing mirror --- src/core/ppu.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/ppu.zig b/src/core/ppu.zig index 3bca741..fc88cfe 100644 --- a/src/core/ppu.zig +++ b/src/core/ppu.zig @@ -843,7 +843,12 @@ pub const Ppu = struct { const is_top_layer = (top_layer >> layer) & 1 == 1; if (is_top_layer) { - self.scanline.btm()[i] = Scanline.Pixel.from(.Background, bgr555); // this is intentional + const pixel = self.scanline.btm()[i]; + + // FIXME: Can't I do this check ealier? Test Amazing Mirror File Select, bld_demo.gba + if (!pixel.isSet()) + self.scanline.btm()[i] = Scanline.Pixel.from(.Background, bgr555); // this is intentional + return; } },