summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/shaolins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/shaolins.c')
-rw-r--r--src/mame/video/shaolins.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mame/video/shaolins.c b/src/mame/video/shaolins.c
index 23bc097235c..a162fff3918 100644
--- a/src/mame/video/shaolins.c
+++ b/src/mame/video/shaolins.c
@@ -26,7 +26,7 @@
bit 0 -- 2.2kohm resistor -- RED/GREEN/BLUE
***************************************************************************/
-void shaolins_state::palette_init()
+PALETTE_INIT_MEMBER(shaolins_state, shaolins)
{
const UINT8 *color_prom = memregion("proms")->base();
static const int resistances[4] = { 2200, 1000, 470, 220 };
@@ -39,9 +39,6 @@ void shaolins_state::palette_init()
4, resistances, gweights, 470, 0,
4, resistances, bweights, 470, 0);
- /* allocate the colortable */
- machine().colortable = colortable_alloc(machine(), 0x100);
-
/* create a lookup table for the palette */
for (i = 0; i < 0x100; i++)
{
@@ -69,7 +66,7 @@ void shaolins_state::palette_init()
bit3 = (color_prom[i + 0x200] >> 3) & 0x01;
b = combine_4_weights(bweights, bit0, bit1, bit2, bit3);
- 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,*/
@@ -84,7 +81,7 @@ void shaolins_state::palette_init()
for (j = 0; j < 8; j++)
{
UINT8 ctabentry = (j << 5) | ((~i & 0x100) >> 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);
}
}
}
@@ -171,11 +168,11 @@ void shaolins_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
flipy = !flipy;
}
- m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
+ 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_palettebank << 5));
+ m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, m_palettebank << 5));
}
}
}