From: John Tsiombikas Date: Mon, 17 Oct 2022 17:55:25 +0000 (+0300) Subject: fixed incorrect color in pc palette emulation X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=gbajam22;a=commitdiff_plain;h=dd3064e651cf180e0e02919d644bb0bd86c4e763 fixed incorrect color in pc palette emulation --- diff --git a/src/pc/main.c b/src/pc/main.c index cf6ffec..5f54f35 100644 --- a/src/pc/main.c +++ b/src/pc/main.c @@ -130,9 +130,9 @@ uint16_t get_input(void) #define PACK_RGB32(r, g, b) \ ((((r) & 0xff) << 16) | (((g) & 0xff) << 8) | ((b) & 0xff) | 0xff000000) -#define UNPACK_R16(c) (((c) >> 9) & 0xf8) -#define UNPACK_G16(c) (((c) >> 3) & 0xf8) -#define UNPACK_B16(c) (((c) << 3) & 0xf8) +#define UNPACK_R16(c) (((c) << 3) & 0xf8) +#define UNPACK_G16(c) (((c) >> 2) & 0xf8) +#define UNPACK_B16(c) (((c) >> 7) & 0xf8) void present(int buf) {