X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fdraw.c;h=5094e5cda9c9c5fd756f8f4694d77879971d3a4f;hb=a2b8c5a54568093b247ced39f0754cbb30324830;hp=168a6ea98a2c440a25b52e2e760d642eae3c65a0;hpb=5a68108691ed5685682ce133aa0bcf6015c0afd8;p=picodrive.git diff --git a/pico/draw.c b/pico/draw.c index 168a6ea..5094e5c 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -1421,7 +1421,7 @@ PICO_INTERNAL void PicoFrameStart(void) lines = 240; } - HighCol = HighColBase; + HighCol = HighColBase + offs * HighColIncrement; DrawLineDest = (char *)DrawLineDestBase + offs * DrawLineDestIncrement; DrawScanline = 0; skip_next_line = 0; @@ -1566,10 +1566,12 @@ void PicoDrawSetOutFormat(pdso_t which, int allow_32x) rendstatus_old = -1; } +// note: may be called on the middle of frame void PicoDrawSetOutBuf(void *dest, int increment) { DrawLineDestBase = dest; DrawLineDestIncrement = increment; + DrawLineDest = DrawLineDestBase + DrawScanline * increment; } void PicoDrawSetInternalBuf(void *dest, int increment) @@ -1577,6 +1579,7 @@ void PicoDrawSetInternalBuf(void *dest, int increment) if (dest != NULL) { HighColBase = dest; HighColIncrement = increment; + HighCol = HighColBase + DrawScanline * increment; } else { HighColBase = DefHighCol;