aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-09-20 19:58:07 +0000
committerMax Horn2004-09-20 19:58:07 +0000
commit3b9bcb7745834c6482b0502e7fbeca4e2af59fb0 (patch)
treea24638012732076f7cdfee53ca7e6dbfe8e1241c /scumm
parentf61a0f83ff5c3c98e6efaa573d45b3c39601cb6e (diff)
downloadscummvm-rg350-3b9bcb7745834c6482b0502e7fbeca4e2af59fb0.tar.gz
scummvm-rg350-3b9bcb7745834c6482b0502e7fbeca4e2af59fb0.tar.bz2
scummvm-rg350-3b9bcb7745834c6482b0502e7fbeca4e2af59fb0.zip
Fix for bug #1031390 (FOA: Graphical corruption and possible crash in Atlantis Map)
svn-id: r15207
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp19
-rw-r--r--scumm/scumm.cpp19
2 files changed, 18 insertions, 20 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 4aff8bbaa0..09ddda5d73 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -2743,10 +2743,27 @@ void ScummEngine::fadeOut(int effect) {
if (!(_features & GF_NEW_CAMERA))
camera._last.x = camera._cur.x;
+ if (_switchRoomEffect >= 130 && _switchRoomEffect <= 133) {
+ // We're going to use scrollEffect(), so we'll need a copy of
+ // the current VirtScreen zero.
+
+ free(_scrollBuffer);
+ _scrollBuffer = (byte *) malloc(vs->h * vs->w);
+
+ byte *src = vs->getPixels(0, 0);
+ byte *dst = _scrollBuffer;
+
+ for (int y = 0; y < vs->h; y++) {
+ memcpy(dst, src, vs->w);
+ src += vs->pitch;
+ dst += vs->w;
+ }
+ }
+
+
if (_screenEffectFlag && effect != 0) {
// Fill screen 0 with black
-
memset(vs->getPixels(0, 0), 0, vs->pitch * vs->h);
// Fade to black with the specified effect, if any.
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index eb92cbeb7b..f09f410c81 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -2328,25 +2328,6 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
runExitScript();
- if (_switchRoomEffect >= 130 && _switchRoomEffect <= 133) {
- // We're going to use scrollEffect(), so we'll need a copy of
- // the current VirtScreen zero.
-
- VirtScreen *vs = &virtscr[0];
-
- free(_scrollBuffer);
- _scrollBuffer = (byte *) malloc(vs->h * vs->w);
-
- byte *src = vs->getPixels(0, 0);
- byte *dst = _scrollBuffer;
-
- for (int y = 0; y < vs->h; y++) {
- memcpy(dst, src, vs->w);
- src += vs->pitch;
- dst += vs->w;
- }
- }
-
killScriptsAndResources();
clearEnqueue();
if (_version >= 4 && _heversion <= 60)