From b28e740adf3155031cae54267536944f81cd3866 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 1 Feb 2014 15:43:06 +0200 Subject: FULLPIPE: Fix cursor drawing on the edges --- engines/fullpipe/gfx.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 2d68600dbb..d72419b645 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -979,6 +979,9 @@ void Bitmap::putDibCB(int32 *palette) { byte *srcPtr = &_pixels[pitch * (endy - _y)]; + if (endy - _y < _height) + srcPtr = &_pixels[pitch * (_height - 1)]; + int starty = _y; if (starty < 0) { starty = 0; @@ -992,7 +995,7 @@ void Bitmap::putDibCB(int32 *palette) { } if (_flags & 0x1000000) { - for (int y = starty; y < endy; srcPtr -= pitch, y++) { + for (int y = starty; y <= endy; srcPtr -= pitch, y++) { curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y); copierKeyColor(curDestPtr, srcPtr, endx - startx + 1, _flags & 0xff, (int32 *)palette, cb05_format); } -- cgit v1.2.3