Previous 199869 Revisions Next

r17880 Friday 14th September, 2012 at 08:43:48 UTC by hap
move sx+1 up, fixes stray sprite line at screen edge
[src/mame/video]galaxian.c

trunk/src/mame/video/galaxian.c
r17879r17880
552552   rectangle clip = cliprect;
553553   int sprnum;
554554
555   /* the existence of +1 (sprite vs tile layer) is supported by a LOT of games */
556   const int hoffset = 1;
557   
555558   /* 16 of the 256 pixels of the sprites are hard-clipped at the line buffer */
556559   /* according to the schematics, it should be the first 16 pixels */
557   clip.min_x = MAX(clip.min_x, (!state->m_flipscreen_x) * 16 * GALAXIAN_XSCALE);
558   clip.max_x = MIN(clip.max_x, (256 - state->m_flipscreen_x * 16) * GALAXIAN_XSCALE - 1);
560   clip.min_x = MAX(clip.min_x, (!state->m_flipscreen_x) * (16 + hoffset) * GALAXIAN_XSCALE);
561   clip.max_x = MIN(clip.max_x, (256 - state->m_flipscreen_x * (16 + hoffset)) * GALAXIAN_XSCALE - 1);
559562
560563   /* The line buffer is only written if it contains a '0' currently; */
561564   /* it is cleared during the visible area, and populated during HBLANK */
r17879r17880
572575      UINT8 flipx = base[1] & 0x40;
573576      UINT8 flipy = base[1] & 0x80;
574577      UINT8 color = base[2] & 7;
575      UINT8 sx = base[3] + 1;
578      UINT8 sx = base[3] + hoffset;
576579
577580      /* extend the sprite information */
578581      if (state->m_extend_sprite_info_ptr != NULL)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team