summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Michaël Banaan Ananas <happppp@users.noreply.github.com>2010-05-22 11:10:44 +0000
committer Michaël Banaan Ananas <happppp@users.noreply.github.com>2010-05-22 11:10:44 +0000
commit2d2547b181b4aa5573f358f99dcec271ef1c8a3f (patch)
tree1064234381d9e282c79a11b827335cdaac8af8e4 /src
parent274584d3f9797236a7d6bc15c4bac53bd026a45c (diff)
no sprite clipping at statusbars
Diffstat (limited to 'src')
-rw-r--r--src/mame/video/zaccaria.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/mame/video/zaccaria.c b/src/mame/video/zaccaria.c
index 366a0d2e025..dfbf3987809 100644
--- a/src/mame/video/zaccaria.c
+++ b/src/mame/video/zaccaria.c
@@ -15,17 +15,6 @@ UINT8 *zaccaria_videoram,*zaccaria_attributesram;
static tilemap_t *bg_tilemap;
-static const rectangle spritevisiblearea =
-{
- 2*8+1, 29*8-1,
- 2*8, 30*8-1
-};
-static const rectangle spritevisiblearea_flipx =
-{
- 3*8+1, 30*8-1,
- 2*8, 30*8-1
-};
-
/***************************************************************************
@@ -216,18 +205,12 @@ WRITE8_HANDLER( zaccaria_flip_screen_y_w )
.....xxx color
3 xxxxxxxx y
-offsets 1 and 2 are swapped with spriteram2
+offsets 1 and 2 are swapped if accessed from spriteram2
*/
static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,UINT8 *spriteram,int color,int section)
{
int offs,o1 = 1,o2 = 2;
- rectangle clip = *cliprect;
-
- if (flip_screen_x_get(machine))
- sect_rect(&clip, &spritevisiblearea_flipx);
- else
- sect_rect(&clip, &spritevisiblearea);
if (section)
{
@@ -242,6 +225,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
int flipx = spriteram[offs + o1] & 0x40;
int flipy = spriteram[offs + o1] & 0x80;
+ if (sx == 1) continue;
+
if (flip_screen_x_get(machine))
{
sx = 240 - sx;
@@ -253,7 +238,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
flipy = !flipy;
}
- drawgfx_transpen(bitmap,&clip,machine->gfx[1],
+ drawgfx_transpen(bitmap,cliprect,machine->gfx[1],
(spriteram[offs + o1] & 0x3f) + (spriteram[offs + o2] & 0xc0),
((spriteram[offs + o2] & 0x07) << 2) | color,
flipx,flipy,sx,sy,0);