tms9928a.c: Fixed colission detection regression. [Wilbert Pol]

This commit is contained in:
Wilbert Pol 2011-10-07 20:09:56 +00:00
parent b5c50ff369
commit 2f23aaeae0

View File

@ -521,16 +521,18 @@ void tms9928a_device::device_timer(emu_timer &timer, device_timer_id id, int par
int colission_index = spr_x + ( sprite_mag ? i * 2 : i ) + 32;
for ( int z = 0; z <= sprite_mag; colission_index++, z++ )
{
/* Check if pixel should be drawn */
if ( pattern & 0x80 )
{
if ( colission_index >= 32 && colission_index < 32 + 256 )
{
/* 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 ( colission_index >= 32 && colission_index < 32 + 256 )
if ( sprcol )
{
/* Has another sprite already drawn here? */
if ( ! ( spr_drawn[ colission_index ] & 0x02 ) )
@ -542,6 +544,7 @@ void tms9928a_device::device_timer(emu_timer &timer, device_timer_id id, int par
}
}
}
}
pattern = m_vMem[ pataddr + 16 ];
spr_x += sprite_mag ? 16 : 8;