diff options
Diffstat (limited to 'src/mame/video/rocnrope.c')
-rw-r--r-- | src/mame/video/rocnrope.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mame/video/rocnrope.c b/src/mame/video/rocnrope.c index 14040c01020..780908d10e2 100644 --- a/src/mame/video/rocnrope.c +++ b/src/mame/video/rocnrope.c @@ -29,7 +29,7 @@ ***************************************************************************/ -void rocnrope_state::palette_init() +PALETTE_INIT_MEMBER(rocnrope_state, rocnrope) { const UINT8 *color_prom = memregion("proms")->base(); static const int resistances_rg[3] = { 1000, 470, 220 }; @@ -43,9 +43,6 @@ void rocnrope_state::palette_init() 3, &resistances_rg[0], gweights, 1000, 0, 2, &resistances_b[0], bweights, 1000, 0); - /* allocate the colortable */ - machine().colortable = colortable_alloc(machine(), 0x20); - /* create a lookup table for the palette */ for (i = 0; i < 0x20; i++) { @@ -69,7 +66,7 @@ void rocnrope_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 */ @@ -79,7 +76,7 @@ void rocnrope_state::palette_init() for (i = 0; i < 0x200; i++) { UINT8 ctabentry = color_prom[i] & 0x0f; - colortable_entry_set_value(machine().colortable, i, ctabentry); + palette.set_pen_indirect(i, ctabentry); } } @@ -129,12 +126,12 @@ void rocnrope_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec { int color = spriteram_2[offs] & 0x0f; - m_gfxdecode->gfx(0)->transmask(bitmap,cliprect, + m_gfxdecode->gfx(0)->transmask(m_palette,bitmap,cliprect, spriteram[offs + 1], color, spriteram_2[offs] & 0x40,~spriteram_2[offs] & 0x80, 240 - spriteram[offs], spriteram_2[offs + 1], - colortable_get_transpen_mask(machine().colortable, m_gfxdecode->gfx(0), color, 0)); + m_palette->transpen_mask(*m_gfxdecode->gfx(0), color, 0)); } } |