summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/wiping.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/wiping.c')
-rw-r--r--src/mame/video/wiping.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mame/video/wiping.c b/src/mame/video/wiping.c
index 574828ede0b..dcfd4f35479 100644
--- a/src/mame/video/wiping.c
+++ b/src/mame/video/wiping.c
@@ -17,7 +17,7 @@
***************************************************************************/
-void wiping_state::palette_init()
+PALETTE_INIT_MEMBER(wiping_state, wiping)
{
const UINT8 *color_prom = memregion("proms")->base();
static const int resistances_rg[3] = { 1000, 470, 220 };
@@ -31,9 +31,6 @@ void wiping_state::palette_init()
3, &resistances_rg[0], gweights, 470, 0,
2, &resistances_b[0], bweights, 470, 0);
- /* allocate the colortable */
- machine().colortable = colortable_alloc(machine(), 0x20);
-
/* create a lookup table for the palette */
for (i = 0; i < 0x20; i++)
{
@@ -57,7 +54,7 @@ void wiping_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
+ palette.set_indirect_color(i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
@@ -67,14 +64,14 @@ void wiping_state::palette_init()
for (i = 0; i < 0x100; i++)
{
UINT8 ctabentry = color_prom[i ^ 0x03] & 0x0f;
- colortable_entry_set_value(machine().colortable, i, ctabentry);
+ palette.set_pen_indirect(i, ctabentry);
}
/* sprites use colors 16-31 */
for (i = 0x100; i < 0x200; i++)
{
UINT8 ctabentry = (color_prom[i ^ 0x03] & 0x0f) | 0x10;
- colortable_entry_set_value(machine().colortable, i, ctabentry);
+ palette.set_pen_indirect(i, ctabentry);
}
}
@@ -120,7 +117,7 @@ UINT32 wiping_state::screen_update_wiping(screen_device &screen, bitmap_ind16 &b
sy = 27 - sy;
}
- m_gfxdecode->gfx(0)->opaque(bitmap,cliprect,
+ m_gfxdecode->gfx(0)->opaque(m_palette,bitmap,cliprect,
m_videoram[offs],
m_colorram[offs] & 0x3f,
m_flipscreen,m_flipscreen,
@@ -148,12 +145,12 @@ UINT32 wiping_state::screen_update_wiping(screen_device &screen, bitmap_ind16 &b
flipy = !flipy;
}
- m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
+ m_gfxdecode->gfx(1)->transmask(m_palette,bitmap,cliprect,
(spriteram[offs] & 0x3f) + 64 * otherbank,
color,
flipx,flipy,
sx,sy,
- colortable_get_transpen_mask(machine().colortable, m_gfxdecode->gfx(1), color, 0x1f));
+ m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 0x1f));
}
/* redraw high priority chars */
@@ -188,7 +185,7 @@ UINT32 wiping_state::screen_update_wiping(screen_device &screen, bitmap_ind16 &b
sy = 27 - sy;
}
- m_gfxdecode->gfx(0)->opaque(bitmap,cliprect,
+ m_gfxdecode->gfx(0)->opaque(m_palette,bitmap,cliprect,
m_videoram[offs],
m_colorram[offs] & 0x3f,
m_flipscreen,m_flipscreen,