summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatarGravatar Roberto Zandona <robertoz@mamedev.org>2009-03-08 18:50:08 +0000
committerGravatarGravatar Roberto Zandona <robertoz@mamedev.org>2009-03-08 18:50:08 +0000
commit4db6733054c9b930bfc8d20eed8cc70538cc5fb3 (patch)
treee6bb624844dd549d1e13ff6dfda52cfd107fd2d8
parentc30c79b89a6a3fe7a92a0ac94196033374c5d7be (diff)
wc90b1 and wc90b2: other improvements
- fixed y sprite wrapping
-rw-r--r--src/mame/video/wc90b.c48
1 files changed, 23 insertions, 25 deletions
diff --git a/src/mame/video/wc90b.c b/src/mame/video/wc90b.c
index 51418812da0..56f14939b4d 100644
--- a/src/mame/video/wc90b.c
+++ b/src/mame/video/wc90b.c
@@ -106,35 +106,33 @@ WRITE8_HANDLER( wc90b_txvideoram_w )
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int priority )
{
- int offs, sx;
+ int offs, sx, sy;
/* draw all visible sprites of specified priority */
- for ( offs = spriteram_size - 8;offs >= 0;offs -= 8 ){
-
+ for ( offs = spriteram_size - 8 ; offs >= 0 ; offs -= 8 )
+ {
if ( ( ~( spriteram[offs+3] >> 7 ) & 1 ) == priority )
{
-
- if ( spriteram[offs+1] > 16 ) /* visible */
- {
- int code = ( spriteram[offs+3] & 0x3f ) << 4;
- int bank = spriteram[offs+0];
- int flags = spriteram[offs+4];
-
- code += ( bank & 0xf0 ) >> 4;
- code <<= 2;
- code += ( bank & 0x0f ) >> 2;
-
- sx = spriteram[offs + 2];
- if (!(spriteram[offs+3] & 0x40)) sx -= 0x0100;
-
- drawgfx( bitmap,machine->gfx[ 17 ], code,
- flags >> 4, /* color */
- bank&1, /* flipx */
- bank&2, /* flipy */
- sx, /* sx */
- 240 - spriteram[offs + 1], /* sy */
- cliprect,TRANSPARENCY_PEN,15 );
- }
+ int code = ( spriteram[offs + 3] & 0x3f ) << 4;
+ int bank = spriteram[offs + 0];
+ int flags = spriteram[offs + 4];
+
+ code += ( bank & 0xf0 ) >> 4;
+ code <<= 2;
+ code += ( bank & 0x0f ) >> 2;
+
+ sx = spriteram[offs + 2];
+ if (!(spriteram[offs + 3] & 0x40)) sx -= 0x0100;
+
+ sy = 240 - spriteram[offs + 1];
+
+ drawgfx( bitmap, machine->gfx[17], code,
+ flags >> 4, /* color */
+ bank & 1, /* flipx */
+ bank & 2, /* flipy */
+ sx,
+ sy,
+ cliprect,TRANSPARENCY_PEN,15 );
}
}
}