From 5f534518aab90a0b20c642dbe36397044985505a Mon Sep 17 00:00:00 2001 From: brandman211 Date: Fri, 18 May 2012 19:47:43 +0000 Subject: [PATCH] Colors were still wrong. I just used a switch statement to fix them. Not elegant, but I can't see a simple pattern. --- BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs b/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs index f0d8289f72..02b0921584 100644 --- a/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs +++ b/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs @@ -734,8 +734,19 @@ namespace BizHawk.Emulation.Consoles.Gameboy RenderOBJLine(y, linebuf, true); for (int x = 0; x < 160; x++) { - int gray = (3 - linebuf[x]) << 6; - gray |= (gray << 8) | (gray << 16); + int gray = 0x000000; + switch (linebuf[x]) + { + case 0: + gray = 0xFFFFFF; + break; + case 1: + gray = 0xC0C0C0; + break; + case 2: + gray = 0x606060; + break; + } buf[i++] = unchecked(gray | (int)0xFF000000); } }