diff options
author | Eugene Sandulenko | 2010-06-15 10:21:42 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-06-15 10:21:42 +0000 |
commit | 671ed4873f163bc64f59af6317791db4bbaa2824 (patch) | |
tree | 316dffd519d7b56f7bd55ccdffab9e0f3bec52e8 /engines/drascula | |
parent | 0796580c3e10c99af209b26537823ca4a69acd76 (diff) | |
download | scummvm-rg350-671ed4873f163bc64f59af6317791db4bbaa2824.tar.gz scummvm-rg350-671ed4873f163bc64f59af6317791db4bbaa2824.tar.bz2 scummvm-rg350-671ed4873f163bc64f59af6317791db4bbaa2824.zip |
Drascula: Fixed bug #2826608.
Bug #2826608: "DRASCULA: Cursor GFX error" fixed by introducing
separate buffer for cursors. This also fixes the root cause of
the problem.
svn-id: r49713
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/drascula.cpp | 2 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 1 | ||||
-rw-r--r-- | engines/drascula/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/drascula/interface.cpp | 2 |
4 files changed, 6 insertions, 1 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b16182e3e2..4c38a87291 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -244,6 +244,8 @@ Common::Error DrasculaEngine::run() { if (currentChapter != 3) loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, cursorSurface); + if (currentChapter == 1) { } else if (currentChapter == 2) { loadPic("pts.alg", drawSurface2); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index aaa1a4f42a..0a8b7c8c9b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -391,6 +391,7 @@ public: // Graphics buffers/pointers byte *bgSurface; byte *backSurface; + byte *cursorSurface; byte *drawSurface3; byte *drawSurface2; byte *tableSurface; diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 28ade30601..088e1e1da9 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -54,6 +54,7 @@ void DrasculaEngine::allocMemory() { assert(crosshairCursor); mouseCursor = (byte *)malloc(OBJWIDTH * OBJHEIGHT); assert(mouseCursor); + cursorSurface = (byte *)malloc(64000); } void DrasculaEngine::freeMemory() { @@ -67,6 +68,7 @@ void DrasculaEngine::freeMemory() { free(frontSurface); free(crosshairCursor); free(mouseCursor); + free(cursorSurface); } void DrasculaEngine::moveCursor() { diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index 507cc6e123..38be3c6d5c 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -78,7 +78,7 @@ void DrasculaEngine::selectVerb(int verb) { } for (int i = 0; i < OBJHEIGHT; i++) - memcpy(mouseCursor + i * OBJWIDTH, backSurface + OBJWIDTH * verb + (c + i) * 320, OBJWIDTH); + memcpy(mouseCursor + i * OBJWIDTH, cursorSurface + OBJWIDTH * verb + (c + i) * 320, OBJWIDTH); setCursor(kCursorCurrentItem); if (verb > 0) { |