X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fdraw.c;h=bb051b6d9a89d3db11b907fefb243de538da4e76;hb=cf07a88d6eaa0e7719c498ef838ef175512a2bc4;hp=6408f205b84d70dd32f6273687da452550041834;hpb=c041308933a54fce3b1e98b0228e19f96475ae40;p=picodrive.git diff --git a/pico/draw.c b/pico/draw.c index 6408f20..bb051b6 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -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;