~rabbits/uxn-playdate

59d9d4fd2a8bbd6f6204e8e3397511ca2106ca73 — Devine Lu Linvega 13 days ago 8b91e6c
Removed extra draw in pixel
1 files changed, 2 insertions(+), 9 deletions(-)

M src/devices/ppu.c
M src/devices/ppu.c => src/devices/ppu.c +2 -9
@@ 47,18 47,11 @@ ppu_pixel(Ppu *p, uint8_t fg, uint16_t x, uint16_t y, uint8_t color)
{
	if(x >= WIDTH || y >= HEIGHT) return;
	int offset = y * STRIDE_WORDS + x / 32;
	uint32_t *px = &p->pixels[offset * 3 + fg];
	uint32_t mask = 1 << ((x & 0x18) + (7 - (x & 0x7)));
	if(color & 0x01)
		p->pixels[offset * 3 + fg] |= mask;
		p->pixels[offset * 3 + fg * 2] |= mask;
	else
		p->pixels[offset * 3 + fg] &= ~mask;
	if(fg) {
		if(color)
			p->pixels[offset * 3 + 2] |= mask;
		else
			p->pixels[offset * 3 + 2] &= ~mask;
	}
		p->pixels[offset * 3 + fg * 2] &= ~mask;
	render(p, offset, 1);
}