From 9873680f9d24e30afc1962987fac2c3ad1612f7b Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Wed, 19 May 2021 12:13:29 +0200 Subject: Update screen rendering to use 2 backgrounds --- src/uxn/devices/ppu.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/uxn/devices/ppu.h') diff --git a/src/uxn/devices/ppu.h b/src/uxn/devices/ppu.h index 187d364..213dc75 100644 --- a/src/uxn/devices/ppu.h +++ b/src/uxn/devices/ppu.h @@ -7,6 +7,7 @@ /* Copyright (c) 2021 Devine Lu Linvega Copyright (c) 2021 Andrew Alderwick +Copyright (c) 2021 Bad Diode Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -21,16 +22,15 @@ typedef unsigned short Uint16; typedef unsigned int Uint32; typedef struct Ppu { - Uint8 *bg, *fg; + Uint32 *bg, *fg; Uint16 hor, ver, pad, width, height; - Uint16 *output, colors[4]; } Ppu; int initppu(Ppu *p, Uint8 hor, Uint8 ver, Uint8 pad); void putcolors(Ppu *p, Uint8 *addr); -void putpixel(Ppu *p, Uint8 *layer, Uint16 x, Uint16 y, Uint8 color); -void puticn(Ppu *p, Uint8 *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy); -void putchr(Ppu *p, Uint8 *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy); +void putpixel(Ppu *p, Uint32 *layer, Uint16 x, Uint16 y, Uint8 color); +void puticn(Ppu *p, Uint32 *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy); +void putchr(Ppu *p, Uint32 *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy); void drawppu(Ppu *p); void drawdebugger(Ppu *p, Uint8 *stack, Uint8 ptr); #endif // UXNGBA_PPU_H -- cgit v1.2.1