changeset 2575:dddd16a6c69b

Fix "sticky" sprite overflow regression from previous sprite overflow flag fix
author Michael Pavone <pavone@retrodev.com>
date Mon, 03 Feb 2025 22:15:02 -0800
parents 0da40b1978fd
children c9bfed9156dc
files vdp.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vdp.c	Sun Feb 02 23:02:55 2025 -0800
+++ b/vdp.c	Mon Feb 03 22:15:02 2025 -0800
@@ -739,7 +739,9 @@
 
 static void scan_sprite_table(uint32_t line, vdp_context * context)
 {
-	if (context->sprite_index && !(context->flags & FLAG_SPRITE_OFLOW)) {
+	if (context->sprite_index && 
+		(((uint8_t)context->slot_counter) < context->max_sprites_line || !(context->flags & FLAG_SPRITE_OFLOW))
+	) {
 		line += 1;
 		uint16_t ymask, ymin;
 		uint8_t height_mult;