diff options
Diffstat (limited to 'src/mame/video/gsword.c')
-rw-r--r-- | src/mame/video/gsword.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/mame/video/gsword.c b/src/mame/video/gsword.c index ffd17a4df94..d0616b35b61 100644 --- a/src/mame/video/gsword.c +++ b/src/mame/video/gsword.c @@ -14,9 +14,6 @@ PALETTE_INIT_MEMBER(gsword_state,josvolly) 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++) { @@ -24,7 +21,7 @@ PALETTE_INIT_MEMBER(gsword_state,josvolly) 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,13 +29,13 @@ PALETTE_INIT_MEMBER(gsword_state,josvolly) /* characters */ for (i = 0; i < 0x100; i++) - colortable_entry_set_value(machine().colortable, i, i); + palette.set_pen_indirect(i, i); /* sprites */ for (i = 0x100; i < 0x200; i++) { UINT8 ctabentry = (BITSWAP8(color_prom[i - 0x100],7,6,5,4,0,1,2,3) & 0x0f) | 0x80; - colortable_entry_set_value(machine().colortable, i, ctabentry); + palette.set_pen_indirect(i, ctabentry); } } @@ -48,9 +45,6 @@ PALETTE_INIT_MEMBER(gsword_state,gsword) 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++) { @@ -75,7 +69,7 @@ PALETTE_INIT_MEMBER(gsword_state,gsword) bit2 = (color_prom[i + 0x000] >> 3) & 1; b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; - 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 */ @@ -83,13 +77,13 @@ PALETTE_INIT_MEMBER(gsword_state,gsword) /* characters */ for (i = 0; i < 0x100; i++) - colortable_entry_set_value(machine().colortable, i, i); + palette.set_pen_indirect(i, i); /* sprites */ for (i = 0x100; i < 0x200; i++) { UINT8 ctabentry = (BITSWAP8(color_prom[i - 0x100],7,6,5,4,0,1,2,3) & 0x0f) | 0x80; - colortable_entry_set_value(machine().colortable, i, ctabentry); + palette.set_pen_indirect(i, ctabentry); } } @@ -191,12 +185,12 @@ void gsword_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) flipx = !flipx; flipy = !flipy; } - m_gfxdecode->gfx(1+spritebank)->transmask(bitmap,cliprect, + m_gfxdecode->gfx(1+spritebank)->transmask(m_palette,bitmap,cliprect, tile, color, flipx,flipy, sx,sy, - colortable_get_transpen_mask(machine().colortable, m_gfxdecode->gfx(1+spritebank), color, 0x8f)); + m_palette->transpen_mask(*m_gfxdecode->gfx(1+spritebank), color, 0x8f)); } } } |