diff options
Diffstat (limited to 'src/mame/video/vsystem_spr2.c')
-rw-r--r-- | src/mame/video/vsystem_spr2.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/mame/video/vsystem_spr2.c b/src/mame/video/vsystem_spr2.c index 5cbe70b9b82..b4bf6a0dddb 100644 --- a/src/mame/video/vsystem_spr2.c +++ b/src/mame/video/vsystem_spr2.c @@ -29,7 +29,8 @@ const device_type VSYSTEM_SPR2 = &device_creator<vsystem_spr2_device>; vsystem_spr2_device::vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, VSYSTEM_SPR2, "vsystem_spr2_device", tag, owner, clock, "vsystem_spr2", __FILE__), - m_gfxdecode(*this) + m_gfxdecode(*this), + m_palette(*this) { m_newtilecb = vsystem_tile2_indirection_delegate(FUNC(vsystem_spr2_device::tile_callback_noindirect), this); m_pritype = 0; // hack until we have better handling @@ -48,6 +49,17 @@ void vsystem_spr2_device::static_set_gfxdecode_tag(device_t &device, const char downcast<vsystem_spr2_device &>(device).m_gfxdecode.set_tag(tag); } +//------------------------------------------------- +// static_set_palette_tag: Set the tag of the +// palette device +//------------------------------------------------- + +void vsystem_spr2_device::static_set_palette_tag(device_t &device, const char *tag) +{ + downcast<vsystem_spr2_device &>(device).m_palette.set_tag(tag); +} + + void vsystem_spr2_device::set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb) { vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device); @@ -213,17 +225,17 @@ void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int if (m_pritype == 0 || m_pritype == 1 || m_pritype == 2) // pdrawgfx cases { - m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); - m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); - m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); - m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); + m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); + m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); + m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); + m_gfxdecode->gfx(m_gfx_region)->prio_zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, priority_bitmap,usepri,15); } else // drawgfx cases (welltris, pipedrm) { - m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); - m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); - m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); - m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); + m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); + m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); + m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); + m_gfxdecode->gfx(m_gfx_region)->zoom_transpen(m_palette,bitmap,cliprect, curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); } } |