From 0daaadc604b5ec8ce3be491736b01156c19afca9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 28 Aug 2013 10:20:55 +0300 Subject: FULLPIPE: Fixed off-screen bitmap rendering --- engines/fullpipe/gfx.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index ef6a589f8f..3384b87815 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -783,16 +783,18 @@ void Bitmap::putDibCB(int32 *palette) { byte *srcPtr = &_pixels[pitch * (endy - _y)]; + int starty = _y; + if (starty < 0) { + starty = 0; + srcPtr = &_pixels[pitch * (_height + _y)]; + } + int startx = _x; if (startx < 0) { srcPtr += bpp * -_x; startx = 0; } - int starty = _y; - if (starty < 0) - starty = 0; - if (_flags & 0x1000000) { for (int y = starty; y < endy; srcPtr -= pitch, y++) { curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(startx, y); -- cgit v1.2.3