Browse code

Improved blending for chr parsing

neauoire authored on 10/04/2021 19:25:37
Showing 2 changed files
... ...
@@ -32,7 +32,7 @@ else
32 32
 fi
33 33
 
34 34
 echo "Assembling.."
35
-./bin/assembler projects/examples/gui.mouse.usm bin/boot.rom
35
+./bin/assembler projects/examples/dev.screen.usm bin/boot.rom
36 36
 
37 37
 echo "Running.."
38 38
 if [ "${2}" = '--cli' ]; 
... ...
@@ -130,7 +130,7 @@ putchr(Ppu *p, Uint8 *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color)
130 130
 		for(h = 0; h < 8; h++) {
131 131
 			Uint8 ch1 = ((sprite[v] >> (7 - h)) & 0x1) * color;
132 132
 			Uint8 ch2 = ((sprite[v + 8] >> (7 - h)) & 0x1) * color;
133
-			putpixel(p, layer, x + h, y + v, (((ch1 + ch2 * 2) + color - 1) & 0x3));
133
+			putpixel(p, layer, x + h, y + v, (((ch1 + ch2 * 2) + color / 4) & 0x3));
134 134
 		}
135 135
 }
136 136