From f23b72a46dd0fe012d14276161a907bd81127b9d Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 24 Nov 2024 02:09:20 +0100 Subject: [PATCH] labyrunr: fix tile/sprite priorities regression --- src/mame/konami/k007121.cpp | 2 +- src/mame/konami/labyrunr.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mame/konami/k007121.cpp b/src/mame/konami/k007121.cpp index 21f11b7c271..c7a3fe9e491 100644 --- a/src/mame/konami/k007121.cpp +++ b/src/mame/konami/k007121.cpp @@ -215,7 +215,7 @@ void k007121_device::sprites_draw( bitmap_ind16 &bitmap, const rectangle &clipre { // TODO: sprite limit is supposed to be per-line! (check MT #00185) int num = 0x40; - //num = (k007121->ctrlram[0x03] & 0x40) ? 0x80 : 0x40; /* WRONG!!! (needed by combatsc) */ + //num = (m_ctrlram[0x03] & 0x40) ? 0x80 : 0x40; // WRONG!!! (needed by combatsc) int inc = 5; // when using priority buffer, draw front to back diff --git a/src/mame/konami/labyrunr.cpp b/src/mame/konami/labyrunr.cpp index e86286f26e8..0e43b6c8b63 100644 --- a/src/mame/konami/labyrunr.cpp +++ b/src/mame/konami/labyrunr.cpp @@ -137,7 +137,7 @@ TILE_GET_INFO_MEMBER(labyrunr_state::get_tile_info) code + bank * 256, ((ctrl_6 & 0x30) * 2 + 16) + (attr & 7), 0); - tileinfo.category = Which ? (attr & 0x40) >> 6 : 0; + tileinfo.category = Which ? 0 : (attr & 0x40) >> 6; } @@ -248,7 +248,6 @@ uint32_t labyrunr_state::screen_update(screen_device &screen, bitmap_ind16 &bitm } finalclip1.max_x = cliprect.max_x - ctrl_0 + 8; - } else { @@ -284,7 +283,7 @@ uint32_t labyrunr_state::screen_update(screen_device &screen, bitmap_ind16 &bitm if (use_clip3[0]) m_layer[0]->draw(screen, bitmap, finalclip3, TILEMAP_DRAW_CATEGORY(0), 0); - m_k007121->sprites_draw(bitmap, cliprect, m_spriteram, (m_k007121->ctrlram_r(6) & 0x30) * 2,40,0,screen.priority(),(m_k007121->ctrlram_r(3) & 0x40) >> 5); + m_k007121->sprites_draw(bitmap, cliprect, m_spriteram, (m_k007121->ctrlram_r(6) & 0x30) * 2, 40, 0, screen.priority(), (m_k007121->ctrlram_r(3) & 0x40) >> 5); m_layer[0]->draw(screen, bitmap, finalclip0, TILEMAP_DRAW_CATEGORY(1), 0); if (use_clip3[0]) @@ -293,8 +292,8 @@ uint32_t labyrunr_state::screen_update(screen_device &screen, bitmap_ind16 &bitm m_layer[1]->draw(screen, bitmap, finalclip1, 0, 0); if (use_clip3[1]) m_layer[1]->draw(screen, bitmap, finalclip3, 0, 0); - } + return 0; }