diff options
-rw-r--r-- | src/mame/drivers/aerofgt.c | 16 | ||||
-rw-r--r-- | src/mame/drivers/f1gp.c | 4 | ||||
-rw-r--r-- | src/mame/drivers/pipedrm.c | 3 | ||||
-rw-r--r-- | src/mame/drivers/welltris.c | 4 | ||||
-rw-r--r-- | src/mame/video/aerofgt.c | 32 | ||||
-rw-r--r-- | src/mame/video/f1gp.c | 8 | ||||
-rw-r--r-- | src/mame/video/fromance.c | 5 | ||||
-rw-r--r-- | src/mame/video/vsystem_spr.c | 2 | ||||
-rw-r--r-- | src/mame/video/vsystem_spr.h | 4 | ||||
-rw-r--r-- | src/mame/video/vsystem_spr2.c | 438 | ||||
-rw-r--r-- | src/mame/video/vsystem_spr2.h | 30 | ||||
-rw-r--r-- | src/mame/video/welltris.c | 2 |
12 files changed, 155 insertions, 393 deletions
diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c index d69b90b834a..a2c4841501a 100644 --- a/src/mame/drivers/aerofgt.c +++ b/src/mame/drivers/aerofgt.c @@ -1348,6 +1348,7 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state ) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1450,6 +1451,7 @@ static MACHINE_CONFIG_START( pspikesc, aerofgt_state ) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1488,9 +1490,10 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state ) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback ) - + MCFG_VSYSTEM_SPR2_SET_GFXREGION(3) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz) @@ -1532,8 +1535,12 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state ) MCFG_PALETTE_LENGTH(1024) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) + MCFG_VSYSTEM_SPR2_SET_PRITYPE(1) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback ) // rom lookup + MCFG_VSYSTEM_SPR2_SET_PRITYPE(1) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(3) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,spinlbrk) @@ -1576,8 +1583,10 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state ) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(3) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -1621,8 +1630,10 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state ) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(3) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -1772,6 +1783,7 @@ static MACHINE_CONFIG_START( wbbc97, aerofgt_state ) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,wbbc97) diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c index 4382463b18e..f4fcba455e9 100644 --- a/src/mame/drivers/f1gp.c +++ b/src/mame/drivers/f1gp.c @@ -478,8 +478,12 @@ static MACHINE_CONFIG_START( f1gp, f1gp_state ) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( f1gp_state, f1gp_old_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) + MCFG_VSYSTEM_SPR2_SET_PRITYPE(2) MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0) MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( f1gp_state, f1gp_ol2_tile_callback ) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) + MCFG_VSYSTEM_SPR2_SET_PRITYPE(2) MCFG_VIDEO_START_OVERRIDE(f1gp_state,f1gp) diff --git a/src/mame/drivers/pipedrm.c b/src/mame/drivers/pipedrm.c index c6c75d256e4..6e181773b1b 100644 --- a/src/mame/drivers/pipedrm.c +++ b/src/mame/drivers/pipedrm.c @@ -659,6 +659,9 @@ static MACHINE_CONFIG_START( pipedrm, fromance_state ) MCFG_PALETTE_LENGTH(2048) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) + MCFG_VSYSTEM_SPR2_SET_OFFSETS(-13, -6) + MCFG_VSYSTEM_SPR2_SET_PRITYPE(3) MCFG_VIDEO_START_OVERRIDE(fromance_state,pipedrm) diff --git a/src/mame/drivers/welltris.c b/src/mame/drivers/welltris.c index 625e5348434..1283ef7a341 100644 --- a/src/mame/drivers/welltris.c +++ b/src/mame/drivers/welltris.c @@ -697,7 +697,7 @@ DRIVER_INIT_MEMBER(welltris_state,welltris) DRIVER_INIT_MEMBER(welltris_state,quiz18k) { - ; + } @@ -725,6 +725,8 @@ static MACHINE_CONFIG_START( welltris, welltris_state ) MCFG_PALETTE_LENGTH(2048) MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) + MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) + MCFG_VSYSTEM_SPR2_SET_PRITYPE(-1) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/video/aerofgt.c b/src/mame/video/aerofgt.c index ae53160ee84..15e601763ae 100644 --- a/src/mame/video/aerofgt.c +++ b/src/mame/video/aerofgt.c @@ -304,8 +304,8 @@ UINT32 aerofgt_state::screen_update_pspikes(screen_device &screen, bitmap_ind16 machine().priority_bitmap.fill(0, cliprect); m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); - m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, -1); - m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, 1); return 0; } @@ -323,11 +323,11 @@ UINT32 aerofgt_state::screen_update_karatblz(screen_device &screen, bitmap_ind16 m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); /* we use the priority buffer so sprites are drawn front to back */ - m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, -1); - m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 1); - m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, -1); - m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 1); return 0; } @@ -349,11 +349,11 @@ UINT32 aerofgt_state::screen_update_spinlbrk(screen_device &screen, bitmap_ind16 m_bg2_tilemap->draw(bitmap, cliprect, 0, 1); /* we use the priority buffer so sprites are drawn front to back */ - m_spr_old->spinlbrk_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, 0); - m_spr_old->spinlbrk_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, -1); + m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 1); + m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 0); - m_spr_old2->spinlbrk_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, 0); - m_spr_old2->spinlbrk_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, -1); + m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 1); + m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 0); return 0; } @@ -376,11 +376,11 @@ UINT32 aerofgt_state::screen_update_turbofrc(screen_device &screen, bitmap_ind16 m_bg2_tilemap->draw(bitmap, cliprect, 0, 1); /* we use the priority buffer so sprites are drawn front to back */ - m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, -1); //enemy - m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, 0); //enemy + m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 0); //enemy + m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 1); //enemy - m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, -1); //ship - m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, 0); //intro + m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 0); //ship + m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, 1); //intro return 0; } @@ -847,7 +847,7 @@ UINT32 aerofgt_state::screen_update_wbbc97(screen_device &screen, bitmap_rgb32 & m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); } - m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, -1); - m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, 0); + m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, 1); return 0; } diff --git a/src/mame/video/f1gp.c b/src/mame/video/f1gp.c index 091c17ea967..45cdcfa5b96 100644 --- a/src/mame/video/f1gp.c +++ b/src/mame/video/f1gp.c @@ -199,13 +199,13 @@ UINT32 f1gp_state::screen_update_f1gp(screen_device &screen, bitmap_ind16 &bitma /* quick kludge for "continue" screen priority */ if (m_gfxctrl == 0x00) { - m_spr_old->f1gp_draw_sprites(1, m_spr1vram, machine(), bitmap, cliprect, 0x02); - m_spr_old2->f1gp_draw_sprites(2, m_spr2vram, machine(), bitmap, cliprect, 0x02); + m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, machine(), bitmap, cliprect, 0x02); + m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, machine(), bitmap, cliprect, 0x02); } else { - m_spr_old->f1gp_draw_sprites(1, m_spr1vram, machine(), bitmap, cliprect, 0x00); - m_spr_old2->f1gp_draw_sprites(2, m_spr2vram, machine(), bitmap, cliprect, 0x02); + m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, machine(), bitmap, cliprect, 0x00); + m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, machine(), bitmap, cliprect, 0x02); } return 0; } diff --git a/src/mame/video/fromance.c b/src/mame/video/fromance.c index 594a44eae33..30cb68d4cc2 100644 --- a/src/mame/video/fromance.c +++ b/src/mame/video/fromance.c @@ -308,6 +308,7 @@ UINT32 fromance_state::screen_update_fromance(screen_device &screen, bitmap_ind1 UINT32 fromance_state::screen_update_pipedrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + UINT8* sram = m_spriteram; /* there seems to be no logical mapping for the X scroll register -- maybe it's gone */ m_bg_tilemap->set_scrolly(0, m_scrolly[1]); @@ -316,7 +317,7 @@ UINT32 fromance_state::screen_update_pipedrm(screen_device &screen, bitmap_ind16 m_bg_tilemap->draw(bitmap, cliprect, 0, 0); m_fg_tilemap->draw(bitmap, cliprect, 0, 0); - m_spr_old->draw_sprites_pipedrm(m_spriteram, m_spriteram.bytes(), m_flipscreen, screen, bitmap, cliprect, 0); - m_spr_old->draw_sprites_pipedrm(m_spriteram, m_spriteram.bytes(), m_flipscreen, screen, bitmap, cliprect, 1); + m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, machine(), bitmap, cliprect, 0); + m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, machine(), bitmap, cliprect, 1); return 0; } diff --git a/src/mame/video/vsystem_spr.c b/src/mame/video/vsystem_spr.c index de50554e3ba..913f2f7067c 100644 --- a/src/mame/video/vsystem_spr.c +++ b/src/mame/video/vsystem_spr.c @@ -113,7 +113,7 @@ void vsystem_spr_device::set_pdraw(device_t &device, bool pdraw) } // static -void vsystem_spr_device::CG10103_set_gfx_region(device_t &device, int gfx_region) +void vsystem_spr_device::set_gfx_region(device_t &device, int gfx_region) { vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device); dev.m_gfx_region = gfx_region; diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h index 8f38319e42a..53b2cc7b4ee 100644 --- a/src/mame/video/vsystem_spr.h +++ b/src/mame/video/vsystem_spr.h @@ -7,7 +7,7 @@ typedef device_delegate<UINT32 (UINT32)> vsystem_tile_indirection_delegate; vsystem_spr_device::set_tile_indirect_cb(*device, vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0)); \ #define MCFG_VSYSTEM_SPR_SET_GFXREGION( _rgn ) \ - vsystem_spr_device::CG10103_set_gfx_region(*device, _rgn); \ + vsystem_spr_device::set_gfx_region(*device, _rgn); \ #define MCFG_VSYSTEM_SPR_SET_PALBASE( _palbase ) \ vsystem_spr_device::CG10103_set_pal_base(*device, _palbase); \ @@ -29,7 +29,7 @@ public: static void set_offsets(device_t &device, int xoffs, int yoffs); static void set_pdraw(device_t &device, bool pdraw); static void set_tile_indirect_cb(device_t &device,vsystem_tile_indirection_delegate newtilecb); - static void CG10103_set_gfx_region(device_t &device, int gfx_region); + static void set_gfx_region(device_t &device, int gfx_region); static void CG10103_set_pal_base(device_t &device, int pal_base); static void set_pal_mask(device_t &device, int pal_mask); static void CG10103_set_transpen(device_t &device, int transpen); diff --git a/src/mame/video/vsystem_spr2.c b/src/mame/video/vsystem_spr2.c index d907f581573..acd20919aa4 100644 --- a/src/mame/video/vsystem_spr2.c +++ b/src/mame/video/vsystem_spr2.c @@ -15,6 +15,11 @@ // Formula 1 Grand Prix (1) // Pipe Dream +// there were lots of comments saying drivers using the +// static const UINT8 zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 }; +// table for zooming needed upgrading, are we sure this isn't one of the +// differences between this sprite chip and the one in vsystem_spr.c, pspikes zooming is very rough + #include "emu.h" #include "vsystem_spr2.h" @@ -26,6 +31,10 @@ vsystem_spr2_device::vsystem_spr2_device(const machine_config &mconfig, const ch : device_t(mconfig, VSYSTEM_SPR2, "vsystem_spr2_device", tag, owner, clock) { m_newtilecb = vsystem_tile2_indirection_delegate(FUNC(vsystem_spr2_device::tile_callback_noindirect), this); + m_pritype = 0; // hack until we have better handling + m_gfx_region = 0; + m_xoffs = 0; + m_yoffs = 0; } void vsystem_spr2_device::set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb) @@ -34,6 +43,25 @@ void vsystem_spr2_device::set_tile_indirect_cb(device_t &device,vsystem_tile2_in dev.m_newtilecb = newtilecb; } +void vsystem_spr2_device::set_pritype(device_t &device,int pritype) +{ + vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device); + dev.m_pritype = pritype; +} + +void vsystem_spr2_device::set_gfx_region(device_t &device, int gfx_region) +{ + vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device); + dev.m_gfx_region = gfx_region; +} + +void vsystem_spr2_device::set_offsets(device_t &device, int xoffs, int yoffs) +{ + vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device); + dev.m_xoffs = xoffs; + dev.m_yoffs = yoffs; +} + UINT32 vsystem_spr2_device::tile_callback_noindirect(UINT32 tile) { return tile; @@ -87,110 +115,68 @@ void vsystem_spr2_device::handle_xsize_map_inc(void) } template<class _BitmapClass> -void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri ) +void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int pri_param ) { - int attr_start, base, first; - base = 0;//chip * 0x0200; - first = 4 * spriteram3[0x1fe + base]; + int attr_start, first; + first = 4 * spriteram3[0x1fe]; - for (attr_start = base + 0x0200 - 8; attr_start >= first + base; attr_start -= 4) - { - int x, y; -// some other drivers still use this wrong table, they have to be upgraded -// int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 }; + first &= 0x1ff; + if (first>0x200-4) + first = 0x200-4; + int start,end,inc; - if (!get_sprite_attributes(&spriteram3[attr_start])) - continue; - + if (m_pritype == 0 || m_pritype == 1 || m_pritype == 2) // prdrawgfx cases + { + start = 0x200 - 8; + end = first-4; + inc = -4; + } + else // drawgfx cases + { + start = first; + end = 0x200 -4; + inc = 4; + } - if ( chip_disabled_pri & !curr_sprite.pri) - continue; + for (attr_start = start; attr_start != end; attr_start += inc) + { + int x, y; - if ((!chip_disabled_pri) & (curr_sprite.pri >> 4)) + if (!get_sprite_attributes(&spriteram3[attr_start])) continue; + // pipedrm + curr_sprite.ox += m_xoffs; + curr_sprite.oy += m_yoffs; + int usepri = 0; - curr_sprite.color += 16 * spritepalettebank; - -// aerofgt has this adjustment, but doing it here would break turbo force title screen -// curr_sprite.ox += (curr_sprite.xsize*curr_sprite.zoomx+2)/4; -// curr_sprite.oy += (curr_sprite.ysize*curr_sprite.zoomy+2)/4; - - curr_sprite.zoomx = 32 - curr_sprite.zoomx; - curr_sprite.zoomy = 32 - curr_sprite.zoomy; - - for (y = 0; y <= curr_sprite.ysize; y++) + // these are still calling the function multiple times to filter out priorities, even if some are also using pdrawgfx(!) + if (m_pritype == 0 || m_pritype == 1 || m_pritype == 3) // turbo force, spinlbrk, pipedrm etc. { - int sx, sy; - - if (curr_sprite.flipy) - sy = ((curr_sprite.oy + curr_sprite.zoomy * (curr_sprite.ysize - y)/2 + 16) & 0x1ff) - 16; - else - sy = ((curr_sprite.oy + curr_sprite.zoomy * y / 2 + 16) & 0x1ff) - 16; - - for (x = 0; x <= curr_sprite.xsize; x++) - { - int curr; - - if (curr_sprite.flipx) - sx = ((curr_sprite.ox + curr_sprite.zoomx * (curr_sprite.xsize - x) / 2 + 16) & 0x1ff) - 16; - else - sx = ((curr_sprite.ox + curr_sprite.zoomx * x / 2 + 16) & 0x1ff) - 16; - - curr = m_newtilecb(curr_sprite.map++); - - pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[sprite_gfx], - curr, - curr_sprite.color, - curr_sprite.flipx,curr_sprite.flipy, - sx,sy, - curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, - machine.priority_bitmap,curr_sprite.pri ? 0 : 2,15); - } - handle_xsize_map_inc(); + if ((curr_sprite.pri>>4) != pri_param) + continue; } - } -} - -void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri ) -{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); } - -void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri ) -{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); } - - -template<class _BitmapClass> -void vsystem_spr2_device::spinlbrk_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri ) -{ - int attr_start, base, first; - base = 0;//chip * 0x0200; - first = 4 * spriteram3[0x1fe + base]; - - for (attr_start = base + 0x0200-8; attr_start >= first + base; attr_start -= 4) - { - int x, y; -// some other drivers still use this wrong table, they have to be upgraded -// int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 }; - - - if (!get_sprite_attributes(&spriteram3[attr_start])) - continue; + + if (m_pritype == 0) // turbo force etc. + { + usepri = curr_sprite.pri ? 0 : 2; + } + else if (m_pritype == 1) // spinlbrk + { + usepri = curr_sprite.pri ? 2 : 0; + } + else if (m_pritype == 2) // f1gp + { + usepri = pri_param; + } - if ( chip_disabled_pri & !curr_sprite.pri) - continue; - if ((!chip_disabled_pri) & (curr_sprite.pri >> 4)) - continue; curr_sprite.color += 16 * spritepalettebank; -// aerofgt has this adjustment, but doing it here would break turbo force title screen -// curr_sprite.ox += (curr_sprite.xsize*curr_sprite.zoomx+2)/4; -// curr_sprite.oy += (curr_sprite.ysize*curr_sprite.zoomy+2)/4; - curr_sprite.zoomx = 32 - curr_sprite.zoomx; curr_sprite.zoomy = 32 - curr_sprite.zoomy; @@ -214,285 +200,33 @@ void vsystem_spr2_device::spinlbrk_draw_sprites_common( UINT16* spriteram3, int curr = m_newtilecb(curr_sprite.map++); - pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[sprite_gfx], - curr, - curr_sprite.color, - curr_sprite.flipx,curr_sprite.flipy, - sx,sy, - curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, - machine.priority_bitmap,curr_sprite.pri ? 2 : 0,15); - } - handle_xsize_map_inc(); - } - } -} - -void vsystem_spr2_device::spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri ) -{ spinlbrk_draw_sprites_common( spriteram3, spriteram3_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); } - -void vsystem_spr2_device::spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri ) -{ spinlbrk_draw_sprites_common( spriteram3, spriteram3_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); } - - - - -void vsystem_spr2_device::welltris_draw_sprites( UINT16* spriteram, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect) -{ - static const UINT8 zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 }; - int offs; - const rectangle &visarea = machine.primary_screen->visible_area(); - /* draw the sprites */ - for (offs = 0; offs < 0x200 - 4; offs += 4) - { - if (!get_sprite_attributes(&spriteram[offs])) - continue; - - curr_sprite.map&=0x1fff; - curr_sprite.color += (0x10 * spritepalettebank); - - int xt, yt; - - - /* compute the zoom factor -- stolen from aerofgt.c */ - curr_sprite.zoomx = 16 - zoomtable[curr_sprite.zoomx] / 8; - curr_sprite.zoomy = 16 - zoomtable[curr_sprite.zoomy] / 8; - - /* wrap around */ - if (curr_sprite.ox > visarea.max_x) curr_sprite.ox -= 0x200; - if (curr_sprite.oy > visarea.max_y) curr_sprite.oy -= 0x200; - - /* normal case */ - if (!curr_sprite.flipx && !curr_sprite.flipy) { - for (yt = 0; yt <= curr_sprite.ysize; yt++) { - for (xt = 0; xt <= curr_sprite.xsize; xt++) + if (m_pritype == 0 || m_pritype == 1 || m_pritype == 2) // pdrawgfx cases { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, machine.gfx[1], curr, curr_sprite.color, 0, 0, - curr_sprite.ox + xt * curr_sprite.zoomx, curr_sprite.oy + yt * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); + pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,usepri,15); + pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,usepri,15); + pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,usepri,15); + pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,usepri,15); } - handle_xsize_map_inc(); - } - } - - /* curr_sprite.flipxped case */ - else if (curr_sprite.flipx && !curr_sprite.flipy) { - for (yt = 0; yt <= curr_sprite.ysize; yt++) { - for (xt = 0; xt <= curr_sprite.xsize; xt++) + else // drawgfx cases (welltris, pipedrm) { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, machine.gfx[1], curr, curr_sprite.color, 1, 0, - curr_sprite.ox + (curr_sprite.xsize - xt) * curr_sprite.zoomx, curr_sprite.oy + yt * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); + drawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); + drawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x000, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); + drawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x000,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); + drawgfxzoom_transpen(bitmap,cliprect,machine.gfx[m_gfx_region], curr, curr_sprite.color, curr_sprite.flipx,curr_sprite.flipy, sx-0x200,sy-0x200, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11,15); } - handle_xsize_map_inc(); - } - } - - /* curr_sprite.flipyped case */ - else if (!curr_sprite.flipx && curr_sprite.flipy) { - for (yt = 0; yt <= curr_sprite.ysize; yt++) { - for (xt = 0; xt <= curr_sprite.xsize; xt++) - { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, machine.gfx[1], curr, curr_sprite.color, 0, 1, - curr_sprite.ox + xt * curr_sprite.zoomx, curr_sprite.oy + (curr_sprite.ysize - yt) * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); - } - handle_xsize_map_inc(); - } - } - - /* x & curr_sprite.flipyped case */ - else { - for (yt = 0; yt <= curr_sprite.ysize; yt++) { - for (xt = 0; xt <= curr_sprite.xsize; xt++) - { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, machine.gfx[1], curr, curr_sprite.color, 1, 1, - curr_sprite.ox + (curr_sprite.xsize - xt) * curr_sprite.zoomx, curr_sprite.oy + (curr_sprite.ysize - yt) * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); - } - handle_xsize_map_inc(); - } - } - } -} - - - -void vsystem_spr2_device::f1gp_draw_sprites( int gfxrgn, UINT16* sprvram, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int primask ) -{ - int attr_start, first; - UINT16 *spram = sprvram; - - first = 4 * spram[0x1fe]; - - for (attr_start = 0x0200 - 8; attr_start >= first; attr_start -= 4) - { - int x, y; - /* table hand made by looking at the ship explosion in attract mode */ - /* it's almost a logarithmic scale but not exactly */ - static const int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 }; - - - if (!get_sprite_attributes(&spram[attr_start])) - continue; - - curr_sprite.zoomx = 16 - zoomtable[curr_sprite.zoomx] / 8; - curr_sprite.zoomy = 16 - zoomtable[curr_sprite.zoomy] / 8; - - for (y = 0; y <= curr_sprite.ysize; y++) - { - int sx, sy; - if (curr_sprite.flipy) sy = ((curr_sprite.oy + curr_sprite.zoomy * (curr_sprite.ysize - y) + 16) & 0x1ff) - 16; - else sy = ((curr_sprite.oy + curr_sprite.zoomy * y + 16) & 0x1ff) - 16; - - for (x = 0; x <= curr_sprite.xsize; x++) - { - int curr; - - if (curr_sprite.flipx) sx = ((curr_sprite.ox + curr_sprite.zoomx * (curr_sprite.xsize - x) + 16) & 0x1ff) - 16; - else sx = ((curr_sprite.ox + curr_sprite.zoomx * x + 16) & 0x1ff) - 16; - - curr = m_newtilecb(curr_sprite.map++); - - pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[gfxrgn], - curr, - curr_sprite.color, - curr_sprite.flipx,curr_sprite.flipy, - sx,sy, - 0x1000 * curr_sprite.zoomx,0x1000 * curr_sprite.zoomy, - machine.priority_bitmap, -// pri ? 0 : 0x2); - primask,15); } handle_xsize_map_inc(); } } } -// the same but for an 8-bit system.. -void vsystem_spr2_device::draw_sprites_pipedrm( UINT8* spriteram, int spriteram_bytes, int flipscreen, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int draw_priority ) -{ - static const UINT8 zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 }; - const rectangle &visarea = screen.visible_area(); -// UINT8 *spriteram = spriteram; - int offs; +void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_param ) +{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, machine, bitmap, cliprect, pri_param ); } - /* draw the sprites */ - for (offs = 0; offs < spriteram_bytes; offs += 8) - { - int data2 = spriteram[offs + 4] | (spriteram[offs + 5] << 8); - int priority = (data2 >> 4) & 1; +void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int pri_param ) +{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, machine, bitmap, cliprect, pri_param ); } - /* turns out the sprites are the same as in aerofgt.c */ - if (priority == draw_priority) - { - if (!get_sprite_attributes((UINT16*)&spriteram[offs])) - continue; - curr_sprite.oy -= 6; - curr_sprite.ox -= 13; - - - int xt, yt; - - - - /* compute the zoom factor -- stolen from aerofgt.c */ - curr_sprite.zoomx = 16 - zoomtable[curr_sprite.zoomx] / 8; - curr_sprite.zoomy = 16 - zoomtable[curr_sprite.zoomy] / 8; - - /* wrap around */ - if (curr_sprite.ox > visarea.max_x) - curr_sprite.ox -= 0x200; - if (curr_sprite.oy > visarea.max_y) - curr_sprite.oy -= 0x200; - - /* flip ? */ - if (flipscreen) - { - curr_sprite.oy = visarea.max_y - curr_sprite.oy - 16 * curr_sprite.ysize - 4; - curr_sprite.ox = visarea.max_x - curr_sprite.ox - 16 * curr_sprite.xsize - 24; - curr_sprite.flipx=!curr_sprite.flipx; - curr_sprite.flipy=!curr_sprite.flipy; - } - - /* normal case */ - if (!curr_sprite.flipx && !curr_sprite.flipy) - { - for (yt = 0; yt <= curr_sprite.ysize; yt++) - { - for (xt = 0; xt <= curr_sprite.xsize; xt++) - { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, screen.machine().gfx[2], curr, curr_sprite.color, 0, 0, - curr_sprite.ox + xt * curr_sprite.zoomx, curr_sprite.oy + yt * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); - } - handle_xsize_map_inc(); - } - } - - /* curr_sprite.flipxped case */ - else if (curr_sprite.flipx && !curr_sprite.flipy) - { - for (yt = 0; yt <= curr_sprite.ysize; yt++) - { - for (xt = 0; xt <= curr_sprite.xsize; xt++) - { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, screen.machine().gfx[2], curr, curr_sprite.color, 1, 0, - curr_sprite.ox + (curr_sprite.xsize - xt) * curr_sprite.zoomx, curr_sprite.oy + yt * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); - } - handle_xsize_map_inc(); - } - } - - /* curr_sprite.flipyped case */ - else if (!curr_sprite.flipx && curr_sprite.flipy) - { - for (yt = 0; yt <= curr_sprite.ysize; yt++) - { - for (xt = 0; xt <= curr_sprite.xsize; xt++) - { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, screen.machine().gfx[2], curr, curr_sprite.color, 0, 1, - curr_sprite.ox + xt * curr_sprite.zoomx, curr_sprite.oy + (curr_sprite.ysize - yt) * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); - } - handle_xsize_map_inc(); - } - } - - /* x & curr_sprite.flipyped case */ - else - { - for (yt = 0; yt <= curr_sprite.ysize; yt++) - { - for (xt = 0; xt <= curr_sprite.xsize; xt++) - { - int curr = m_newtilecb(curr_sprite.map++); - - drawgfxzoom_transpen(bitmap, cliprect, screen.machine().gfx[2], curr, curr_sprite.color, 1, 1, - curr_sprite.ox + (curr_sprite.xsize - xt) * curr_sprite.zoomx, curr_sprite.oy + (curr_sprite.ysize - yt) * curr_sprite.zoomy, - 0x1000 * curr_sprite.zoomx, 0x1000 * curr_sprite.zoomy, 15); - } - handle_xsize_map_inc(); - } - } - } - } -} diff --git a/src/mame/video/vsystem_spr2.h b/src/mame/video/vsystem_spr2.h index 064768bc0b5..995cd099dac 100644 --- a/src/mame/video/vsystem_spr2.h +++ b/src/mame/video/vsystem_spr2.h @@ -5,6 +5,15 @@ typedef device_delegate<UINT32 (UINT32)> vsystem_tile2_indirection_delegate; #define MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( _class, _method) \ vsystem_spr2_device::set_tile_indirect_cb(*device, vsystem_tile2_indirection_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0)); \ +#define MCFG_VSYSTEM_SPR2_SET_PRITYPE( _val) \ + vsystem_spr2_device::set_pritype(*device, _val); \ + +#define MCFG_VSYSTEM_SPR2_SET_GFXREGION( _rgn ) \ + vsystem_spr2_device::set_gfx_region(*device, _rgn); \ + +#define MCFG_VSYSTEM_SPR2_SET_OFFSETS( _xoffs, _yoffs ) \ + vsystem_spr2_device::set_offsets(*device, _xoffs,_yoffs); \ + class vsystem_spr2_device : public device_t { @@ -12,6 +21,9 @@ public: vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); static void set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb); + static void set_pritype(device_t &device, int pritype); + static void set_gfx_region(device_t &device, int gfx_region); + static void set_offsets(device_t &device, int xoffs, int yoffs); struct vsystem_sprite_attributes { @@ -32,23 +44,17 @@ public: void handle_xsize_map_inc(void); vsystem_tile2_indirection_delegate m_newtilecb; UINT32 tile_callback_noindirect(UINT32 tile); + int m_pritype; + int m_gfx_region; + int m_xoffs, m_yoffs; template<class _BitmapClass> - void turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri ); - - void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri ); - void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri ); - - template<class _BitmapClass> - void spinlbrk_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri ); + void turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int pri_param ); - void spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri ); - void spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri ); + void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_param ); + void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int pri_param ); - void welltris_draw_sprites( UINT16* spriteram, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect); - void f1gp_draw_sprites( int gfxrgn, UINT16* sprvram, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int primask ); - void draw_sprites_pipedrm( UINT8* spriteram, int spriteram_bytes, int flipscreen, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int draw_priority ); protected: virtual void device_start(); diff --git a/src/mame/video/welltris.c b/src/mame/video/welltris.c index 13327112669..df3f3e1881b 100644 --- a/src/mame/video/welltris.c +++ b/src/mame/video/welltris.c @@ -125,6 +125,6 @@ UINT32 welltris_state::screen_update_welltris(screen_device &screen, bitmap_ind1 draw_background(machine(), bitmap, cliprect); m_char_tilemap->draw(bitmap, cliprect, 0, 0); - m_spr_old->welltris_draw_sprites(m_spriteram, m_spritepalettebank, machine(), bitmap, cliprect); + m_spr_old->turbofrc_draw_sprites(m_spriteram, m_spriteram.bytes(), m_spritepalettebank, machine(), bitmap, cliprect, 0); return 0; } |