From 1a6dd88713ff6a6994f9e4d69abf8e3c66538bb2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 26 Dec 2014 18:50:14 +1100 Subject: [PATCH] XEEN: Fix error in vertMerge --- engines/xeen/darkside/darkside_game.cpp | 3 ++- engines/xeen/resources.cpp | 2 +- engines/xeen/screen.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/xeen/darkside/darkside_game.cpp b/engines/xeen/darkside/darkside_game.cpp index a597ab2ce84..17a998eb417 100644 --- a/engines/xeen/darkside/darkside_game.cpp +++ b/engines/xeen/darkside/darkside_game.cpp @@ -60,6 +60,7 @@ void DarkSideEngine::darkSideIntro() { bool breakFlag = false; int nwcIndex = 0, nwcFrame = 0; for (int idx = 0; idx < 55 && !shouldQuit() && !breakFlag; ++idx) { + // Render the next frame _events->updateGameCounter(); _screen->vertMerge(0); nwc[nwcIndex].draw(*_screen, nwcFrame, Common::Point(0, 0)); @@ -72,7 +73,7 @@ void DarkSideEngine::darkSideIntro() { case 34: case 44: ++nwcIndex; - ++nwcFrame; + nwcFrame = 0; break; case 35: _sound->proc2(voc[1]); diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp index 4cc586f014b..736f014a81b 100644 --- a/engines/xeen/resources.cpp +++ b/engines/xeen/resources.cpp @@ -345,7 +345,7 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi } } - dest.addDirtyRect(Common::Rect(destPos.x, destPos.y, + dest.addDirtyRect(Common::Rect(destPos.x + xOffset, destPos.y + yOffset, destPos.x + xOffset + width, destPos.y + yOffset + height)); } diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp index 0c7df8b776f..e390f16cdd1 100644 --- a/engines/xeen/screen.cpp +++ b/engines/xeen/screen.cpp @@ -160,7 +160,7 @@ void Screen::vertMerge(int yp) { Common::copy(srcP, srcP + SCREEN_WIDTH, destP); } - for (int y = yp; y < SCREEN_HEIGHT; ++y) { + for (int y = SCREEN_HEIGHT - yp; y < SCREEN_HEIGHT; ++y) { const byte *srcP = (const byte *)_pages[1].getBasePtr(0, y); byte *destP = (byte *)getBasePtr(0, y); Common::copy(srcP, srcP + SCREEN_WIDTH, destP);