summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/ksayakyu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/ksayakyu.cpp')
-rw-r--r--src/mame/video/ksayakyu.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mame/video/ksayakyu.cpp b/src/mame/video/ksayakyu.cpp
index d89b17ba725..dd070aa039d 100644
--- a/src/mame/video/ksayakyu.cpp
+++ b/src/mame/video/ksayakyu.cpp
@@ -32,16 +32,15 @@ WRITE8_MEMBER(ksayakyu_state::ksayakyu_videoctrl_w)
m_tilemap->set_flip((data & 2) ? TILEMAP_FLIPX : 0);
}
-PALETTE_INIT_MEMBER(ksayakyu_state, ksayakyu)
+void ksayakyu_state::ksayakyu_palette(palette_device &palette) const
{
- const uint8_t *prom = memregion("proms")->base();
- int r, g, b, i;
+ uint8_t const *const prom = memregion("proms")->base();
- for (i = 0; i < 0x100; i++)
+ for (int i = 0; i < 0x100; i++)
{
- r = (prom[i] & 0x07) >> 0;
- g = (prom[i] & 0x38) >> 3;
- b = (prom[i] & 0xc0) >> 6;
+ int const r = (prom[i] >> 0) & 0x07;
+ int const g = (prom[i] >> 3) & 0x07;
+ int const b = (prom[i] >> 6) & 0x03;
palette.set_pen_color(i, pal3bit(r), pal3bit(g), pal2bit(b));
}