uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 98c32fd95c405e31e3fca697f9c82356b9433c64
parent c1c0f8f2bc629fe197ad2ad7e78516d9e90f47d9
Author: neauoire <aliceffekt@gmail.com>
Date:   Sat, 10 Apr 2021 12:25:37 -0700

Improved blending for chr parsing

Diffstat:
Mbuild.sh | 2+-
Msrc/ppu.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.sh b/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' ]; diff --git a/src/ppu.c b/src/ppu.c @@ -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)); } }