Fix jerky scrolling

This commit is contained in:
angelosa 2016-05-24 20:13:40 +02:00
parent e208f1d540
commit 8be2652e41

View File

@ -80,14 +80,16 @@ void metlfrzr_state::legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &clipre
UINT16 x_scroll_value;
x_scroll_value = m_video_regs[0x17] + ((m_video_regs[0x06] & 1) << 8);
x_scroll_base = (x_scroll_value >> 3) * 32;
x_scroll_shift = (x_scroll_value & 7);
for (count=0;count<32*32;count++)
for (count=0;count<32*33;count++)
{
int tile_base = count;
int y = (count % 32);
if(y > 7 || m_video_regs[0x06] & 3) // TODO: this condition breaks on level 5 halfway thru.
{
tile_base+= x_scroll_base;
x_scroll_shift = (x_scroll_value & 7);
}
else
x_scroll_shift = 0;
tile_base &= vram_mask;