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

This commit is contained in:
Sigrid Solveig Haflínudóttir 2021-12-26 07:09:12 +01:00
parent ba7e8a9fb4
commit 73177d91fe
2 changed files with 2 additions and 1 deletions

View File

@ -77,6 +77,7 @@ ppu_clear(Ppu *p, Layer *layer)
layer->changed = 1; layer->changed = 1;
} }
#pragma weak ppu_redraw
void void
ppu_redraw(Ppu *p, Uint32 *screen) ppu_redraw(Ppu *p, Uint32 *screen)
{ {

View File

@ -22,8 +22,8 @@ typedef struct Layer {
} Layer; } Layer;
typedef struct Ppu { typedef struct Ppu {
Uint16 width, height;
Uint32 palette[4]; Uint32 palette[4];
Uint16 width, height;
Layer fg, bg; Layer fg, bg;
} Ppu; } Ppu;