Browse code

ppu: remove the last(?) remnants of single layer logic

Sigrid Solveig Haflínudóttir authored on 25/12/2021 14:12:30
Showing 2 changed files
... ...
@@ -48,8 +48,6 @@ ppu_palette(Ppu *p, Uint8 *addr)
48 48
 			b = (*(addr + 4 + i / 2) >> (!(i % 2) << 2)) & 0x0f;
49 49
 		p->palette[i] = 0xff000000 | (r << 20) | (r << 16) | (g << 12) | (g << 8) | (b << 4) | b;
50 50
 	}
51
-	for(i = 4; i < 16; ++i)
52
-		p->palette[i] = p->palette[i / 4];
53 51
 	p->fg.changed = p->bg.changed = 1;
54 52
 }
55 53
 
... ...
@@ -23,7 +23,7 @@ typedef struct Layer {
23 23
 
24 24
 typedef struct Ppu {
25 25
 	Uint16 width, height;
26
-	Uint32 palette[16];
26
+	Uint32 palette[4];
27 27
 	Layer fg, bg;
28 28
 } Ppu;
29 29