all repos — mgba @ 818ce96d0dd8be7f0e5c476f8667d5890230f7af

mGBA Game Boy Advance Emulator

Fix mixing colors on 16-bit
Jeffrey Pfau jeffrey@endrift.com
Tue, 05 Nov 2013 04:13:49 -0800
commit

818ce96d0dd8be7f0e5c476f8667d5890230f7af

parent

9253eeba2317fe5d9e8ee30d78e020572d4899e5

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -1484,14 +1484,14 @@ a = colorA & 0x3E0;

b = colorB & 0x3E0; c |= ((a * weightA + b * weightB) / 16) & 0x7E0; if (c & 0x0400) { - c |= 0x03E0; + c = (c & 0x001F) | 0x03E0; } a = colorA & 0x7C00; b = colorB & 0x7C00; c |= ((a * weightA + b * weightB) / 16) & 0xFC00; if (c & 0x8000) { - c |= 0x7C00; + c = (c &0x03FF) | 0x7C00; } #else a = colorA & 0xF8;