diff options
Diffstat (limited to 'src/mame/video/terracre.c')
-rw-r--r-- | src/mame/video/terracre.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mame/video/terracre.c b/src/mame/video/terracre.c index 24ffb694bfe..e4536f62af6 100644 --- a/src/mame/video/terracre.c +++ b/src/mame/video/terracre.c @@ -81,21 +81,18 @@ void terracre_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec flipy = !flipy; } - pGfx->transpen( + pGfx->transpen(m_palette, bitmap,cliprect,tile, color,flipx,flipy,sx,sy,transparent_pen ); pSource += 4; } } -void terracre_state::palette_init() +PALETTE_INIT_MEMBER(terracre_state, terracre) { 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++) { @@ -103,7 +100,7 @@ void terracre_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 */ @@ -111,7 +108,7 @@ void terracre_state::palette_init() /* characters use colors 0-0x0f */ for (i = 0; i < 0x10; i++) - colortable_entry_set_value(machine().colortable, i, i); + palette.set_pen_indirect(i, i); /* background tiles use colors 0xc0-0xff in four banks */ /* the bottom two bits of the color code select the palette bank for */ @@ -125,7 +122,7 @@ void terracre_state::palette_init() else ctabentry = 0xc0 | (i & 0x0f) | ((i & 0x30) >> 0); - colortable_entry_set_value(machine().colortable, 0x10 + i, ctabentry); + palette.set_pen_indirect(0x10 + i, ctabentry); } /* sprites use colors 128-191 in four banks */ @@ -143,7 +140,7 @@ void terracre_state::palette_init() else ctabentry = 0x80 | ((i & 0x03) << 4) | (color_prom[i >> 4] & 0x0f); - colortable_entry_set_value(machine().colortable, 0x110 + i_swapped, ctabentry); + palette.set_pen_indirect(0x110 + i_swapped, ctabentry); } } @@ -196,7 +193,7 @@ void terracre_state::video_start() UINT32 terracre_state::screen_update_amazon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { if( m_xscroll&0x2000 ) - bitmap.fill(get_black_pen(machine()), cliprect ); + bitmap.fill(m_palette->black_pen(), cliprect ); else m_background->draw(screen, bitmap, cliprect, 0, 0 ); |