uxn

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

commit e8c70d954a055672770490efae5530763ec3f0f4
parent f74cfa89ebf7877b7000c63546ed87f83da7d22e
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Thu, 29 Apr 2021 23:05:38 +0100

Fixed orientation of chr sprites

Diffstat:
Msrc/emulator.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c @@ -227,10 +227,11 @@ screen_talk(Device *d, Uint8 b0, Uint8 w) Uint8 mode = d->dat[0xe] >> 5; if(!mode) putpixel(&ppu, layer, x, y, d->dat[0xe] & 0x3); - else if(mode % 2) - puticn(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, d->dat[0xe] >> 6 & 0x1, d->dat[0xe] >> 7 & 0x1); + else if(mode-- & 0x1) + puticn(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, mode & 0x2, mode & 0x4); else - putchr(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, d->dat[0xe] >> 6 & 0x1, d->dat[0xe] >> 7 & 0x1); + putchr(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, mode & 0x2, mode & 0x4); + reqdraw = 1; } }