diff options
Diffstat (limited to 'src/mame/video/k051960.c')
-rw-r--r-- | src/mame/video/k051960.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/src/mame/video/k051960.c b/src/mame/video/k051960.c index 6b42e780d9a..13893c0bf73 100644 --- a/src/mame/video/k051960.c +++ b/src/mame/video/k051960.c @@ -76,7 +76,8 @@ k051960_device::k051960_device(const machine_config &mconfig, const char *tag, d m_irq_enabled(0), m_nmi_enabled(0), m_k051937_counter(0), - m_gfxdecode(*this) + m_gfxdecode(*this), + m_palette(*this) { } @@ -92,6 +93,16 @@ void k051960_device::static_set_gfxdecode_tag(device_t &device, const char *tag) //------------------------------------------------- +// static_set_palette_tag: Set the tag of the +// palette device +//------------------------------------------------- + +void k051960_device::static_set_palette_tag(device_t &device, const char *tag) +{ + downcast<k051960_device &>(device).m_palette.set_tag(tag); +} + +//------------------------------------------------- // device_config_complete - perform any // operations now that the configuration is // complete @@ -164,24 +175,24 @@ void k051960_device::device_start() { case NORMAL_PLANE_ORDER: total = machine().root_device().memregion(m_gfx_memory_region)->bytes() / 128; - konami_decode_gfx(machine(), m_gfxdecode, m_gfx_num, machine().root_device().memregion(m_gfx_memory_region)->base(), total, &spritelayout, 4); + konami_decode_gfx(machine(), m_gfxdecode, m_palette, m_gfx_num, machine().root_device().memregion(m_gfx_memory_region)->base(), total, &spritelayout, 4); break; case REVERSE_PLANE_ORDER: total = machine().root_device().memregion(m_gfx_memory_region)->bytes() / 128; - konami_decode_gfx(machine(), m_gfxdecode, m_gfx_num, machine().root_device().memregion(m_gfx_memory_region)->base(), total, &spritelayout_reverse, 4); + konami_decode_gfx(machine(), m_gfxdecode, m_palette, m_gfx_num, machine().root_device().memregion(m_gfx_memory_region)->base(), total, &spritelayout_reverse, 4); break; case GRADIUS3_PLANE_ORDER: total = 0x4000; - konami_decode_gfx(machine(), m_gfxdecode, m_gfx_num, machine().root_device().memregion(m_gfx_memory_region)->base(), total, &spritelayout_gradius3, 4); + konami_decode_gfx(machine(), m_gfxdecode, m_palette, m_gfx_num, machine().root_device().memregion(m_gfx_memory_region)->base(), total, &spritelayout_gradius3, 4); break; default: fatalerror("Unknown plane_order\n"); } - if (VERBOSE && !(machine().config().m_video_attributes & VIDEO_HAS_SHADOWS)) + if (VERBOSE && !(m_palette->shadows_enabled())) popmessage("driver should use VIDEO_HAS_SHADOWS"); /* deinterleave the graphics, if needed */ @@ -512,20 +523,20 @@ void k051960_device::k051960_sprites_draw( bitmap_ind16 &bitmap, const rectangle c += yoffset[y]; if (max_priority == -1) - m_gfx->prio_transtable(bitmap,cliprect, + m_gfx->prio_transtable(m_palette,bitmap,cliprect, c, color, flipx,flipy, sx & 0x1ff,sy, priority_bitmap,pri, - drawmode_table,machine().shadow_table); + drawmode_table,m_palette->shadow_table()); else - m_gfx->transtable(bitmap,cliprect, + m_gfx->transtable(m_palette,bitmap,cliprect, c, color, flipx,flipy, sx & 0x1ff,sy, - drawmode_table,machine().shadow_table); + drawmode_table,m_palette->shadow_table()); } } } @@ -555,22 +566,22 @@ void k051960_device::k051960_sprites_draw( bitmap_ind16 &bitmap, const rectangle c += yoffset[y]; if (max_priority == -1) - m_gfx->prio_zoom_transtable(bitmap,cliprect, + m_gfx->prio_zoom_transtable(m_palette,bitmap,cliprect, c, color, flipx,flipy, sx & 0x1ff,sy, (zw << 16) / 16,(zh << 16) / 16, priority_bitmap,pri, - drawmode_table,machine().shadow_table); + drawmode_table,m_palette->shadow_table()); else - m_gfx->zoom_transtable(bitmap,cliprect, + m_gfx->zoom_transtable(m_palette,bitmap,cliprect, c, color, flipx,flipy, sx & 0x1ff,sy, (zw << 16) / 16,(zh << 16) / 16, - drawmode_table,machine().shadow_table); + drawmode_table,m_palette->shadow_table()); } } } |