summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2017-11-02 06:02:23 +0100
committer angelosa <salese_corp_ltd@email.it>2017-11-02 06:03:12 +0100
commitf092330cc3c84053a20c09907fb3155fba13c27f (patch)
treeda6d0474e6f3396ede8b1832c093c21a34879fa6
parent4015176d5fd3908b24e5754b0956b0148677b9bb (diff)
marinedt.cpp: attempt to fix collision in upright mode (nw)
-rw-r--r--src/mame/drivers/marinedt.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mame/drivers/marinedt.cpp b/src/mame/drivers/marinedt.cpp
index 45a865ccdb5..8e27fba47ed 100644
--- a/src/mame/drivers/marinedt.cpp
+++ b/src/mame/drivers/marinedt.cpp
@@ -346,6 +346,7 @@ inline uint32_t marinedt_state::obj_to_obj_collision()
if(m_obj[0].bitmap.pix16(resy,resx) == 0)
continue;
+ // return value is never read most likely
if(m_obj[1].bitmap.pix16(resy,resx) != 0)
return ((resy / 8) * 32) | (((resx / 8) - 1) & 0x1f);
}
@@ -373,9 +374,17 @@ inline uint32_t marinedt_state::obj_to_layer_collision()
if(m_obj[0].bitmap.pix16(resy,resx) == 0)
continue;
- // TODO: doesn't work with flipscreen, needs to return +1 plus reverse x/y
+ if(!m_screen_flip)
+ resy -= 32;
+
+ // TODO: non screen flip path doesn't work properly
if(m_tilemap->pixmap().pix16(resy,resx) != 0)
- return ((resy / 8) * 32) | (((resx / 8) - 1) & 0x1f);
+ {
+ if(m_screen_flip)
+ return ((resy / 8) * 32) | (((resx / 8) - 1) & 0x1f);
+ else
+ return (((resy / 8) * 32) | (((resx / 8) - 1) & 0x1f)) ^ 0x3ff;
+ }
}
}