Browse code

ppu: mark ppu_redraw as weak symbol so it can be overridden; move paletter to the start of Ppu struct (for alignment)

Sigrid Solveig Haflínudóttir authored on 26/12/2021 06:09:12
Showing 2 changed files
... ...
@@ -77,6 +77,7 @@ ppu_clear(Ppu *p, Layer *layer)
77 77
 	layer->changed = 1;
78 78
 }
79 79
 
80
+#pragma weak ppu_redraw
80 81
 void
81 82
 ppu_redraw(Ppu *p, Uint32 *screen)
82 83
 {
... ...
@@ -22,8 +22,8 @@ typedef struct Layer {
22 22
 } Layer;
23 23
 
24 24
 typedef struct Ppu {
25
-	Uint16 width, height;
26 25
 	Uint32 palette[4];
26
+	Uint16 width, height;
27 27
 	Layer fg, bg;
28 28
 } Ppu;
29 29