Improved blending for chr parsing

This commit is contained in:
neauoire 2021-04-10 12:25:37 -07:00
parent c1c0f8f2bc
commit 98c32fd95c
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ else
fi
echo "Assembling.."
./bin/assembler projects/examples/gui.mouse.usm bin/boot.rom
./bin/assembler projects/examples/dev.screen.usm bin/boot.rom
echo "Running.."
if [ "${2}" = '--cli' ];

View File

@ -130,7 +130,7 @@ putchr(Ppu *p, Uint8 *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color)
for(h = 0; h < 8; h++) {
Uint8 ch1 = ((sprite[v] >> (7 - h)) & 0x1) * color;
Uint8 ch2 = ((sprite[v + 8] >> (7 - h)) & 0x1) * color;
putpixel(p, layer, x + h, y + v, (((ch1 + ch2 * 2) + color - 1) & 0x3));
putpixel(p, layer, x + h, y + v, (((ch1 + ch2 * 2) + color / 4) & 0x3));
}
}