From: Toni Wilen Date: Fri, 22 Feb 2019 14:37:58 +0000 (+0200) Subject: BPLCON4 non-zero + border sprites special case HAM fix. X-Git-Tag: 4200~48 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=39cbaf158978bc34f6b550773561113019e8fea7;p=francis%2Fwinuae.git BPLCON4 non-zero + border sprites special case HAM fix. --- diff --git a/drawing.cpp b/drawing.cpp index 41111e66..5fd159c4 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2328,14 +2328,28 @@ static void clear_bitplane_border_aga (void) if (shift < 0) { shift = -shift; len = (real_playfield_start - playfield_start) << shift; - memset (pixdata.apixels + pixels_offset + (playfield_start << shift), v, len); + int offset = playfield_start << shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); + len = (playfield_end - real_playfield_end) << shift; - memset (pixdata.apixels + pixels_offset + (real_playfield_end << shift), v, len); + offset = real_playfield_end << shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); } else { len = (real_playfield_start - playfield_start) >> shift; - memset (pixdata.apixels + pixels_offset + (playfield_start >> shift), v, len); + int offset = playfield_start >> shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); + len = (playfield_end - real_playfield_end) >> shift; - memset (pixdata.apixels + pixels_offset + (real_playfield_end >> shift), v, len); + offset = real_playfield_end >> shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); } } #endif