diff options
author | ajrhacker <ajrhacker@users.noreply.github.com> | 2020-01-11 15:47:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-11 15:47:55 -0500 |
commit | fd236a9eb0cf15df3c2eb7141a42302112c1089f (patch) | |
tree | 8394f652e012b8627d17b42f72d0c1e296a70a50 | |
parent | a7d70fb10ed5f5f7d98e221e6887dd9b651e2336 (diff) | |
parent | 6b41323b684917f150194c05d645bb0e1a771aa7 (diff) |
Merge pull request #6160 from sasuke-arcade/stfight_draw_fix
sfight.cpp : Fixed filling the screen red when text or BG layers are hidden
-rw-r--r-- | src/mame/video/stfight_dev.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/mame/video/stfight_dev.cpp b/src/mame/video/stfight_dev.cpp index 7c5d26f04b5..f1a14375b99 100644 --- a/src/mame/video/stfight_dev.cpp +++ b/src/mame/video/stfight_dev.cpp @@ -252,21 +252,30 @@ uint32_t stfight_video_device::screen_update_stfight(screen_device &screen, bitm m_temp_sprite_bitmap.fill(-1, cliprect); draw_sprites(screen, m_temp_sprite_bitmap, cliprect); - m_temp_bitmap.fill(-1, cliprect); - m_bg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); - mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_bg_clut, 0x00, 0x00, 0x00, false); + if (m_bg_tilemap->enabled()) + { + m_temp_bitmap.fill(-1, cliprect); + m_bg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_bg_clut, 0x00, 0x00, 0x00, false); + } if (m_vregs[0x07] & 0x40) mix_txlayer(screen, bitmap, m_temp_sprite_bitmap, cliprect, m_spr_clut, 0x80, 0x100, 0x100, false); // low priority sprites - m_temp_bitmap.fill(-1, cliprect); - m_fg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); - mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_fg_clut, 0x40, 0x00, 0x00, false); + if (m_fg_tilemap->enabled()) + { + m_temp_bitmap.fill(-1, cliprect); + m_fg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_fg_clut, 0x40, 0x00, 0x00, false); + } if (m_vregs[0x07] & 0x40) mix_txlayer(screen, bitmap, m_temp_sprite_bitmap, cliprect, m_spr_clut, 0x80, 0x100, 0x000, false); // high priority sprites - m_temp_bitmap.fill(-1, cliprect); - m_tx_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); - mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_tx_clut, 0xc0, 0x00, 0x00, true); + if (m_tx_tilemap->enabled()) + { + m_temp_bitmap.fill(-1, cliprect); + m_tx_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_tx_clut, 0xc0, 0x00, 0x00, true); + } // return 0; } |