uxn

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

commit a8df7ca410d7cba4702bda9c29be2421d5dab918
parent c0e42f132291542d8c275efea5fc09ede4f83ee9
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Mon, 20 Sep 2021 23:02:42 +0100

Fixed palette array

Diffstat:
Msrc/uxnemu.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -36,7 +36,7 @@ static SDL_Rect gRect; static Ppu ppu; static Apu apu[POLYPHONY]; static Device *devsystem, *devscreen, *devmouse, *devctrl, *devaudio0, *devconsole; -static Uint32 *ppu_screen, stdin_event, audio0_event, palette[4]; +static Uint32 *ppu_screen, stdin_event, audio0_event, palette[16]; static Uint8 zoom = 1; static unsigned int reqdraw = 0; @@ -300,6 +300,8 @@ update_palette(Uint8 *addr) b = (*(addr + 4 + i / 2) >> (!(i % 2) << 2)) & 0x0f; palette[i] = 0xff000000 | (r << 20) | (r << 16) | (g << 12) | (g << 8) | (b << 4) | b; } + for(i = 4; i < 16; ++i) + palette[i] = palette[i / 4]; reqdraw = 1; }