diff --git a/src/mame/includes/spbactn.h b/src/mame/includes/spbactn.h index 5957804401c..3107676c65b 100644 --- a/src/mame/includes/spbactn.h +++ b/src/mame/includes/spbactn.h @@ -42,6 +42,7 @@ public: bitmap_ind16 m_tile_bitmap_bg; bitmap_ind16 m_tile_bitmap_fg; + bitmap_ind16 m_sprite_bitmap; DECLARE_WRITE16_MEMBER(soundcommand_w); diff --git a/src/mame/video/spbactn.c b/src/mame/video/spbactn.c index 8d70f667f0a..e3a7c67968a 100644 --- a/src/mame/video/spbactn.c +++ b/src/mame/video/spbactn.c @@ -76,6 +76,7 @@ VIDEO_START_MEMBER(spbactn_state,spbactn) /* allocate bitmaps */ m_screen->register_screen_bitmap(m_tile_bitmap_bg); m_screen->register_screen_bitmap(m_tile_bitmap_fg); + m_screen->register_screen_bitmap(m_sprite_bitmap); m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(spbactn_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 64, 128); m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(spbactn_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 64, 128); @@ -149,24 +150,31 @@ TILE_GET_INFO_MEMBER(spbactn_state::get_extra_tile_info) int spbactn_state::draw_video(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, bool alt_sprites) { m_tile_bitmap_fg.fill(0, cliprect); - + m_sprite_bitmap.fill(0, cliprect); + +#if 1 m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, TILEMAP_DRAW_OPAQUE, 0); - if (m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 0, m_tile_bitmap_bg)) + if (m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 0, m_tile_bitmap_bg)) { m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, 0, 0); } - m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 1, m_tile_bitmap_bg); + m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 1, m_tile_bitmap_bg); m_fg_tilemap->draw(screen, m_tile_bitmap_fg, cliprect, 0, 0); - m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 2, m_tile_bitmap_fg); - m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 3, m_tile_bitmap_fg); + m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 2, m_tile_bitmap_fg); + m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 3, m_tile_bitmap_fg); /* mix & blend the tilemaps and sprites into a 32-bit bitmap */ blendbitmaps(m_palette, bitmap, m_tile_bitmap_bg, m_tile_bitmap_fg, cliprect); +#else + + m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), -2, m_sprite_bitmap); + +#endif return 0; } diff --git a/src/mame/video/tecmo_spr.c b/src/mame/video/tecmo_spr.c index 7fdc287a9e8..c38f8f6bb8f 100644 --- a/src/mame/video/tecmo_spr.c +++ b/src/mame/video/tecmo_spr.c @@ -189,7 +189,7 @@ int tecmo_spr_device::gaiden_draw_sprites( screen_device &screen, gfxdecode_devi - if (pri_hack == -1) + if (pri_hack == -1) // this is what the majority of the current drivers use { /* blending */ if (attributes & 0x20) @@ -202,6 +202,13 @@ int tecmo_spr_device::gaiden_draw_sprites( screen_device &screen, gfxdecode_devi bitmap = (priority >= 2) ? &bitmap_bg : &bitmap_fg; } } + else if (pri_hack == -2) // render to a single bitmap, with all priority / colour data mixed in for later processing (assumings sprites can't blend sprites we should probably be doing this) + { + + // this contains the blend bit and the priority bits + color |= (source[attributes_word] & 0x00f0); + bitmap = &bitmap_prihack; + } else // spbactn { // this is nonsense