diff options
author | Paul Gilbert | 2016-09-18 21:12:46 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-18 21:12:46 -0400 |
commit | 96b5fc817cff0b237e179ec3017aa6fd06a284e2 (patch) | |
tree | b6bbb58be482419e7f643dca3b1b9b40bc1131e9 /engines/xeen/screen.cpp | |
parent | 78132c5138c5a989add6afae75ee63bf0fc2ed8a (diff) | |
download | scummvm-rg350-96b5fc817cff0b237e179ec3017aa6fd06a284e2.tar.gz scummvm-rg350-96b5fc817cff0b237e179ec3017aa6fd06a284e2.tar.bz2 scummvm-rg350-96b5fc817cff0b237e179ec3017aa6fd06a284e2.zip |
XEEN: Fix merging graphic pages to screen
Diffstat (limited to 'engines/xeen/screen.cpp')
-rw-r--r-- | engines/xeen/screen.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp index 59978cf3d5..bcd298d118 100644 --- a/engines/xeen/screen.cpp +++ b/engines/xeen/screen.cpp @@ -369,14 +369,17 @@ void Screen::horizMerge(int xp) { for (int y = 0; y < SCREEN_HEIGHT; ++y) { byte *destP = (byte *)getBasePtr(0, y); - const byte *srcP = (const byte *)_pages[0].getBasePtr(0, y); + const byte *srcP = (const byte *)_pages[0].getBasePtr(xp, y); Common::copy(srcP, srcP + SCREEN_WIDTH - xp, destP); if (xp != 0) { + destP = (byte *)getBasePtr(SCREEN_WIDTH - xp, y); srcP = (const byte *)_pages[1].getBasePtr(0, y); - Common::copy(srcP + SCREEN_WIDTH - xp, srcP + SCREEN_WIDTH, destP + SCREEN_WIDTH - xp); + Common::copy(srcP, srcP + xp, destP); } } + + markAllDirty(); } void Screen::vertMerge(int yp) { @@ -389,11 +392,13 @@ void Screen::vertMerge(int yp) { Common::copy(srcP, srcP + SCREEN_WIDTH, destP); } - for (int y = SCREEN_HEIGHT - yp; y < SCREEN_HEIGHT; ++y) { + for (int y = 0; y < (SCREEN_HEIGHT - yp); ++y) { const byte *srcP = (const byte *)_pages[1].getBasePtr(0, y); - byte *destP = (byte *)getBasePtr(0, y); + byte *destP = (byte *)getBasePtr(0, SCREEN_HEIGHT - yp + y); Common::copy(srcP, srcP + SCREEN_WIDTH, destP); } + + markAllDirty(); } void Screen::draw(void *data) { |