From be7e5e4b41461de14c705386c44b40505700bdfe Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Mon, 3 Oct 2016 20:58:58 +0300 Subject: [PATCH] bit better collision (nw) --- src/mame/drivers/istrebiteli.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/istrebiteli.cpp b/src/mame/drivers/istrebiteli.cpp index 6563a6993a3..69ca5f67d1d 100644 --- a/src/mame/drivers/istrebiteli.cpp +++ b/src/mame/drivers/istrebiteli.cpp @@ -306,10 +306,13 @@ CUSTOM_INPUT_MEMBER(istrebiteli_state::collision_r) // real hardware does per-pixel sprite collision detection int id = *(int*)¶m * 2; - int sx = m_spr_xy[4 + id]; - int sy = m_spr_xy[5 + id]; - int px = m_spr_xy[2 - id] + 3; - int py = m_spr_xy[3 - id] + 3; + int sx = m_spr_xy[5 + id]; + int sy = m_spr_xy[4 + id]; + int px = m_spr_xy[3 - id] + 3; + int py = m_spr_xy[2 - id] + 3; + + if (sx < 56) + return 0; if (px >= sx && px < (sx + 8) && py >= sy && py < (sy + 8)) return 1;