From 652f39f9a78519b9bab26cf10cb14b469070a0a3 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 1 May 2016 13:28:49 -0400 Subject: [PATCH] decocass: Fix positioning of object sprite This stops the headlight in chwy from bouncing all over the screen and makes the shadow stick to cskater's toe. Reference videos show that color is still 100% wrong. --- src/mame/video/decocass.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mame/video/decocass.cpp b/src/mame/video/decocass.cpp index a5f49cd22d2..c6f96104ad8 100644 --- a/src/mame/video/decocass.cpp +++ b/src/mame/video/decocass.cpp @@ -244,12 +244,10 @@ void decocass_state::draw_object(bitmap_ind16 &bitmap, const rectangle &cliprect color = (m_color_center_bot >> 4) & 15; - sy = 192 - (m_part_v_shift & 0x7f); - - if (m_part_h_shift & 0x80) - sx = (m_part_h_shift & 0x7f) + 1; - else - sx = 91 - (m_part_h_shift & 0x7f); + sy = 64 - m_part_v_shift + 1; + if (sy < 0) + sy += 256; + sx = m_part_h_shift - 128; m_gfxdecode->gfx(3)->transpen(bitmap,cliprect, 0, color, 0, 0, sx + 64, sy, 0); m_gfxdecode->gfx(3)->transpen(bitmap,cliprect, 1, color, 0, 0, sx, sy, 0); @@ -455,7 +453,7 @@ WRITE8_MEMBER(decocass_state::decocass_back_vr_shift_w ) WRITE8_MEMBER(decocass_state::decocass_part_h_shift_w ) { - if (data == m_part_v_shift ) + if (data == m_part_h_shift ) return; LOG(1,("decocass_part_h_shift_w: $%02x\n", data)); m_part_h_shift = data;