From 9d6126ee184cf752e6c8491783d73bffbe2393a2 Mon Sep 17 00:00:00 2001 From: angelosa Date: Fri, 29 Jun 2018 00:57:32 +0200 Subject: cischeat.cpp: fixed Grand Prix Star stick tyre sprite in attract mode bug [Angelo Salese] --- src/mame/video/cischeat.cpp | 13 ++++++++++--- src/mame/video/legionna.cpp | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/mame/video/cischeat.cpp b/src/mame/video/cischeat.cpp index d686d65220a..350e70d3bb3 100644 --- a/src/mame/video/cischeat.cpp +++ b/src/mame/video/cischeat.cpp @@ -582,9 +582,16 @@ void cischeat_state::cischeat_draw_sprites(bitmap_ind16 &bitmap , const rectangl sx = source[ 3 ]; sy = source[ 4 ]; - sx = (sx & 0x1ff) - (sx & 0x200); - sy = (sy & 0x1ff) - (sy & 0x200); - + // TODO: was & 0x1ff with 0x200 as sprite wrap sign, looks incorrect with Grand Prix Star + // during big car on side view in attract mode (a tyre gets stuck on the right of the screen) + // this arrangement works with both games (otherwise Part 2 gets misaligned bleachers sprites) + sx = (sx & 0x7ff); + sy = (sy & 0x7ff); + if(sx & 0x400) + sx -= 0x800; + if(sy & 0x400) + sy -= 0x800; + /* use fixed point values (16.16), for accuracy */ sx <<= 16; sy <<= 16; diff --git a/src/mame/video/legionna.cpp b/src/mame/video/legionna.cpp index 7d871730d2e..c614a1558e4 100644 --- a/src/mame/video/legionna.cpp +++ b/src/mame/video/legionna.cpp @@ -492,7 +492,7 @@ void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co y = spriteram16[offs+3]; x = spriteram16[offs+2]; - /* heated barrel hardware seems to need 0x1ff with 0x100 sign bit for sprite warp, + /* heated barrel hardware seems to need 0x1ff with 0x100 sign bit for sprite wrap, this doesn't work on denjin makai as the visible area is larger */ if (cliprect.max_x<(320-1)) { -- cgit v1.2.3