aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/gfx.cpp10
1 files 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);