# HG changeset patch # User Michael Pavone # Date 1737878053 28800 # Node ID f51d750b4d0667b01895d663a89417b544f07ed5 # Parent 595719fe69f2853dbfacc88a681c94000975c888 Fix sprite overflow regression in Super Hang-On and other games diff -r 595719fe69f2 -r f51d750b4d06 vdp.c --- a/vdp.c Sat Jan 25 21:25:01 2025 -0800 +++ b/vdp.c Sat Jan 25 23:54:13 2025 -0800 @@ -913,6 +913,8 @@ context->sprite_draw_list[context->sprite_draws].width = width; context->sprite_draw_list[context->sprite_draws].height = height; } + } else if (context->sprite_draws) { + context->sprite_draw_list[context->sprite_draws - 1].x_pos = 0; } context->cur_slot++; } @@ -3080,6 +3082,9 @@ context->col_1 ); context->flags &= ~FLAG_MASKED; + if (context->sprite_draws) { + context->sprite_draw_list[context->sprite_draws - 1].x_pos = 0; + } render_sprite_cells(context); //164 render_border_garbage( @@ -3315,6 +3320,9 @@ context->col_1 ); context->flags &= ~FLAG_MASKED; + if (context->sprite_draws) { + context->sprite_draw_list[context->sprite_draws - 1].x_pos = 0; + } render_sprite_cells(context); CHECK_LIMIT case 164: @@ -3533,6 +3541,9 @@ context->col_1 ); context->flags &= ~FLAG_MASKED; + if (context->sprite_draws) { + context->sprite_draw_list[context->sprite_draws - 1].x_pos = 0; + } render_sprite_cells(context); CHECK_LIMIT case 132: