summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/scotrsht.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/scotrsht.c')
-rw-r--r--src/mame/video/scotrsht.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mame/video/scotrsht.c b/src/mame/video/scotrsht.c
index 0ec1477d6be..bdf57b49c84 100644
--- a/src/mame/video/scotrsht.c
+++ b/src/mame/video/scotrsht.c
@@ -3,14 +3,11 @@
/* Similar as Iron Horse */
-void scotrsht_state::palette_init()
+PALETTE_INIT_MEMBER(scotrsht_state, scotrsht)
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
- /* allocate the colortable */
- machine().colortable = colortable_alloc(machine(), 0x100);
-
/* create a lookup table for the palette */
for (i = 0; i < 0x100; i++)
{
@@ -18,7 +15,7 @@ void scotrsht_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- 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 */
@@ -32,7 +29,7 @@ void scotrsht_state::palette_init()
for (j = 0; j < 8; j++)
{
UINT8 ctabentry = ((~i & 0x100) >> 1) | (j << 4) | (color_prom[i] & 0x0f);
- colortable_entry_set_value(machine().colortable, ((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry);
+ palette.set_pen_indirect(((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry);
}
}
}
@@ -114,9 +111,9 @@ void scotrsht_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
flipy = !flipy;
}
- m_gfxdecode->gfx(1)->transmask(bitmap,cliprect, code, color, flipx, flipy,
+ m_gfxdecode->gfx(1)->transmask(m_palette,bitmap,cliprect, code, color, flipx, flipy,
sx, sy,
- colortable_get_transpen_mask(machine().colortable, m_gfxdecode->gfx(1), color, m_palette_bank * 16));
+ m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, m_palette_bank * 16));
}
}