]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Added third dark palette fix formula.
authorToni Wilen <twilen@winuae.net>
Wed, 10 Feb 2016 16:28:37 +0000 (18:28 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 10 Feb 2016 16:28:37 +0000 (18:28 +0200)
cfgfile.cpp
gfxutil.cpp

index 678dafc3a4dd100d6d1af04f10ff805e8da24836..0fbe3e2231daddf3f7c2adc57a23c3c85de4091f 100644 (file)
@@ -287,6 +287,7 @@ static const TCHAR *serialcrlf[] = {
 };
 static const TCHAR *threebitcolors[] = {
        _T("disabled"),
+       _T("3to4to8bit"),
        _T("3to4bit"),
        _T("3to8bit"),
        NULL
index f2b861349fbc838a45140468e08890bd96dd2d74..936c349b7a55d1fbd8836770710805b28d0c5495 100644 (file)
@@ -150,13 +150,15 @@ static void video_calc_gammatable (void)
 
        for (int i = 0; i < (256 * 3); i++) {
                for (int j = 0; j < 3; j++) {
-                       int val = i - 256;
+                       float val = i - 256;
                        float v;
 
-                       if (currprefs.gfx_threebitcolors == 1) {
+                       if (currprefs.gfx_threebitcolors == 2) {
                                val *= 2;
-                       } else if (currprefs.gfx_threebitcolors == 2) {
-                               val = (val + (val & 7)) * 2;
+                       } else if (currprefs.gfx_threebitcolors == 3) {
+                               val = (val * 252.0) / 119.0;
+                       } else if (currprefs.gfx_threebitcolors == 1) {
+                               val = (val * 252.0) / 238.0;
                        }
 
                        if (currprefs.gfx_luminance == 0 && currprefs.gfx_contrast == 0 && currprefs.gfx_gamma == 0) {