diff options
author | 2011-10-07 20:09:56 +0000 | |
---|---|---|
committer | 2011-10-07 20:09:56 +0000 | |
commit | 2f23aaeae06ec7ab51747db37a958a5dca3a59e8 (patch) | |
tree | da1cbf00fc7f328b6a9ba2e88610f3208cd77358 /src/emu | |
parent | b5c50ff369d17f71c1bd2efeb71914e95e6c939f (diff) |
tms9928a.c: Fixed colission detection regression. [Wilbert Pol]
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/video/tms9928a.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c index 77696556c09..d4e642621f2 100644 --- a/src/emu/video/tms9928a.c +++ b/src/emu/video/tms9928a.c @@ -522,21 +522,24 @@ void tms9928a_device::device_timer(emu_timer &timer, device_timer_id id, int par for ( int z = 0; z <= sprite_mag; colission_index++, z++ ) { - /* Check for colission */ - if ( spr_drawn[ colission_index ] ) - m_StatusReg |= 0x20; - spr_drawn[ colission_index ] |= 0x01; - /* Check if pixel should be drawn */ - if ( ( pattern & 0x80 ) && sprcol && num_sprites < 5 ) + if ( pattern & 0x80 ) { if ( colission_index >= 32 && colission_index < 32 + 256 ) { - /* Has another sprite already drawn here? */ - if ( ! ( spr_drawn[ colission_index ] & 0x02 ) ) + /* Check for colission */ + if ( spr_drawn[ colission_index ] ) + m_StatusReg |= 0x20; + spr_drawn[ colission_index ] |= 0x01; + + if ( sprcol ) { - spr_drawn[ colission_index ] |= 0x02; - p[ TMS9928A_HORZ_DISPLAY_START + colission_index - 32 ] = sprcol; + /* Has another sprite already drawn here? */ + if ( ! ( spr_drawn[ colission_index ] & 0x02 ) ) + { + spr_drawn[ colission_index ] |= 0x02; + p[ TMS9928A_HORZ_DISPLAY_START + colission_index - 32 ] = sprcol; + } } } } |