Mercurial > repos > blastem
comparison vdp.c @ 2010:19957e7353a4
Fix a regression in sprite rendering that could cause garbage to be displayed on first line
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 01 Nov 2020 12:32:25 -0800 |
parents | 4ace0fef6f8f |
children | dcdad92f84a4 |
comparison
equal
deleted
inserted
replaced
2009:4ace0fef6f8f | 2010:19957e7353a4 |
---|---|
3367 static void check_switch_inactive(vdp_context *context, uint8_t is_h40) | 3367 static void check_switch_inactive(vdp_context *context, uint8_t is_h40) |
3368 { | 3368 { |
3369 //technically the second hcounter check should be different for H40, but this is probably close enough for now | 3369 //technically the second hcounter check should be different for H40, but this is probably close enough for now |
3370 if (context->state == ACTIVE && context->vcounter == context->inactive_start && (context->hslot >= (is_h40 ? 167 : 135) || context->hslot < 133)) { | 3370 if (context->state == ACTIVE && context->vcounter == context->inactive_start && (context->hslot >= (is_h40 ? 167 : 135) || context->hslot < 133)) { |
3371 context->state = INACTIVE; | 3371 context->state = INACTIVE; |
3372 context->cur_slot = MAX_SPRITES_LINE-1; | |
3373 context->sprite_x_offset = 0; | |
3372 } | 3374 } |
3373 } | 3375 } |
3374 | 3376 |
3375 static void vdp_inactive(vdp_context *context, uint32_t target_cycles, uint8_t is_h40, uint8_t mode_5) | 3377 static void vdp_inactive(vdp_context *context, uint32_t target_cycles, uint8_t is_h40, uint8_t mode_5) |
3376 { | 3378 { |