From 73177d91feb40bce4e95d2f747ef55c8200164a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Sun, 26 Dec 2021 07:09:12 +0100 Subject: [PATCH] ppu: mark ppu_redraw as weak symbol so it can be overridden; move paletter to the start of Ppu struct (for alignment) --- src/devices/ppu.c | 1 + src/devices/ppu.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/devices/ppu.c b/src/devices/ppu.c index 9dae9d9..1697c8f 100644 --- a/src/devices/ppu.c +++ b/src/devices/ppu.c @@ -77,6 +77,7 @@ ppu_clear(Ppu *p, Layer *layer) layer->changed = 1; } +#pragma weak ppu_redraw void ppu_redraw(Ppu *p, Uint32 *screen) { diff --git a/src/devices/ppu.h b/src/devices/ppu.h index 39848f6..9e5f217 100644 --- a/src/devices/ppu.h +++ b/src/devices/ppu.h @@ -22,8 +22,8 @@ typedef struct Layer { } Layer; typedef struct Ppu { - Uint16 width, height; Uint32 palette[4]; + Uint16 width, height; Layer fg, bg; } Ppu;