summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/m57.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/m57.c')
-rw-r--r--src/mame/video/m57.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mame/video/m57.c b/src/mame/video/m57.c
index 979f366c46e..58ef05017da 100644
--- a/src/mame/video/m57.c
+++ b/src/mame/video/m57.c
@@ -30,13 +30,11 @@
***************************************************************************/
-void m57_state::palette_init()
+PALETTE_INIT_MEMBER(m57_state, m57)
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
- machine().colortable = colortable_alloc(machine(), 32 * 8 + 16);
-
/* character palette */
for (i = 0; i < 256; i++)
{
@@ -58,8 +56,8 @@ void m57_state::palette_init()
bit2 = (color_prom[0] >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, rgb_t(r,g,b));
- colortable_entry_set_value(machine().colortable, i, i);
+ palette.set_indirect_color(i, rgb_t(r,g,b));
+ palette.set_pen_indirect(i, i);
color_prom++;
}
@@ -87,7 +85,7 @@ void m57_state::palette_init()
bit2 = (*color_prom >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i + 256, rgb_t(r,g,b));
+ palette.set_indirect_color(i + 256, rgb_t(r,g,b));
color_prom++;
}
@@ -98,7 +96,7 @@ void m57_state::palette_init()
/* sprite lookup table */
for (i = 0; i < 32 * 8; i++)
{
- colortable_entry_set_value(machine().colortable, i + 32 * 8, 256 + (~*color_prom & 0x0f));
+ palette.set_pen_indirect(i + 32 * 8, 256 + (~*color_prom & 0x0f));
color_prom++;
}
}
@@ -241,12 +239,12 @@ void m57_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
flipy = !flipy;
}
- m_gfxdecode->gfx(1 + bank)->transmask(bitmap,cliprect,
+ m_gfxdecode->gfx(1 + bank)->transmask(m_palette,bitmap,cliprect,
tile_number,
color,
flipx, flipy,
sx, sy,
- colortable_get_transpen_mask(machine().colortable, m_gfxdecode->gfx(1), color, 256 + 15));
+ m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 256 + 15));
}
}