fix cell scroll drawing

This commit is contained in:
notaz 2017-10-08 22:33:04 +03:00
parent c041308933
commit cf07a88d6e
6 changed files with 48 additions and 17 deletions

View file

@ -261,7 +261,11 @@ static void DrawStripVSRam(struct TileStrip *ts, int plane_sh, int cellskip)
// Draw tiles across screen:
tilex=(-ts->hscroll)>>3;
dx=((ts->hscroll-1)&7)+1;
if(dx != 8) cell--; // have hscroll, start with negative cell
if (ts->hscroll & 0x0f) {
int adj = ((ts->hscroll ^ dx) >> 3) & 1;
cell -= adj + 1;
ts->cells -= adj;
}
cell+=cellskip;
tilex+=cellskip;
dx+=cellskip<<3;