diff options
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r-- | engines/kyra/screen.cpp | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index ac212b5026..783d66fc05 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -515,30 +515,28 @@ void Screen::copyToPage0(int y, int h, uint8 page, uint8 *seqBuf) { void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage, int flags) { debugC(9, kDebugLevelScreen, "Screen::copyRegion(%d, %d, %d, %d, %d, %d, %d, %d, %d)", x1, y1, x2, y2, w, h, srcPage, dstPage, flags); - if (flags & CR_CLIPPED) { - if (x2 < 0) { - if (x2 <= -w) - return; - w += x2; - x1 -= x2; - x2 = 0; - } else if (x2 + w >= SCREEN_W) { - if (x2 > SCREEN_W) - return; - w = SCREEN_W - x2; - } + if (x2 < 0) { + if (x2 <= -w) + return; + w += x2; + x1 -= x2; + x2 = 0; + } else if (x2 + w >= SCREEN_W) { + if (x2 > SCREEN_W) + return; + w = SCREEN_W - x2; + } - if (y2 < 0) { - if (y2 <= -h ) - return; - h += y2; - y1 -= y2; - y2 = 0; - } else if (y2 + h >= SCREEN_H) { - if (y2 > SCREEN_H) - return; - h = SCREEN_H - y2; - } + if (y2 < 0) { + if (y2 <= -h ) + return; + h += y2; + y1 -= y2; + y2 = 0; + } else if (y2 + h >= SCREEN_H) { + if (y2 > SCREEN_H) + return; + h = SCREEN_H - y2; } assert(x1 + w <= SCREEN_W && y1 + h <= SCREEN_H); |