diff options
Diffstat (limited to 'src/mame/video/sidepckt.c')
-rw-r--r-- | src/mame/video/sidepckt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mame/video/sidepckt.c b/src/mame/video/sidepckt.c index 6e04448829a..2fb73b3e8fa 100644 --- a/src/mame/video/sidepckt.c +++ b/src/mame/video/sidepckt.c @@ -10,12 +10,12 @@ #include "includes/sidepckt.h" -void sidepckt_state::palette_init() +PALETTE_INIT_MEMBER(sidepckt_state, sidepckt) { const UINT8 *color_prom = memregion("proms")->base(); int i; - for (i = 0;i < machine().total_colors();i++) + for (i = 0;i < palette.entries();i++) { int bit0,bit1,bit2,bit3,r,g,b; @@ -32,13 +32,13 @@ void sidepckt_state::palette_init() bit3 = (color_prom[i] >> 3) & 0x01; g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; /* blue component */ - bit0 = (color_prom[i + machine().total_colors()] >> 0) & 0x01; - bit1 = (color_prom[i + machine().total_colors()] >> 1) & 0x01; - bit2 = (color_prom[i + machine().total_colors()] >> 2) & 0x01; - bit3 = (color_prom[i + machine().total_colors()] >> 3) & 0x01; + bit0 = (color_prom[i + palette.entries()] >> 0) & 0x01; + bit1 = (color_prom[i + palette.entries()] >> 1) & 0x01; + bit2 = (color_prom[i + palette.entries()] >> 2) & 0x01; + bit3 = (color_prom[i + palette.entries()] >> 3) & 0x01; b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - palette_set_color(machine(),i,rgb_t(r,g,b)); + palette.set_pen_color(i,rgb_t(r,g,b)); } } @@ -130,13 +130,13 @@ void sidepckt_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect flipx = spriteram[offs+1] & 0x08; flipy = spriteram[offs+1] & 0x04; - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, + m_gfxdecode->gfx(1)->transpen(m_palette,bitmap,cliprect, code, color, flipx,flipy, sx,sy,0); /* wraparound */ - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, + m_gfxdecode->gfx(1)->transpen(m_palette,bitmap,cliprect, code, color, flipx,flipy, |