Improved blending for chr parsing
This commit is contained in:
parent
c1c0f8f2bc
commit
98c32fd95c
2
build.sh
2
build.sh
|
@ -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' ];
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue