summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/ssozumo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/ssozumo.cpp')
-rw-r--r--src/mame/video/ssozumo.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mame/video/ssozumo.cpp b/src/mame/video/ssozumo.cpp
index 6cb4f1ad14b..51f37bbd789 100644
--- a/src/mame/video/ssozumo.cpp
+++ b/src/mame/video/ssozumo.cpp
@@ -14,31 +14,33 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/10/04
/**************************************************************************/
-PALETTE_INIT_MEMBER(ssozumo_state, ssozumo)
+void ssozumo_state::ssozumo_palette(palette_device &palette) const
{
const uint8_t *color_prom = memregion("proms")->base();
- int bit0, bit1, bit2, bit3, r, g, b;
- int i;
- for (i = 0 ; i < 64 ; i++)
+ for (int i = 0 ; i < 64 ; i++)
{
- bit0 = (color_prom[0] >> 0) & 0x01;
- bit1 = (color_prom[0] >> 1) & 0x01;
- bit2 = (color_prom[0] >> 2) & 0x01;
- bit3 = (color_prom[0] >> 3) & 0x01;
- r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- bit0 = (color_prom[0] >> 4) & 0x01;
- bit1 = (color_prom[0] >> 5) & 0x01;
- bit2 = (color_prom[0] >> 6) & 0x01;
- bit3 = (color_prom[0] >> 7) & 0x01;
- g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- bit0 = (color_prom[64] >> 0) & 0x01;
- bit1 = (color_prom[64] >> 1) & 0x01;
- bit2 = (color_prom[64] >> 2) & 0x01;
- bit3 = (color_prom[64] >> 3) & 0x01;
- b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- palette.set_pen_color(i,rgb_t(r,g,b));
+ int bit0, bit1, bit2, bit3;
+
+ bit0 = BIT(color_prom[0], 0);
+ bit1 = BIT(color_prom[0], 1);
+ bit2 = BIT(color_prom[0], 2);
+ bit3 = BIT(color_prom[0], 3);
+ int const r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
+
+ bit0 = BIT(color_prom[0], 4);
+ bit1 = BIT(color_prom[0], 5);
+ bit2 = BIT(color_prom[0], 6);
+ bit3 = BIT(color_prom[0], 7);
+ int const g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
+
+ bit0 = BIT(color_prom[64], 0);
+ bit1 = BIT(color_prom[64], 1);
+ bit2 = BIT(color_prom[64], 2);
+ bit3 = BIT(color_prom[64], 3);
+ int const b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
+
+ palette.set_pen_color(i, rgb_t(r, g, b));
color_prom++;
}
}