unsigned int col = 0;
unsigned coltmp = 0;
- if ((sprxp >= sprite_minx && sprxp < sprite_maxx) || brdspractive())
+ if (sprxp >= sprite_minx || brdspractive())
col = (datab & 3) << (2 * num);
#if 0
- if (sprxp == sprite_minx || sprxp == sprite_maxx - 1)
+ if (sprxp == sprite_minx)
col ^= (uaerand () << 16) | uaerand ();
#endif
if ((j & mask) == 0) {
static void calcsprite (void)
{
- sprite_maxx = 0x7fff;
sprite_minx = 0;
- if (thisline_decision.diwlastword >= 0)
- sprite_maxx = tospritexdiw (thisline_decision.diwlastword);
if (thisline_decision.diwfirstword >= 0)
sprite_minx = tospritexdiw (thisline_decision.diwfirstword);
if (thisline_decision.plfleft >= 0) {
static int playfield_start, playfield_end;
static int real_playfield_start, real_playfield_end;
static int playfield_diff;
-static int sprite_playfield_start;
+static int sprite_playfield_start, sprite_end;
static int may_require_hard_way;
static int linetoscr_diw_start, linetoscr_diw_end;
static int native_ddf_left, native_ddf_right;
real_playfield_start = playfield_start;
sprite_playfield_start = playfield_start;
real_playfield_end = playfield_end;
+ sprite_end = linetoscr_diw_end;
// Sprite hpos don't include DIW_DDF_OFFSET and can appear 1 lores pixel
// before first bitplane pixel appears.
plfmask = (plf_sprite_mask >> maskshift) >> maskshift;
v &= ~plfmask;
/* Extra 1 sprite pixel at DDFSTRT is only possible if at least 1 plane is active */
- if ((bplplanecnt > 0 || pos >= sprite_playfield_start) && (v != 0 || SPRITE_DEBUG)) {
+ if ((bplplanecnt > 0 || pos >= sprite_playfield_start) && (pos < sprite_end) && (v != 0 || SPRITE_DEBUG)) {
unsigned int vlo, vhi, col;
unsigned int v1 = v & 255;
/* OFFS determines the sprite pair with the highest priority that has