summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <lordkale4@gmail.com>2018-06-29 00:57:32 +0200
committer angelosa <lordkale4@gmail.com>2018-06-29 04:41:47 +0200
commit9d6126ee184cf752e6c8491783d73bffbe2393a2 (patch)
tree533da922cd910f646927b32a3aea9deae1974756
parent4b6a420df5e9f1e928186ebd2fef2df0fec4fe83 (diff)
cischeat.cpp: fixed Grand Prix Star stick tyre sprite in attract mode bug [Angelo Salese]
-rw-r--r--src/mame/video/cischeat.cpp13
-rw-r--r--src/mame/video/legionna.cpp2
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))
{