From 032c14422ae6fcb436362b65cffaa76f99d0e33b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 30 Oct 2019 20:05:05 +0200 Subject: [PATCH] Right border borderblank single pixel sprite gap fix. --- custom.cpp | 7 ++----- drawing.cpp | 5 +++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/custom.cpp b/custom.cpp index 63031b6d..500d54ca 100644 --- a/custom.cpp +++ b/custom.cpp @@ -3864,10 +3864,10 @@ static void record_sprite_1 (int sprxp, uae_u16 *buf, uae_u32 datab, int num, in 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) { @@ -4051,10 +4051,7 @@ static int fromspritexdiw (int ddf) 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) { diff --git a/drawing.cpp b/drawing.cpp index 61aa7144..005dc7ff 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -858,7 +858,7 @@ static int playfield_start_pre, playfield_end_pre; 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; @@ -959,6 +959,7 @@ static void pfield_init_linetoscr (bool border) 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. @@ -1325,7 +1326,7 @@ static uae_u8 render_sprites (int pos, int dualpf, uae_u8 apixel, int aga) 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 -- 2.47.3