From 9bc5073a39b85c0c20dc1bfd75ab7eb7eaabb144 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 15 Sep 2024 17:57:14 +0300 Subject: [PATCH] Fix SPRxPOS modification just before horizontal match if sprite had lowest horizontal bit set. --- custom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom.cpp b/custom.cpp index 8aff5baf..8087bace 100644 --- a/custom.cpp +++ b/custom.cpp @@ -5852,7 +5852,7 @@ static void decide_sprites2(int start, int end, int *countp, int *nrs, int *posn hw_xp = sprxp >> sprite_buffer_res; } - if (hw_xp >= start && hw_xp < end) { + if (((hw_xp >= start) || ((spr[i].pos & 1) && hw_xp == start - 1)) && hw_xp < end) { int xdiff = hw_xp - start; int sprxp_abs = (last_sprite_point_abs + xdiff) << sprite_buffer_res; // add hires/shres back -- 2.47.3