From eaeac3f65f5ac8813f69f26c61c49f9f8503e889 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 24 Nov 2024 15:05:19 +0100 Subject: misc: improve scaling of 2-bit blue for commonly copy pasted color decoder --- src/mame/aristocrat/aristmk4.cpp | 8 ++++---- src/mame/cvs/quasar.cpp | 2 +- src/mame/galaxian/galaxian_rockclim.cpp | 2 +- src/mame/galaxian/galaxold_v.cpp | 8 ++++---- src/mame/irem/m63.cpp | 2 +- src/mame/misc/mirax.cpp | 2 +- src/mame/misc/xyonix.cpp | 2 +- src/mame/nasco/crgolf.cpp | 2 +- src/mame/nichibutsu/seicross.cpp | 2 +- src/mame/snk/lasso_v.cpp | 2 +- src/mame/snk/munchmo.cpp | 2 +- src/mame/taito/jollyjgr.cpp | 2 +- src/mame/upl/mouser.cpp | 2 +- src/mame/venture/suprridr.cpp | 2 +- src/mame/wing/superwng.cpp | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/mame/aristocrat/aristmk4.cpp b/src/mame/aristocrat/aristmk4.cpp index 47fc6a7ed38..86b0e9ffce5 100644 --- a/src/mame/aristocrat/aristmk4.cpp +++ b/src/mame/aristocrat/aristmk4.cpp @@ -1735,7 +1735,7 @@ void aristmk4_state::aristmk4_palette(palette_device &palette) const for (int i = 0; i < palette.entries(); i++) { const uint8_t data = color_prom[i]; - const int b = 0x4f * BIT(data, 0) + 0xa8 * BIT(data, 1); + const int b = 0x52 * BIT(data, 0) + 0xad * BIT(data, 1); const int g = 0x21 * BIT(data, 2) + 0x47 * BIT(data, 3) + 0x97 * BIT(data, 4); const int r = 0x21 * BIT(data, 5) + 0x47 * BIT(data, 6) + 0x97 * BIT(data, 7); @@ -1884,9 +1884,9 @@ void aristmk4_state::lions_palette(palette_device &palette) const { for (int i = 0; i < palette.entries(); i++) { - const int b = 0x4f * BIT(i, 0) + 0xa8 * BIT(i, 1); - const int g = 0x4f * BIT(i, 2) + 0xa8 * BIT(i, 3); - const int r = 0x4f * BIT(i, 4) + 0xa8 * BIT(i, 5); + const int b = 0x52 * BIT(i, 0) + 0xad * BIT(i, 1); + const int g = 0x52 * BIT(i, 2) + 0xad * BIT(i, 3); + const int r = 0x52 * BIT(i, 4) + 0xad * BIT(i, 5); palette.set_pen_color(i, rgb_t(r, g, b)); } diff --git a/src/mame/cvs/quasar.cpp b/src/mame/cvs/quasar.cpp index 0e7992aa138..7411216f8eb 100644 --- a/src/mame/cvs/quasar.cpp +++ b/src/mame/cvs/quasar.cpp @@ -129,7 +129,7 @@ void quasar_state::palette(palette_device &palette) const // blue component bit0 = BIT(i, 6); bit1 = BIT(i, 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; // intensity 0 palette.set_indirect_color(0x100 + i, rgb_t::black()); diff --git a/src/mame/galaxian/galaxian_rockclim.cpp b/src/mame/galaxian/galaxian_rockclim.cpp index a42f931b939..8bd6a81efd1 100644 --- a/src/mame/galaxian/galaxian_rockclim.cpp +++ b/src/mame/galaxian/galaxian_rockclim.cpp @@ -238,7 +238,7 @@ void galaxian_rockclim_state::rockclim_palette(palette_device &palette) const // blue component bit0 = BIT(*color_prom, 6); bit1 = BIT(*color_prom, 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, r, g, b); color_prom++; diff --git a/src/mame/galaxian/galaxold_v.cpp b/src/mame/galaxian/galaxold_v.cpp index 07c83b0f923..42b6e63cd2e 100644 --- a/src/mame/galaxian/galaxold_v.cpp +++ b/src/mame/galaxian/galaxold_v.cpp @@ -68,7 +68,7 @@ void galaxold_state::galaxold_palette(palette_device &palette) // blue component bit0 = BIT(*color_prom, 6); bit1 = BIT(*color_prom, 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, r, g, b); color_prom++; @@ -134,7 +134,7 @@ void galaxold_state::s2650_palette(palette_device &palette) const // blue component bit0 = BIT(*color_prom, 6); bit1 = BIT(*color_prom, 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, r, g, b); color_prom++; @@ -281,7 +281,7 @@ void galaxold_state::dambustr_palette(palette_device &palette) // blue component bit0 = BIT(*color_prom, 6); bit1 = BIT(*color_prom, 7); - int const g = 0x4f * bit0 + 0xa8 * bit1; + int const g = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, r, g, b); color_prom++; @@ -305,7 +305,7 @@ void galaxold_state::dambustr_palette(palette_device &palette) { int const r = BIT(i, 0) * 0x47; int const g = BIT(i, 1) * 0x47; - int const b = BIT(i, 2) * 0x4f; + int const b = BIT(i, 2) * 0x47; palette.set_pen_color(BACKGROUND_COLOR_BASE + i, r, g, b); } } diff --git a/src/mame/irem/m63.cpp b/src/mame/irem/m63.cpp index 7ad5982bd25..c2e2802fdbe 100644 --- a/src/mame/irem/m63.cpp +++ b/src/mame/irem/m63.cpp @@ -277,7 +277,7 @@ void m63_state::m63_palette(palette_device &palette) const // blue component bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i + 256, rgb_t(r, g, b)); } diff --git a/src/mame/misc/mirax.cpp b/src/mame/misc/mirax.cpp index 2ee824ab706..e44d4548c52 100644 --- a/src/mame/misc/mirax.cpp +++ b/src/mame/misc/mirax.cpp @@ -221,7 +221,7 @@ void mirax_state::mirax_palette(palette_device &palette) const // blue component bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } diff --git a/src/mame/misc/xyonix.cpp b/src/mame/misc/xyonix.cpp index 552fe63fbc4..b5729d3174e 100644 --- a/src/mame/misc/xyonix.cpp +++ b/src/mame/misc/xyonix.cpp @@ -158,7 +158,7 @@ void xyonix_state::palette(palette_device &palette) const // blue component bit0 = BIT(color_prom[i], 3); bit1 = BIT(color_prom[i], 4); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } diff --git a/src/mame/nasco/crgolf.cpp b/src/mame/nasco/crgolf.cpp index e6c335d7616..09c6e1e2698 100644 --- a/src/mame/nasco/crgolf.cpp +++ b/src/mame/nasco/crgolf.cpp @@ -247,7 +247,7 @@ void crgolf_state::palette(palette_device &palette) const // blue component bit0 = BIT(data, 6); bit1 = BIT(data, 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; m_palette->set_pen_color(offs, r, g, b); } diff --git a/src/mame/nichibutsu/seicross.cpp b/src/mame/nichibutsu/seicross.cpp index a768c1789fc..92a43531c93 100644 --- a/src/mame/nichibutsu/seicross.cpp +++ b/src/mame/nichibutsu/seicross.cpp @@ -225,7 +225,7 @@ void seicross_state::palette(palette_device &palette) const // blue component bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } diff --git a/src/mame/snk/lasso_v.cpp b/src/mame/snk/lasso_v.cpp index 14f5159be99..834a2d852f7 100644 --- a/src/mame/snk/lasso_v.cpp +++ b/src/mame/snk/lasso_v.cpp @@ -59,7 +59,7 @@ rgb_t lasso_state::get_color(int data) // blue component bit0 = BIT(data, 6); bit1 = BIT(data, 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; return rgb_t(r, g, b); } diff --git a/src/mame/snk/munchmo.cpp b/src/mame/snk/munchmo.cpp index d43a6a66b84..3f1830e14e3 100644 --- a/src/mame/snk/munchmo.cpp +++ b/src/mame/snk/munchmo.cpp @@ -142,7 +142,7 @@ void munchmo_state::palette(palette_device &palette) const // blue component bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } diff --git a/src/mame/taito/jollyjgr.cpp b/src/mame/taito/jollyjgr.cpp index 012a1c87760..8958607f886 100644 --- a/src/mame/taito/jollyjgr.cpp +++ b/src/mame/taito/jollyjgr.cpp @@ -476,7 +476,7 @@ void jollyjgr_state::jollyjgr_palette(palette_device &palette) const // blue component bit0 = BIT(*color_prom, 6); bit1 = BIT(*color_prom, 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r,g,b)); color_prom++; diff --git a/src/mame/upl/mouser.cpp b/src/mame/upl/mouser.cpp index 0ab11da4cb8..a67425da0a8 100644 --- a/src/mame/upl/mouser.cpp +++ b/src/mame/upl/mouser.cpp @@ -119,7 +119,7 @@ void mouser_state::palette(palette_device &palette) const // blue component bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } diff --git a/src/mame/venture/suprridr.cpp b/src/mame/venture/suprridr.cpp index 1bb12b10e4e..254b82a34d8 100644 --- a/src/mame/venture/suprridr.cpp +++ b/src/mame/venture/suprridr.cpp @@ -238,7 +238,7 @@ void suprridr_state::palette(palette_device &palette) const // blue component bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } diff --git a/src/mame/wing/superwng.cpp b/src/mame/wing/superwng.cpp index 08e0e7caf3f..fe93c5b9f2f 100644 --- a/src/mame/wing/superwng.cpp +++ b/src/mame/wing/superwng.cpp @@ -223,7 +223,7 @@ void superwng_state::palette(palette_device &palette) const bit0 = BIT(colors[i], 6); bit1 = BIT(colors[i], 7); - int const b = 0x4f * bit0 + 0xa8 * bit1; + int const b = 0x52 * bit0 + 0xad * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } -- cgit v1.2.3